From 25814e6c66b461380bbc9ef8fa263c868983efa6 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 9 Jul 2008 17:14:01 +0200 Subject: Fix PR 6732: Add runtime/autoconf-real-parent.c check for task_struct field. --- tapset/context.stp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tapset/context.stp') 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 */ -- cgit