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: Simple(?) question


"Alan D. Brunelle" <alan.brunelle@hp.com> writes:

> I'm trying to analyze something on RHEL5 GA (errata kernel), and I'm
> having problems getting a simple piece of histogram code to work. The
> following compiles & runs:
> [...]
> probe kernel.function("__generic_unplug_device") {
>         rd_hist <<< $q->rq.count[READ]
> }

The problem here is that our syntax for following pointer chains is
more limited than C.  Try "$q->rq->count[0]", yes, arrow instead
of dot, and you need a literal number for the index.

> probe end {
>         // print(@hist_log(rd_hist))
>         exit()
> }
> 
> (Note: the commented out print line.) If I put the commented line back
> in, I get:
> [...]

The reason this could make a difference is because this was the sole
*read* of the rd_hist statistical value.  With it commented out, an
optimization pass within systemtap removes the whole rd_hist <<<
expression in the other probe handler, and with it, any analysis of
the actual problem.

- FChE


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