summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorjistone <jistone>2005-12-12 22:19:12 +0000
committerjistone <jistone>2005-12-12 22:19:12 +0000
commita4578bd0c8fb4309742bef9afb4c9bf4c0ca75e9 (patch)
tree9ded478e19d7fb92de887d4afafbda048f0f29e3 /tapset
parent5a40a123097804b21c3677ef9acd380199fd9112 (diff)
downloadsystemtap-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.
Diffstat (limited to 'tapset')
-rw-r--r--tapset/context.stp45
1 files changed, 9 insertions, 36 deletions
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;
%}