summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples/profiling/latencytap.stp
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-23 19:08:51 -0500
committerDave Brolley <brolley@redhat.com>2009-11-23 19:08:51 -0500
commit5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba (patch)
treee44ad8807e0b5b2e1bb85682f677d492f1195dbf /testsuite/systemtap.examples/profiling/latencytap.stp
parent562d60b004e3d7ae73c1c7508be529006bd6430f (diff)
parent90bba7158de040705a101ba1fdf6062866b4b4e9 (diff)
downloadsystemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.tar.gz
systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.tar.xz
systemtap-steved-5d1c958ce2dcc0f28c1bd13b8e005c0c2ad1cdba.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts: configure
Diffstat (limited to 'testsuite/systemtap.examples/profiling/latencytap.stp')
-rwxr-xr-xtestsuite/systemtap.examples/profiling/latencytap.stp10
1 files changed, 4 insertions, 6 deletions
diff --git a/testsuite/systemtap.examples/profiling/latencytap.stp b/testsuite/systemtap.examples/profiling/latencytap.stp
index d202ec81..7fdbbc4e 100755
--- a/testsuite/systemtap.examples/profiling/latencytap.stp
+++ b/testsuite/systemtap.examples/profiling/latencytap.stp
@@ -1,4 +1,4 @@
-#! /usr/bin/stap -g
+#! /usr/bin/env stap
# Record the time that a process has spent asleep, and in what function
@@ -7,8 +7,7 @@ global sleep_time
global process_names
global sleep_agg
-function _get_sleep_time:long(rq_param:long, p_param:long)
-%{
+function _get_sleep_time:long(rq_param:long, p_param:long) %{ /* pure */
struct rq *rq = (struct rq *)(unsigned long)THIS->rq_param;
struct task_struct *p = (struct task_struct *)(unsigned long)THIS->p_param;
struct sched_entity *se = &p->se;
@@ -19,9 +18,8 @@ function _get_sleep_time:long(rq_param:long, p_param:long)
THIS->__retvalue = delta;
%}
-# Get the backtrace from an arbitrary task
-function task_backtrace:string (task:long)
-%{
+# Get the backtrace from an arbitrary task
+function task_backtrace:string (task:long) %{ /* pure */
_stp_stack_snprint_tsk(THIS->__retvalue, MAXSTRINGLEN,
(struct task_struct *)(unsigned long)THIS->task, 0, MAXTRACE);
%}