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: How to access g_probe_timing


larytet wrote:

> [...]
> I would like to expose the collected [probe run-time] statistics via sysfs or proc.
> I have added a C function to my script  which looks like this
> [...]
> {
> Stat *stat = &g_probe_timing[i];
> [...]
> The build fails with "error: 'g_probe_timing' undeclared"
>
> Is there an example of how I can access the collected performance data?

We haven't given this aspect much thought before.  Undocumented
variables that are internal to the stap runtime, or especially to
generated code, by nature do not have portable examples.  For example,
current git-HEAD versions use a probe_timing() macro.  You'd need to
inspect the output of "stap -p3 -t -e 'probe begin {}'" and match that
somehow.

You might also check out "stap --monitor" mode in version 3.0 or
git-HEAD.  Under the covers, it includes exporting of some probe stats
to userspace.

- FChE


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