From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8937 invoked by alias); 13 Sep 2011 21:11:38 -0000 Received: (qmail 8927 invoked by uid 22791); 13 Sep 2011 21:11:37 -0000 X-SWARE-Spam-Status: No, hits=-2.8 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; Tue, 13 Sep 2011 21:11:24 +0000 From: "brolley at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/13187] New: Reconsider the semantics of process(number).thread.begin/end Date: Tue, 13 Sep 2011 21:11:00 -0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: brolley at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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-q3/txt/msg00326.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=13187 Bug #: 13187 Summary: Reconsider the semantics of process(number).thread.begin/end Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator AssignedTo: systemtap@sourceware.org ReportedBy: brolley@redhat.com CC: dsmith@redhat.com, fche@redhat.com Classification: Unclassified The current semantics of process(number).thread.begin and process(number).thread.end are to select threads with the given task id and to fire probes as these threads begin and end respectively. While this is logical, given the internal semantics of process(number).begin and process(number).end, which fire probes at the corresponding beginning and end of the main threads of a process, it is not very useful. This is because the task ids of individual threads within a process are difficult, if not impossible, to predict in advance. The result is that these probes serve no reasonably useful purpose. The difference, which makes process(number).begin and process(number).end useful is that, for these probes, the task id matches the process id, which is easily obtained by the user. Other variants of thread.begin and thread.end are useful because of additional semantics: - process("PATH").thread.begin and process("path").thread.end fire at the beginning and end of each child thread of processes corresponding to the given path. From a user's point of view this represents all child threads beginning and ending within the processes associated with that path. - the commands stap -e 'process.thread.begin {}' -c PATH and stap -e 'process.thread.end {} -c PATH have a similar effect with the firing of the probes at the beginning and end of each child thread within the process started by running the executable at PATH. Once again, from the user's point of view, this represents all child threads beginning and ending within that process. So, when a user wants to probe the same thing against an already-running process, it would seem reasonable that process(PID).thread.begin and process(PID).thread.end might do the same thing. That is, fire at the beginning and end of each child thread within the process PID. After all, she has simply substituted the process ID for the path used in the previous examples. In other words, she has attempted to identify the target process(es) in a different manner. However, for a running process, these probes will currently never fire, because the task ids of the child threads do not match the given process id. I propose that the process(PID).thread.begin and process(PID).thread.end probes assume the same semantics as the other thread.begin and thread.end variants by firing at the beginning and end of the child threads of the given process as the other variants do. That is these probes should adopt the same "follow all children" semantics as the other variants. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.