public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-25549-6586-rKtIOYo2QQ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25549-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=25549

--- Comment #8 from William Cohen <wcohen at redhat dot com> ---
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/wcohen/rpmbuild/BUILDROOT/pr25549.cxx:4")
$argc:int $argv:char**
process("/home/wcohen/rpmbuild/BUILDROOT/pr25549").statement("main@/home/wcohen/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@/home/wcohen/rpmbuild/BUILDROOT/pr25549.cxx:4")
$argc:int $argv:char**
process("/home/wcohen/rpmbuild/BUILDROOT/pr25549.lto").statement("main@/home/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").statement("*@*:*")'
|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 using
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").statement("*@*:*")'
|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 using
1958204virt/1729244res/14192shr/1715448data kb, in 90860usr/10320sys/101800real
ms.
 255842 3891737 96145934

It would be expected that the lto version would be optimized so there are fewer
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2020-05-07 13:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 15:40 [Bug translator/25549] New: " wcohen at redhat dot com
2020-05-01 18:31 ` [Bug translator/25549] " wcohen at redhat dot com
2020-05-04 20:18 ` wcohen at redhat dot com
2020-05-05 15:41 ` wcohen at redhat dot com
2020-05-05 20:49 ` woodard at redhat dot com
2020-05-07  2:06 ` fche at redhat dot com
2020-05-07  3:26 ` mark at klomp dot org
2020-05-07 10:27 ` fche at redhat dot com
2020-05-07 10:28 ` fche at redhat dot com
2020-05-07 11:36 ` mark at klomp dot org
2020-05-07 13:58 ` wcohen at redhat dot com [this message]
2020-05-07 17:55 ` wcohen at redhat dot com
2020-05-08 10:15 ` mark at klomp dot org
2020-05-08 14:02 ` wcohen at redhat dot com
2020-05-08 17:25 ` mark at klomp dot org
2020-05-08 20:07 ` wcohen at redhat dot com
2020-07-10  3:00 ` fche at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-25549-6586-rKtIOYo2QQ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).