From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2415 invoked by alias); 11 Apr 2011 17:38:24 -0000 Received: (qmail 2404 invoked by uid 22791); 11 Apr 2011 17:38:21 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BJ X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Apr 2011 17:38:17 +0000 From: "fche at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/12663] New: statement probes on inlined-function-call sites: search .debug_line PLUS .debug_info 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: fche 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 Date: Mon, 11 Apr 2011 17:38: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-q2/txt/msg00066.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12663 Summary: statement probes on inlined-function-call sites: search .debug_line PLUS .debug_info Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator AssignedTo: systemtap@sourceware.org ReportedBy: fche@redhat.com By searching only .debug_line data, we miss some statement-probing opportunities. For example, on current rawhide, the lines corresponding to the function foo() cannot be selected for statement probing: 1 inline void foo () { 2 __asm__ __volatile__ ("nop"); 3 } 4 5 int main () { 6 int i = 0; 7 foo (); 8 i = 1; 9 foo (); 10 return i; 11 } % stap -L 'process("a.out").statement("*@foo.c:*")' process("/tmp/a.out").statement("foo@/tmp/foo.c:1") process("/tmp/a.out").statement("foo@/tmp/foo.c:2") process("/tmp/a.out").statement("foo@/tmp/foo.c:3") process("/tmp/a.out").statement("main@/tmp/foo.c:11") $i:int process("/tmp/a.out").statement("main@/tmp/foo.c:5") $i:int Note how foo.c:7 and foo.c:9 are missing. % objdump --dwarf=decodedline a.out foo.c 1 0x80483a0 foo.c 2 0x80483a3 foo.c 3 0x80483a4 foo.c 5 0x80483b0 foo.c 2 0x80483b3 foo.c 11 0x80483b5 whereas in the main .debug_info section: .... <2><64>: Abbrev Number: 6 (DW_TAG_inlined_subroutine) <65> DW_AT_abstract_origin: <0x25> <69> DW_AT_low_pc : 0x80483b3 <6d> DW_AT_high_pc : 0x80483b4 <71> DW_AT_call_file : 1 <72> DW_AT_call_line : 7 <2><73>: Abbrev Number: 6 (DW_TAG_inlined_subroutine) <74> DW_AT_abstract_origin: <0x25> <78> DW_AT_low_pc : 0x80483b4 <7c> DW_AT_high_pc : 0x80483b5 <80> DW_AT_call_file : 1 <81> DW_AT_call_line : 9 .... so we have line :9 info right there, along with DW_AT_low_pc values we could use to probe. Systemtap (in guru mode) is even willing to place a statement probe at those addresses. Let's let stap resolve such inlined-subroutine-calls for statement probes. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.