diff options
Diffstat (limited to 'tapset')
-rw-r--r-- | tapset/ChangeLog | 7 | ||||
-rw-r--r-- | tapset/context.stp | 8 | ||||
-rw-r--r-- | tapset/task.stp | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog index b1862324..670f3255 100644 --- a/tapset/ChangeLog +++ b/tapset/ChangeLog @@ -1,3 +1,10 @@ +2008-07-09 Mark Wielaard <mwielaard@redhat.com> + + PR 6732 + * context.stp (ppid): Use STAPCONF_REAL_PARENT. + (pexecname): Likewise. + * task.stp (task_parent): Likewise. + 2008-07-01 Wenji Huang <wenji.huang@oracle.com> * vfs.stp : Make _vfs.generic_commit_write only for kernel<=2.6.25 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 */ diff --git a/tapset/task.stp b/tapset/task.stp index d89729e8..9215e83f 100644 --- a/tapset/task.stp +++ b/tapset/task.stp @@ -23,7 +23,11 @@ function task_current:long () %{ /* pure */ // Return the parent task_struct of the given task function task_parent:long (task:long) %{ /* pure */ struct task_struct *t = (struct task_struct *)(long)THIS->task; +#if defined(STAPCONF_REAL_PARENT) + THIS->__retvalue = (long)kread(&(t->real_parent)); +#else THIS->__retvalue = (long)kread(&(t->parent)); +#endif CATCH_DEREF_FAULT(); %} |