From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5943 invoked by alias); 14 Nov 2007 21:29:11 -0000 Received: (qmail 5925 invoked by uid 22791); 14 Nov 2007 21:29:09 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Nov 2007 21:29:06 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAELT4Rl029198; Wed, 14 Nov 2007 16:29:04 -0500 Received: from pobox-3.corp.redhat.com (pobox-3.corp.redhat.com [10.11.255.67]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAELT4J4013623; Wed, 14 Nov 2007 16:29:04 -0500 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.yyz.redhat.com [10.15.16.9]) by pobox-3.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAELSeQ9019266; Wed, 14 Nov 2007 16:29:04 -0500 Received: from ton.toronto.redhat.com (ton.yyz.redhat.com [10.15.16.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id BA3378001FF; Wed, 14 Nov 2007 16:28:23 -0500 (EST) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id lAELS7qJ023742; Wed, 14 Nov 2007 16:28:07 -0500 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id lAELRvNM023736; Wed, 14 Nov 2007 16:27:57 -0500 X-Authentication-Warning: ton.toronto.redhat.com: fche set sender to fche@redhat.com using -f To: dcnltc@us.ibm.com Cc: systemtap@sourceware.org Subject: Re: user instruction tracing patch? References: <4739E5C2.80206@us.ibm.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Wed, 14 Nov 2007 21:29:00 -0000 In-Reply-To: <4739E5C2.80206@us.ibm.com> (Dave Nomura's message of "Tue, 13 Nov 2007 09:58:26 -0800") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2007-q4/txt/msg00338.txt.bz2 Dave Nomura writes: > Have you had a chance to review the user instruction tracing patch I > re-posted on 11/1? Thanks for demonstrating the implementation as something layered nicely on top of utrace. (Sorry for not collecting my notes earlier.) In order to integrate this facility nicely into systemtap, it should be integrated as a first class probe point syntax. You suggested: probe usr_itrace.single_step probe usr_itrace.block_step but that's rather unspecific (particularly: which processes to probe?). So, here's a possibly better way. The script-side interface would look like: probe process(PID).itrace { } probe process(PID).btrace { } # block trace probe process(NAME).itrace { } probe process(NAME).btrace { } The name variant could be implemented by a startup-time mapping of execname->pid. There's probably a utrace hook that will let us be notified of execs, so that we can keep the mapping up-to-date during run time. Since utrace will provide the pt_regs structure, the probe handler bodies will be able to call e.g. backtrace(), probefunc(), and really should have some structured access to the registers (a new tapset function like register:long ("name") ?) It's also a bit risky to expose the on/off functionality as explicit functions (though an end-user script or tapset could be more assured of proper cleanup using "probe end,error {...}".) But of course it's desirable to turn things on/off dynamically, so how? A special case of bug #4935 might be the ticket, once that is complete: probe process(PID).itrace if (condition) { } probe process(PID).function("NAME") { condition = 1 } probe process(PID).function("NAME").return { condition = 0 } (The .function("NAME") stuff is of course waiting for symbolic user-space probing support, in progress separately.) It seems like with these three separate bits of incoming functions (itrace, on-the-fly probe on/off, user-space probes), we should get a comfortable user experience. - FChE