summaryrefslogtreecommitdiffstats
path: root/tapset/context-unwind.stp
diff options
context:
space:
mode:
Diffstat (limited to 'tapset/context-unwind.stp')
-rw-r--r--tapset/context-unwind.stp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tapset/context-unwind.stp b/tapset/context-unwind.stp
index d6654d25..33431fd0 100644
--- a/tapset/context-unwind.stp
+++ b/tapset/context-unwind.stp
@@ -8,7 +8,7 @@
// later version.
// <tapsetdescription>
// 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.
// </tapsetdescription>
%{
@@ -48,6 +48,19 @@ function backtrace:string () %{ /* pure */
%}
/**
+ * 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
*
* Return the address and name of the calling function.