summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.examples/profiling/latencytap.stp
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-11-18 17:59:24 +0800
committerWenji Huang <wenji.huang@oracle.com>2009-11-18 17:59:24 +0800
commit66f73b62a4ed147b229237407a00688e61f96d5a (patch)
tree83e36258ada8be05220b976b350d580a36733565 /testsuite/systemtap.examples/profiling/latencytap.stp
parent2e66901da2ffed2261784f458a2fc57d6f059725 (diff)
downloadsystemtap-steved-66f73b62a4ed147b229237407a00688e61f96d5a.tar.gz
systemtap-steved-66f73b62a4ed147b229237407a00688e61f96d5a.tar.xz
systemtap-steved-66f73b62a4ed147b229237407a00688e61f96d5a.zip
Clean up examples
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);
%}