Perfmon systemtap runtime support
William Cohen
wcohen@redhat.com
Fri Jul 14 15:50:00 GMT 2006
Chuck Ebbert wrote:
> In-Reply-To: <44B6C74E.7040008@redhat.com>
>
> On Thu, 13 Jul 2006 18:21:02 -0400, William Cohen wrote:
>
>>I have been working on getting some performance monitoring support into
>>systemtap. The perfmon1.diff patch is a very simple addition to the
>>runtime. It just has functions to setup the perfmon monitoring hardware,
>>read a counter, and shutdown the performance monitoring hardware. It
>>uses the perfmon2 kernel ABI to configure the hardware.
>>
>>I have completed changes to the translator to use the runtime functions.
>>I took Marin's suggestion of using guru mode to allow access to the
>>various C functions and wrote some examples that used the runtime functions.
>>
>>The cost is relatively high for accessing the counters. Below is the
>>output from p2x.stp, counting the number of cycles between consecutive
>>calls to read the cycle count:
>>
>>[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
>>interval = 15491
>
>
> I modified your sample pure C module from a while ago and I get 500-700
> cycles overhead:
I tried tried your example and I got similar numbers:
Jul 14 11:47:40 dhcp59-187 kernel: val0 = 6595400, val1 = 6595847,
interval = 447
Jul 14 11:47:41 dhcp59-187 kernel: val0 = 6842567, val1 = 6843068,
interval = 501
I don't know why I got such high cycle counts yesterday. Running the
same p2x.stp today I got lower cycle counts:
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 1051
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 1009
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 650
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 1063
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 983
-Will
More information about the Systemtap
mailing list