public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Using poll(2) on trace files
@ 2018-05-15 11:27 Aryeh Weinreb
  2018-05-16 13:45 ` Aryeh Weinreb
  0 siblings, 1 reply; 2+ messages in thread
From: Aryeh Weinreb @ 2018-05-15 11:27 UTC (permalink / raw)
  To: systemtap

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using poll(2) on trace files
  2018-05-15 11:27 Using poll(2) on trace files Aryeh Weinreb
@ 2018-05-16 13:45 ` Aryeh Weinreb
  0 siblings, 0 replies; 2+ messages in thread
From: Aryeh Weinreb @ 2018-05-16 13:45 UTC (permalink / raw)
  To: systemtap

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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-16 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-15 11:27 Using poll(2) on trace files Aryeh Weinreb
2018-05-16 13:45 ` Aryeh Weinreb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).