This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How to access g_probe_timing
- From: Arkady <larytet at gmail dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 25 Jan 2017 19:34:14 +0200
- Subject: Re: How to access g_probe_timing
- Authentication-results: sourceware.org; auth=none
- References: <CANA-60p+7jCJctd3AZRZMv9B5UWOkRws33VTS4gFBbQVb=V_Ug@mail.gmail.com> <y0mlgtzcsbm.fsf@fche.csb>
If include files in the runtime/linux would contain
#pragma once
I could include the necessary files and gain access to the collected data
On Wed, Jan 25, 2017 at 1:06 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
>
> 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