From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F39F387085C; Thu, 7 May 2020 13:58:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F39F387085C 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: Thu, 07 May 2020 13:58:30 +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: Thu, 07 May 2020 13:58:30 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25549 --- Comment #8 from William Cohen --- I locally built a elfutils-0.179-2.fc30.src.rpm with the proposed patch and installed the resulting rpms. The patch does make things work better. For the simple reproducer: [wcohen@cervelo BUILDROOT]$ stap -L 'process("./pr25549").statement("main@*:*")' process("/home/wcohen/rpmbuild/BUILDROOT/pr25549").statement("main@/home/wc= ohen/rpmbuild/BUILDROOT/pr25549.cxx:4") $argc:int $argv:char** process("/home/wcohen/rpmbuild/BUILDROOT/pr25549").statement("main@/home/wc= ohen/rpmbuild/BUILDROOT/pr25549.cxx:6") $argc:int $argv:char** [wcohen@cervelo BUILDROOT]$ stap -L 'process("./pr25549.lto").statement("main@*:*")' process("/home/wcohen/rpmbuild/BUILDROOT/pr25549.lto").statement("main@/hom= e/wcohen/rpmbuild/BUILDROOT/pr25549.cxx:4") $argc:int $argv:char** process("/home/wcohen/rpmbuild/BUILDROOT/pr25549.lto").statement("main@/hom= e/wcohen/rpmbuild/BUILDROOT/pr25549.cxx:6") $argc:int $argv:char** For the original example that caused the PR to be filed there are many more probe (21694 vs 1196) for the lto version, but still an order of magnitude = less than the non-lto version (255842): [wcohen@cervelo BUILDROOT]$ stap -v -L 'process("./binutils-2.31.1-29.fc30_gcc_o2_lto_g_.x86_64/usr/bin/ld").state= ment("*@*:*")' |wc Pass 1: parsed user script and 577 library scripts using 1279164virt/1049920res/13264shr/1036408data kb, in 2230usr/260sys/2499real = ms. Pass 2: analyzed script: 21694 probes, 0 functions, 0 embeds, 0 globals usi= ng 2078028virt/1843376res/14204shr/1835272data kb, in 11060usr/270sys/11552real ms. 21694 477333 10389959 [wcohen@cervelo BUILDROOT]$ stap -v -L 'process("./binutils-2.31.1-29.fc30_gcc_o2__g_.x86_64/usr/bin/ld").statemen= t("*@*:*")' |wc Pass 1: parsed user script and 577 library scripts using 1279164virt/1049904res/13252shr/1036408data kb, in 2170usr/270sys/2459real = ms. Pass 2: analyzed script: 255842 probes, 0 functions, 0 embeds, 0 globals us= ing 1958204virt/1729244res/14192shr/1715448data kb, in 90860usr/10320sys/101800= real ms. 255842 3891737 96145934 It would be expected that the lto version would be optimized so there are f= ewer probe points, but 90% reduction in probe points seems unlikely given the relative sizes of the binaries: [wcohen@cervelo BUILDROOT]$ ls -l ./binutils-2.31.1-29.fc30_gcc_o2__g_.x86_64/usr/bin/ld -rwxr-xr-x. 2 wcohen wcohen 3941264 Oct 14 2019 ./binutils-2.31.1-29.fc30_gcc_o2__g_.x86_64/usr/bin/ld [wcohen@cervelo BUILDROOT]$ ls -l ./binutils-2.31.1-29.fc30_gcc_o2_lto_g_.x86_64/usr/bin/ld -rwxr-xr-x. 2 wcohen wcohen 2215376 Oct 14 2019 ./binutils-2.31.1-29.fc30_gcc_o2_lto_g_.x86_64/usr/bin/ld --=20 You are receiving this mail because: You are the assignee for the bug.=