From b57367210bd84bdbf6a78785905127fb7711e567 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 16 Sep 2009 15:23:50 -0700 Subject: Spelling fixes in the tapsets --- tapset/context-unwind.stp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tapset/context-unwind.stp') diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp index d6654d25..4ad45dba 100644 --- a/tapset/context-unwind.stp +++ b/tapset/context-unwind.stp @@ -8,7 +8,7 @@ // later version. // // Context functions provide additional information about where an event occurred. These functions can -//provide information such as a backtrace to where the event occured and the current register values for the +//provide information such as a backtrace to where the event occurred and the current register values for the //processor. // %{ -- cgit From a26d3d1f488dff1870b9783f0315adb4521a8b61 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Thu, 17 Sep 2009 17:33:47 -0400 Subject: Add task_backtrace systemtap function. --- tapset/context-unwind.stp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tapset/context-unwind.stp') diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp index 4ad45dba..33431fd0 100644 --- a/tapset/context-unwind.stp +++ b/tapset/context-unwind.stp @@ -47,6 +47,19 @@ function backtrace:string () %{ /* pure */ strlcpy (THIS->__retvalue, "", MAXSTRINGLEN); %} +/** + * sfunction task_backtrace - Hex backtrace of an arbitrary task + * @task: pointer to task_struct + * + * Return a string of hex addresses that are a backtrace of the + * stack of a particular task. Output may be truncated as per + * maximum string length. + */ +function task_backtrace:string (task:long) %{ /* pure */ + _stp_stack_snprint_tsk(THIS->__retvalue, MAXSTRINGLEN, + (struct task_struct *)(unsigned long)THIS->task, 0, MAXTRACE); +%} + /** * sfunction caller - Return name and address of calling function * -- cgit