From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19875 invoked by alias); 9 Feb 2011 17:45:29 -0000 Received: (qmail 19847 invoked by uid 22791); 9 Feb 2011 17:45:28 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Feb 2011 17:45:24 +0000 From: "dsmith at redhat dot com" To: systemtap@sources.redhat.com Subject: [Bug tapsets/12471] Support wait4 *status printing X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: tapsets X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dsmith at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sources dot redhat.com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 09 Feb 2011 17:45:00 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q1/txt/msg00228.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12471 --- Comment #3 from David Smith 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.