summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Cohen <wcohen@dhcp231-201.rdu.redhat.com>2009-09-17 17:33:47 -0400
committerWilliam Cohen <wcohen@dhcp231-201.rdu.redhat.com>2009-09-17 17:33:47 -0400
commita26d3d1f488dff1870b9783f0315adb4521a8b61 (patch)
treec0602847e0396e76fc5888945448d753c4651708
parentb26b743d2ea6969713d0c69849acccffd9332d9d (diff)
downloadsystemtap-steved-a26d3d1f488dff1870b9783f0315adb4521a8b61.tar.gz
systemtap-steved-a26d3d1f488dff1870b9783f0315adb4521a8b61.tar.xz
systemtap-steved-a26d3d1f488dff1870b9783f0315adb4521a8b61.zip
Add task_backtrace systemtap function.
-rw-r--r--tapset/context-unwind.stp13
1 files changed, 13 insertions, 0 deletions
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
@@ -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.