summaryrefslogtreecommitdiffstats
path: root/tapset/context.stp
diff options
context:
space:
mode:
authorMark Wielaard <mwielaard@redhat.com>2008-07-09 17:14:01 +0200
committerMark Wielaard <mwielaard@redhat.com>2008-07-09 17:18:23 +0200
commit25814e6c66b461380bbc9ef8fa263c868983efa6 (patch)
tree5efb7462e9561d2724a85a148e2feb0eb69dc567 /tapset/context.stp
parent07bd3b82ab643ba1f889c07132074dd0cd8c2d1d (diff)
downloadsystemtap-steved-25814e6c66b461380bbc9ef8fa263c868983efa6.tar.gz
systemtap-steved-25814e6c66b461380bbc9ef8fa263c868983efa6.tar.xz
systemtap-steved-25814e6c66b461380bbc9ef8fa263c868983efa6.zip
Fix PR 6732: Add runtime/autoconf-real-parent.c check for task_struct field.
Diffstat (limited to 'tapset/context.stp')
-rw-r--r--tapset/context.stp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tapset/context.stp b/tapset/context.stp
index 10c52226..017c934c 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -41,11 +41,19 @@ function tid:long () %{ /* pure */
%}
function ppid:long () %{ /* pure */
+#if defined(STAPCONF_REAL_PARENT)
+ THIS->__retvalue = current->real_parent->tgid;
+#else
THIS->__retvalue = current->parent->tgid;
+#endif
%}
function pexecname:string () %{ /* pure */
+#if defined(STAPCONF_REAL_PARENT)
+ strlcpy (THIS->__retvalue, current->real_parent->comm, MAXSTRINGLEN);
+#else
strlcpy (THIS->__retvalue, current->parent->comm, MAXSTRINGLEN);
+#endif
%}
function gid:long () %{ /* pure */