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: Newbie Notes


Hi -


> OK. Take this script, which will work on anything you have lying around
> with simple adaptations:
> [...]

Ah.  Yes, the unused-variable warnings are suppressed, but only for
script located in a tapset.  If you put that first alias definition
into a separate directory/file, and run with stap -I$dir, then you
will not see those warnings.


> The issue is specifically within @var and @cast expansion. It's done early,
> and doesn't appear to benefit from implicit string concatenation at all,
> macro-expanded or otherwise. Per my other post.  [...]
> but not this (where $1 = /usr/pgsql-11/ ):
> 
>         @define PGBIN %( @1 "bin/postgres" %)
>         function get_pgver:long() {
>             return @var("server_version_num@guc.c", @PGBIN);
>         }
>         probe process(@PGBIN).function("PostgresMain") {
>             printf("%s", @PGBIN, get_pgver());
>         }

OK, working on this bug.


> [...] I'm talking about how --monitor decides what is / isn't a
> hit. Does using "next" in a probe alias body suppress it? etc.

It should count every distinct probe whose handler starts executing,
so definitely include those that run through to a 'next'.

> As a heavy user of perf's "perf top", stap's --monitor is of great interest
> to me.

By the way, see also   stap --example eventcount.stp 

> [...]


- FChE


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