From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 03034388B033; Fri, 8 May 2020 20:07:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03034388B033 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/25549] Systemtap unable to find many probe points available in code compiled with LTO enable Date: Fri, 08 May 2020 20:07:06 +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: 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: Fri, 08 May 2020 20:07:07 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25549 --- Comment #13 from William Cohen --- It took a bit longer to build similar binaries. binutils-2.31 doesn't compi= le on f32, Used binutils-2.34-2.fc32.src.rpm on f32 with gcc-10.0.1-0.14.fc32.x86_64 built the regular default binutil with: rpmbuild -ba binutils.spec The lto enabled one with rpmbuild --define "%optflags -flto -ffat-lto-objects -O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -Wp,-D_GLIBCXX_ASSERTIO= NS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=3D/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=3Dgeneric -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" -bi binutils.spec The ld binary is ld-new in the build. They have been placed in: http://people.redhat.com/wcohen/pr25549/binutils-2.34.base/gold/ld-new http://people.redhat.com/wcohen/pr25549/binutils-2.34.lto/gold/ld-new The results similar for these binaries to the earlier results with the patc= hed elfutils being used: [wcohen@fedora32 BUILD]$ stap -v -L 'process("./binutils-2.34.lto/gold/ld-new").statement("*@*:*")' |wc Pass 1: parsed user script and 502 library scripts using 442596virt/212504res/13092shr/199240data kb, in 470usr/110sys/582real ms. Pass 2: analyzed script: 19429 probes, 0 functions, 0 embeds, 0 globals usi= ng 540720virt/308324res/14024shr/297364data kb, in 6690usr/180sys/7011real ms. 19429 454247 8913840 [wcohen@fedora32 BUILD]$ stap -v -L 'process("./binutils-2.34.base/gold/ld-new").statement("*@*:*")' |wc Pass 1: parsed user script and 502 library scripts using 442596virt/212048res/12636shr/199240data kb, in 470usr/60sys/532real ms. Pass 2: analyzed script: 257942 probes, 0 functions, 0 embeds, 0 globals us= ing 1068956virt/838748res/13376shr/825600data kb, in 90030usr/10680sys/103013re= al ms. 257942 3926369 88009445 Part of the issue with the file might be due to the file names being mis-attributed in systemtap. I saw that in a number of places with the binutils-2.31 I was analyzing earliers. When comparing probe points for main.cc I noticed that there were a number of lines way pass the end of the= 332 line main.cc file. The "-v -L" option includes a PC location so I was able= to find various references to the same instruction: $ grep 3e9ec a process("/home/wcohen/rpmbuild/BUILDROOT/binutils-2.31.1-29.fc30_gcc_o2__g_= .x86_64/usr/bin/ld").statement("main@/usr/src/debug/binutils-2.31.1-29.fc30= _gcc_o2__g_.x86_64/gold/main.cc:1445") /* pc=3D.dynamic+0x3e9ec */ $args:string $errors:class Errors $command_line= :class Command_line $timer:class Timer $mapfile:class Mapfile* $workqueue:class Workqueue $input_objects:class Input_objects $gc:class Garbage_collection $icf:class Icf $symtab:class Symbol_table $layout:class Layout $search_path:class Dirsearch process("/home/wcohen/rpmbuild/BUILDROOT/binutils-2.31.1-29.fc30_gcc_o2__g_= .x86_64/usr/bin/ld").statement("main@/usr/src/debug/binutils-2.31.1-29.fc30= _gcc_o2__g_.x86_64/gold/main.cc:223") /* pc=3D.dynamic+0x3e9ec */ $args:string $errors:class Errors $command_line= :class Command_line $timer:class Timer $mapfile:class Mapfile* $workqueue:class Workqueue $input_objects:class Input_objects $gc:class Garbage_collection $icf:class Icf $symtab:class Symbol_table $layout:class Layout $search_path:class Dirsearch process("/home/wcohen/rpmbuild/BUILDROOT/binutils-2.31.1-29.fc30_gcc_o2__g_= .x86_64/usr/bin/ld").statement("set_gc@/usr/src/debug/binutils-2.31.1-29.fc= 30_gcc_o2__g_.x86_64/gold/symtab.h:1445") /* pc=3D.dynamic+0x3e9ec */ $this:class Symbol_table* const $gc:class Garbage_collection* process("/home/wcohen/rpmbuild/BUILDROOT/binutils-2.31.1-29.fc30_gcc_o2__g_= .x86_64/usr/bin/ld").statement("set_gc@/usr/src/debug/binutils-2.31.1-29.fc= 30_gcc_o2__g_.x86_64/gold/symtab.h:223") /* pc=3D.dynamic+0x3e9ec */ $this:class Symbol_table* const $gc:class Garbage_collection* Looking through the readelf --dump-debug=3Ddecodedline output it appears th= at readelf gets something reasonable: Looking at the output of readelf for above it look like uses first file name with view from last line number: ./main.cc:[++] main.cc 222 0x3e9e3 3 main.cc 223 0x3e9ec ./symtab.h:[++] symtab.h 1444 0x3e9ec 1 symtab.h 1445 0x3e9ec 2 symtab.h 1445 0x3e9ec 3 eu-readelf also looks reasonable: /usr/src/debug/binutils-2.31.1-29.fc30_gcc_o2__g_.x86_64/gold/main.cc (mt= ime: 0, length: 0) 222:3 0 0 0 +0x000000000003e9e3 223:5 S 0 0 0 +0x000000000003e9ec /usr/src/debug/binutils-2.31.1-29.fc30_gcc_o2__g_.x86_64/gold/symtab.h (mtime: 0, length: 0) 1444:3 S 0 0 0 +0x000000000003e9ec 1445:5 S 0 0 0 +0x000000000003e9ec 1445:15 0 0 0 +0x000000000003e9ec --=20 You are receiving this mail because: You are the assignee for the bug.=