diff options
author | jistone <jistone> | 2005-12-12 22:19:12 +0000 |
---|---|---|
committer | jistone <jistone> | 2005-12-12 22:19:12 +0000 |
commit | a4578bd0c8fb4309742bef9afb4c9bf4c0ca75e9 (patch) | |
tree | 9ded478e19d7fb92de887d4afafbda048f0f29e3 | |
parent | 5a40a123097804b21c3677ef9acd380199fd9112 (diff) | |
download | systemtap-steved-a4578bd0c8fb4309742bef9afb4c9bf4c0ca75e9.tar.gz systemtap-steved-a4578bd0c8fb4309742bef9afb4c9bf4c0ca75e9.tar.xz systemtap-steved-a4578bd0c8fb4309742bef9afb4c9bf4c0ca75e9.zip |
2005-12-12 Josh Stone <joshua.i.stone@intel.com>
* tapset/context.stp (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid):
Removed in_interrupt checks and other pointer checks. We now operate on
the assumption that "current" and its related data are always valid.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | tapset/context.stp | 45 |
2 files changed, 15 insertions, 36 deletions
@@ -1,3 +1,9 @@ +2005-12-12 Josh Stone <joshua.i.stone@intel.com> + + * tapset/context.stp (execname,pid,tid,ppid,pexecname,gid,egid,uid,euid): + Removed in_interrupt checks and other pointer checks. We now operate on + the assumption that "current" and its related data are always valid. + 2005-12-12 Kevin Stafford <krstaffo@us.ibm.com> * main.cxx (main): Added arch directory to the existing kernel-version-sensitive search path. diff --git a/tapset/context.stp b/tapset/context.stp index 0075150d..56740db3 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -30,66 +30,39 @@ function backtrace:string () %{ %} function execname:string () %{ - if (unlikely(in_interrupt())) - strlcpy (THIS->__retvalue, "<unknown>", MAXSTRINGLEN); - else - strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN); + strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN); %} function pid:long () %{ - if (unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->tgid; + THIS->__retvalue = current->tgid; %} function tid:long () %{ - if (unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->pid; + THIS->__retvalue = current->pid; %} function ppid:long () %{ - if (unlikely(in_interrupt() || !current->parent)) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->parent->tgid; + THIS->__retvalue = current->parent->tgid; %} function pexecname:string () %{ - if(unlikely(in_interrupt() || !current->parent || !current->parent->comm)) - strlcpy (THIS->__retvalue, "<unknown>", MAXSTRINGLEN); - else - strlcpy (THIS->__retvalue, current->parent->comm, MAXSTRINGLEN); + strlcpy (THIS->__retvalue, current->parent->comm, MAXSTRINGLEN); %} function gid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->gid; + THIS->__retvalue = current->gid; %} function egid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->egid; + THIS->__retvalue = current->egid; %} function uid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->uid; + THIS->__retvalue = current->uid; %} function euid:long () %{ - if(unlikely(in_interrupt())) - THIS->__retvalue = 0; - else - THIS->__retvalue = current->euid; + THIS->__retvalue = current->euid; %} |