This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Using poll(2) on trace files
- From: Aryeh Weinreb <aryehweinreb at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Wed, 16 May 2018 16:45:05 +0300
- Subject: Re: Using poll(2) on trace files
- References: <CAPU6G=H+v0N_+H8GF9+qXy9MNDRc7jo-66nic_F7fPv9exNgZA@mail.gmail.com>
Answering my own question, please correct me if I'm wrong.
With relayfs, poll is only notified when sub-buffer bounders are crossed.
So if I want to stream data from the buffer, I need either wait for the
first sub-buffer to fill or call read periodically non-blocking.
On Tue, May 15, 2018 at 2:27 PM, Aryeh Weinreb <aryehweinreb@gmail.com>
wrote:
> Hi,
>
> I would like to process the systemtap trace files in userspace without
> writing to disk.
> I built the kernel module with stap -p4 then loaded it with staprun -L.
> I would like to use poll(2) on the trace0 file to wait for data but I am
> not getting POLLIN set even though there is data I can read from the file.
> What am I missing?
>
> Thanks,
> Aryeh
>