From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13479 invoked by alias); 14 Nov 2019 21:36:41 -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 Received: (qmail 13406 invoked by uid 48); 14 Nov 2019 21:36:36 -0000 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/25193] New: Incorrect reporting of line information for stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")' Date: Thu, 14 Nov 2019 21:36: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-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q4/txt/msg00043.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25193 Bug ID: 25193 Summary: Incorrect reporting of line information for stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")' Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: wcohen at redhat dot com Target Milestone: --- The mechanism determining the line number from the debuginfo is getting the line information incorrect. This was observed on Fedora 30 with binutils-2.31.1-29.fc30.x86_64: stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")' Provides a huge number of statements at line 128 for different files. It t= urns out this is due to gcc c++ compiler inlining line 128 from /usr/include/c++/9/ext/new_allocator.h in many different places. The line = 128 makes sense for the new_allocator.h head file but not for the other stateme= nt probe points at the same instruction: process("/usr/bin/ld.gold").statement("Abbrev_code@/usr/src/debug/binutils-= 2.31.1-29.fc30.x86_64/gold/dwarf_reader.h:128") /* pc=3D.dynamic+0x189925 */ $this:struct Abbrev_code* const process("/usr/bin/ld.gold").statement("_M_deallocate@/usr/include/c++/9/bit= s/stl_vector.h:128") /* pc=3D.dynamic+0x189925 */ $this:struct _Vector_base >* const $__n:size_t $__p:pointer process("/usr/bin/ld.gold").statement("deallocate@/usr/include/c++/9/bits/a= lloc_traits.h:128") /* pc=3D.dynamic+0x189925 */ $__a:allocator_type& $__n:size_type $__p:point= er process("/usr/bin/ld.gold").statement("deallocate@/usr/include/c++/9/ext/ne= w_allocator.h:128") /* pc=3D.dynamic+0x189925 */ $this:class new_allocator* const $__p:pointer process("/usr/bin/ld.gold").statement("do_get_abbrev@/usr/src/debug/binutil= s-2.31.1-29.fc30.x86_64/gold/dwarf_reader.cc:128") /* pc=3D.dynamic+0x189925 */ $len:size_t $nextcode:uint64_t $this:class Dwarf_abbrev_table* const $code:unsigned int process("/usr/bin/ld.gold").statement("reserve@/usr/include/c++/9/bits/vect= or.tcc:128") /* pc=3D.dynamic+0x189925 */ $__old_size:size_type const $__tmp:pointer $__n:size_type $this:class vector >* const According to "readelf --wide -wLK=20 /usr/lib/debug/usr/bin/ld.gold-2.31.1-29.fc30.x86_64.debug" it maps to the following: /usr/include/c++/9/bits/alloc_traits.h: alloc_traits.h 469 0x189925 /usr/include/c++/9/ext/new_allocator.h: new_allocator.h 119 0x189925 1 new_allocator.h 128 0x189925 2 It appears that stap is always using the last view's line number information regardless of the view.=20 fche suggested that the problem might be in tapsets.cxx:query_srcfile_line. --=20 You are receiving this mail because: You are the assignee for the bug.