This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: analysis of polling in systemtap


hunt wrote:

> [...]  Unfortunately if an error is hit, the error message is
> sometimes cleared before the script exits. [...]  Error and warning
> messages are sent over a separate channel and are displayed
> immediately.  [...]

The error/warning messages already go to stderr, if I read the code
correctly.  A script that generates lots of stdout + stderr traffic
may need to be diagnosed the same way as for unix tools generally:
separate stderr redirection.

> [...]
> 	sortn(called, 10, SORT_VALUE)
>       printa(called, 10, "%1d called %2s\t%d times")
>       delete called
> [...]

One obvious problem with this is the race and possible mismatches
between the "sortn" and "printa" calls.  Compared to this, the
proposed sorted-limited-foreach is indeed somewhat slower, but
likewise requires the same number of script lines:

     foreach (x in called- limit 10) 
       printf("%d called %s" ... )
     # there is also a race here.
     delete called

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]