This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/12471] Support wait4 *status printing
- From: "dsmith at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: Wed, 9 Feb 2011 17:45:23 +0000
- Subject: [Bug tapsets/12471] Support wait4 *status printing
- Auto-submitted: auto-generated
- References: <bug-12471-1110@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12471
--- Comment #3 from David Smith <dsmith at redhat dot com> 2011-02-09 17:45:12 UTC ---
(In reply to comment #2)
> (In reply to comment #1)
> > Perhaps adding a new variable called 'statusstr' or 'status_str' that just gets
> > the value of _wait_status_str() is a better idea.
>
> I used it before but such variable needs to be thread/SMP protected. There
> should be some primitives to have per_cpu() accessible from .stp.
Here's what I was suggesting:
probe syscall.wait4.return = kernel.function("sys_wait4").return
{
name = "wait4"
status_str = ($stat_addr == 0) ? "NULL"
: _wait_status_str(user_int($stat_addr))
retstr = return_str(1, $return)
}
> > We could also provide the user with WIFEXITED/WEXITSTATUS/etc. functions if
> > anyone thinks that would be a good idea.
>
> That decoding is provided by this patch, isn't it?
This patch provides the WIFEXITED/WEXITSTATUS data as a string. My thought
above was that we could provide functions like this:
function WTERMSIG:long(status:long) {
return (status & 0x7f)
}
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.