From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 763E93948494; Tue, 12 May 2020 18:18:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 763E93948494 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/25193] Incorrect reporting of line information for stap -v -L 'process("/usr/bin/ld.gold").statement("*@*:*")' Date: Tue, 12 May 2020 18:18:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: attachments.created Message-ID: In-Reply-To: References: 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-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 18:18:23 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25193 --- Comment #1 from William Cohen --- Created attachment 12526 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D12526&action=3Ded= it Much smaller reproduer example with multiple line views for the same instruction multiple_views.cc is a much smaller reproducer which systemtap generates ve= ry odd list of probe points for individual instructions. $ rpm -q gcc systemtap elfutils gcc-10.1.1-1.fc32.x86_64 systemtap-4.3-1.202005111542.fc32.x86_64 elfutils-0.179-2.fc32pr25549.x86_64 $ g++ -g -O2 -o multiple_views multiple_views.cc $stap -v -L 'process("./multiple_views").statement("*@*:*")' >& multiple_views.stap_out $ cat multiple_views.stap_out |grep -o -e 'pc=3D.absolute+0x[[:alnum:]]\+' = |sort |uniq -c |sort -nr|more 14 pc=3D.absolute+0x10ef 7 pc=3D.absolute+0x10e6 7 pc=3D.absolute+0x10dd 5 pc=3D.absolute+0x10d8 5 pc=3D.absolute+0x10c1 5 pc=3D.absolute+0x10b8 4 pc=3D.absolute+0x10fd 3 pc=3D.absolute+0x10cf 2 pc=3D.absolute+0x10f3 2 pc=3D.absolute+0x10e1 2 pc=3D.absolute+0x10b0 1 pc=3D.absolute+0x1105 1 pc=3D.absolute+0x10c0 There are a lot of probes (14) on 0x10ef. Look at the "readelf --debug-dump=3Ddecodedline multiple_views" for the 0x10ef instruction there= are 6 views: /usr/include/c++/10/bits/basic_string.h: basic_string.h 214 0x4010dd=20=20= =20=20=20=20=20=20=20=20=20 x basic_string.h 182 0x4010dd = 1=20=20=20 x basic_string.h 187 0x4010dd 2 basic_string.h 6463 0x4010e1=20=20= =20=20=20=20=20=20 basic_string.h 183 0x4010e6=20=20= =20=20=20=20=20=20 basic_string.h 183 0x4010ef=20=20= =20=20=20=20=20=20 basic_string.h 186 0x4010ef = 1=20=20=20 x basic_string.h 186 0x4010ef 2 /usr/include/c++/10/bits/char_traits.h: char_traits.h 321 0x4010ef = 3=20=20=20 x char_traits.h 322 0x4010ef = 4=20=20=20 x char_traits.h 322 0x4010ef 5 char_traits.h 322 0x4010f3=20=20= =20=20=20=20=20=20 Sorting by line number makes it a bit more obvious that systemtap is getting something wrong as it is very unlikely that multiple files would end up hav= ing the same line number for the same instruction: $ grep 0x10ef multiple_views.stap_out |sort -t: -k2n process("/home/wcohen/multiple_views").statement("assign@/usr/include/c++/1= 0/bits/char_traits.h:186") /* pc=3D.absolute+0x10ef */ $__c1:char_type& process("/home/wcohen/multiple_views").statement("basic_string@/usr/include= /c++/10/bits/basic_string.h:186") /* pc=3D.absolute+0x10ef */ $__s:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("main@/home/wcohen/multipl= e_views.cc:186") /* pc=3D.absolute+0x10ef */ $argc:int $argv:char** $a:string process("/home/wcohen/multiple_views").statement("_M_construct_aux@/usr/include/c++/10/bits/basic_string.h:186") /* pc=3D.absolute+0x1= 0ef */ $__end:char const* $__beg:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("_M_construct@/usr/include/c++/10/bits/basic_string.h:186") /* pc=3D.absolute+0x1= 0ef */ $__end:char const* $__beg:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("_M_construct@/usr/include/c++/10/bits/basic_string.tcc:186") /* pc=3D.absolute+0= x10ef */ $__dnew:size_type $__end:char const* $__beg:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("_M_set_length@/usr/includ= e/c++/10/bits/basic_string.h:186") /* pc=3D.absolute+0x10ef */ $__n:size_type $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("assign@/usr/include/c++/1= 0/bits/char_traits.h:322") /* pc=3D.absolute+0x10ef */ $__c1:char_type& process("/home/wcohen/multiple_views").statement("basic_string@/usr/include= /c++/10/bits/basic_string.h:322") /* pc=3D.absolute+0x10ef */ $__s:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("main@/home/wcohen/multipl= e_views.cc:322") /* pc=3D.absolute+0x10ef */ $argc:int $argv:char** $a:string process("/home/wcohen/multiple_views").statement("_M_construct_aux@/usr/include/c++/10/bits/basic_string.h:322") /* pc=3D.absolute+0x1= 0ef */ $__end:char const* $__beg:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("_M_construct@/usr/include/c++/10/bits/basic_string.h:322") /* pc=3D.absolute+0x1= 0ef */ $__end:char const* $__beg:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("_M_construct@/usr/include/c++/10/bits/basic_string.tcc:322") /* pc=3D.absolute+0= x10ef */ $__dnew:size_type $__end:char const* $__beg:char const* $this:class basic_string, std::allocator >* const process("/home/wcohen/multiple_views").statement("_M_set_length@/usr/includ= e/c++/10/bits/basic_string.h:322") /* pc=3D.absolute+0x10ef */ $__n:size_type $this:class basic_string, std::allocator >* const --=20 You are receiving this mail because: You are the assignee for the bug.=