On Mon, Aug 1, 2016 at 9:33 AM, H. Mijail <hmij...@gmail.com> wrote:

> When running dapptrace, I'm having a burst of stdout from my program
> before the dtrace output starts appearing. Is there any way to force the
> flushing of dtrace messages ASAP, so that the function traces get
> interlaced with the stdout from my program?



You may be able to get the output sooner by tuning up the switchrate (see
[1]), but I'm not sure whether you'll be able to get it as close to the
application activity as you want.  Output from the "dtrace" command is
always a bit behind the events themselves because the event consumer is
deliberately decoupled from the producer.  I haven't used dapptrace, but
you may be able to get some of the same information out of truss(1), whose
mechanism actually stops the process, which should keep the output in
sync.  This has all of the downsides of that approach, including a much
bigger impact on the traced process.

-- Dave

[1] http://dtrace.org/guide/chp-buf.html#chp-buf



-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com

Reply via email to