From 6ac9e2adb81122c92aa180d628a1d6c226ada6aa Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 6 Jan 2010 17:27:25 +0100 Subject: grapher example with backtraces in events * testsuite/systemtap.examples/profiling/graphcall.stp : new file --- testsuite/systemtap.examples/profiling/graphcall.stp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testsuite/systemtap.examples/profiling/graphcall.stp (limited to 'testsuite/systemtap.examples/profiling') diff --git a/testsuite/systemtap.examples/profiling/graphcall.stp b/testsuite/systemtap.examples/profiling/graphcall.stp new file mode 100644 index 00000000..db96b728 --- /dev/null +++ b/testsuite/systemtap.examples/profiling/graphcall.stp @@ -0,0 +1,19 @@ +#! /usr/bin/env stap + +# When the output of this script is fed to stapgraph, it produces a +# mousable event line with events at each call of interest. When the +# event is hovered over, the backtrace is displayed in stapgraph. + +probe begin +{ + printf("%%DataSet:call 75 ff0000 discreet\n") + printf("call %%Title:Calls to %s\n", @2) + printf ("call %%XAxisTitle:Time\n") + printf ("%%LineEnd:0\n") +} + +probe process(@1).function(@2).call { + printf("call %d ", gettimeofday_ms()) + print_ubacktrace_brief(); + printf("%c", 0) +} -- cgit