Accessing user-space global variables in timer.profile?
agentzh
agentzh@gmail.com
Sat Jun 1 07:46:00 GMT 2013
Hello!
On Wed, May 29, 2013 at 9:00 PM, agentzh wrote:
> Okay, I've come up with a (naive) patch to implement
> @var("somevar@somefile", "somemodule") for stap user functions and
> context-free probe handlers (see below). It works for me on Fedora 17,
> both in a function or in timer.profile.
>
Okay, based on this new feature, I've just written a systemtap-based
tool named pl-sample-bt that can sample and aggregate Perl-land
backtraces for a specified perl process at the Linux system ticks:
https://github.com/agentzh/perl-systemtap-toolkit#pl-sample-bt
Its output can then be used to render "Perl-land Flame Graphs" by
Brendan Gregg's FlameGraph tool chain, for example:
http://agentzh.org/misc/flamegraph/perl-test-nginx-socket.svg
Essentially, pl-sample-bt emulates dtrace's jstack() thing for Perl 5.
And I just ported the Perl_pp_caller function in the perl 5 core over
to the stap language. The basic approach may well apply to other high
level languages' VMs :)
Best regards,
-agentzh
More information about the Systemtap
mailing list