Perfmon systemtap runtime support
William Cohen
wcohen@redhat.com
Thu Jul 13 22:21:00 GMT 2006
Hi
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
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 16317
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 15431
[wcohen@dhcp59-187 systemtap_perfmon]$ ./install/bin/stap -g p2x.stp
interval = 15392
I would appreciate any comments or feedback on this code.
-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perfmon1.diff
Type: text/x-patch
Size: 5780 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20060713/d1cf1d73/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p1x.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20060713/d1cf1d73/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p2x.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20060713/d1cf1d73/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: p3x.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20060713/d1cf1d73/attachment-0002.ksh>
More information about the Systemtap
mailing list