Hi: I have both tick-n and profile-n probes clause before syscall:::entry probe clause. However, I happen to have printf and printa in syscall probe syscall proble clause is so greedy that my tick or profile probe clause does not have a chance to printf in tick or profile probe to std out. Pointer is appreciated. Thanks This message posted from opensolaris.org
Brendan Gregg
2005-Nov-21 02:11 UTC
[dtrace-discuss] profile provider and syscall provider
G''Day, On Sun, 20 Nov 2005, ttoulliu2002 wrote:> Hi: > > I have both tick-n and profile-n probes > clause before syscall:::entry probe clause. > However, I happen to have printf and printa > in syscall probe > > syscall proble clause is so greedy that > my tick or profile probe clause does not > have a chance to printf in tick or profile > probe to std out. > > Pointer is appreciated.Perhaps this helps: A DTrace program isn''t top-down as with most other languages, it is event-based - like an awk program. You server is seeing many syscall events before the profile event, and is printing them out. Just because the profile clause is before the syscall clause doesn''t mean that that is the order they are executed. You may want to use an aggregate in a syscall clause, which is then printed in a profile clause. cheers, Brendan
Roch Bourbonnais - Performance Engineering
2005-Nov-21 08:58 UTC
[dtrace-discuss] profile provider and syscall provider
If you have tick-1s{printf("tick\n")} syscall:::{printf("syscall\n")} and your workload is doing 100 syscall per second; then we''d expect to see 100 syscall lines followed by a single tick line. Do you not have that ? -r Brendan Gregg writes: > G''Day, > > On Sun, 20 Nov 2005, ttoulliu2002 wrote: > > > Hi: > > > > I have both tick-n and profile-n probes > > clause before syscall:::entry probe clause. > > However, I happen to have printf and printa > > in syscall probe > > > > syscall proble clause is so greedy that > > my tick or profile probe clause does not > > have a chance to printf in tick or profile > > probe to std out. > > > > Pointer is appreciated. > > Perhaps this helps: > > A DTrace program isn''t top-down as with most other languages, it is > event-based - like an awk program. You server is seeing many syscall > events before the profile event, and is printing them out. Just because > the profile clause is before the syscall clause doesn''t mean that that is > the order they are executed. > > You may want to use an aggregate in a syscall clause, which is then > printed in a profile clause. > > cheers, > > Brendan > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
ttoulliu2002
2005-Nov-21 20:34 UTC
[dtrace-discuss] Re: profile provider and syscall provider
Hi: It has been written to std out at 2K-3K lines after the greedy syscall probe output. Is it possible to specify the priority or interval to ensure the stable profile provider probe std out so that it can be alerted at the right time and D consumer application can have more reliable way to deal with D output. Sometimes It is preferred to have std out right away instead of final sampling output or aggregation. Pointers are very appreciated. Thanks This message posted from opensolaris.org
Jonathan Adams
2005-Nov-21 22:55 UTC
[dtrace-discuss] Re: profile provider and syscall provider
On Mon, Nov 21, 2005 at 12:34:10PM -0800, ttoulliu2002 wrote:> Hi: > > It has been written to std out at 2K-3K lines after the > greedy syscall probe output. > > Is it possible to specify the priority or interval to ensure > the stable profile provider probe std out so that it can be > alerted at the right time and D consumer application can > have more reliable way to deal with D output.You can tune up "switchrate", which controls how often the userland consumer pulls data out of the kernel and prints it out; it defaults to once a second. You can modify it using ''-xswitchrate=...'', or: #pragma D option switchrate=... in a script. See Chapter 16 in the Dynamic Tracing Guide: http://docs.sun.com/app/docs/doc/817-6223/ for more details. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development
ttoulliu2002
2005-Nov-22 00:15 UTC
[dtrace-discuss] Re: profile provider and syscall provider
Jonathan: Thanks for the reply. I did not observe the buffer switch effect with setting below -x switchrate=1hz -x switchrate=10hz -x switchrate=100hz What am I missing Thanks This message posted from opensolaris.org
Bryan Cantrill
2005-Nov-22 00:55 UTC
[dtrace-discuss] Re: profile provider and syscall provider
On Mon, Nov 21, 2005 at 04:15:06PM -0800, ttoulliu2002 wrote:> Jonathan: > > Thanks for the reply. > > I did not observe the buffer switch effect with setting below > > -x switchrate=1hz > -x switchrate=10hz > -x switchrate=100hzIt''s a little hard to understand this without a little more context. For example, do you have aggregations? If you do, you will need to set "aggrate" as well. See the "Buffers and Buffering" chapter of the Dynamic Tracing Guide for details. More generally, you should count on reading the Guide: we''ve designed it to be readable -- to act as both tutorial and reference -- and I think you''ll find that it will answer many of your questions. - Bryan -------------------------------------------------------------------------- Bryan Cantrill, Solaris Kernel Development. http://blogs.sun.com/bmc