diff options
author | fche <fche> | 2005-11-09 17:08:19 +0000 |
---|---|---|
committer | fche <fche> | 2005-11-09 17:08:19 +0000 |
commit | 61df7c736e8d2388b4236b4eb8eaf32ab09d3cf7 (patch) | |
tree | 85d4beaac5ff07d833d02fa171b6c54a38aab026 /tapset/context.stp | |
parent | 549b9c3b29bafc954f097ff7cca83e979c52751e (diff) | |
download | systemtap-steved-61df7c736e8d2388b4236b4eb8eaf32ab09d3cf7.tar.gz systemtap-steved-61df7c736e8d2388b4236b4eb8eaf32ab09d3cf7.tar.xz systemtap-steved-61df7c736e8d2388b4236b4eb8eaf32ab09d3cf7.zip |
2005-11-09 Frank Ch. Eigler <fche@elastic.org>
Reported by Guang Lei Li <liguangl@cn.ibm.com>:
* tapset/context.stp (pid,ppid,tid): Correctly pick tgid vs pid.
* testsuite/buildok/context_test.stp: Print out tid() too.
Diffstat (limited to 'tapset/context.stp')
-rw-r--r-- | tapset/context.stp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tapset/context.stp b/tapset/context.stp index 81604d83..0075150d 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -40,14 +40,21 @@ function pid:long () %{ if (unlikely(in_interrupt())) THIS->__retvalue = 0; else - THIS->__retvalue = current->pid; + THIS->__retvalue = current->tgid; +%} + +function tid:long () %{ + if (unlikely(in_interrupt())) + THIS->__retvalue = 0; + else + THIS->__retvalue = current->pid; %} function ppid:long () %{ if (unlikely(in_interrupt() || !current->parent)) THIS->__retvalue = 0; else - THIS->__retvalue = current->parent->pid; + THIS->__retvalue = current->parent->tgid; %} function pexecname:string () %{ |