Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Bernd Edlinger <bernd.edlinger@hotmail.de>,
	Simon Marchi <simon.marchi@polymtl.ca>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/symtab] Ignore cold clones
Date: Tue, 1 Jun 2021 13:33:26 +0200	[thread overview]
Message-ID: <7e939933-5689-d7d0-229d-a50474ba283c@suse.de> (raw)
In-Reply-To: <AM8PR10MB4708208B62BB3E86FD9E7635E43E9@AM8PR10MB4708.EURPRD10.PROD.OUTLOOK.COM>

On 6/1/21 7:18 AM, Bernd Edlinger wrote:
> So, I did a gcc lto-bootstrap over night with the current trunk version,
> and got these symbols in cc1:
> 
> $ nm cc1|grep do_rpo_vn
> 0000000000fb9a70 T _Z9do_rpo_vnP8functionP8edge_defP11bitmap_head
> 0000000000fb7a40 t _ZL9do_rpo_vnP8functionP8edge_defP11bitmap_headbb.lto_priv.0
> 0000000000719052 t _ZL9do_rpo_vnP8functionP8edge_defP11bitmap_headbb.lto_priv.0.cold
> 
> does your patch handle these?

It does.

Demangled we have:
...
$ c++filt _ZL9do_rpo_vnP8functionP8edge_defP11bitmap_headbb.lto_priv.0.cold
do_rpo_vn(function*, edge_def*, bitmap_head*, bool, bool) [clone
.lto_priv.0] [clone .cold]
...

I build gdb using gcc-11 and -O2 -flto=auto, and found a similar simbol:
...
$ nm -C gdb.lto | grep " init_syscalls_info"
0000000000878a10 T init_syscalls_info(gdbarch*) [clone .lto_priv.0]
0000000000436d19 t init_syscalls_info(gdbarch*) [clone .lto_priv.0] \
                     [clone .cold]
...

With the patch, I have:
...
$ gdb -q -batch ./gdb.lto -ex "b init_syscalls_info" -ex "info break"
Breakpoint 1 at 0x878a10: file xml-syscall.c, line 338.
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x0000000000878a10 in
init_syscalls_info(gdbarch*) at xml-syscall.c:338
...
and without:
...
$ gdb -q -batch ./gdb.lto -ex "b init_syscalls_info" -ex "info break"
Breakpoint 1 at 0x436d19: init_syscalls_info. (2 locations)
Num     Type           Disp Enb Address
1       breakpoint     keep y   <MULTIPLE>
1.1                         y   0x0000000000436d19
1.2                         y   0x0000000000878a10
...

Thanks,
- Tom

  reply	other threads:[~2021-06-01 11:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 14:15 Tom de Vries
2021-05-31 14:26 ` Simon Marchi via Gdb-patches
2021-05-31 14:59   ` Tom de Vries
2021-05-31 16:54     ` Bernd Edlinger
2021-06-01  5:18       ` Bernd Edlinger
2021-06-01 11:33         ` Tom de Vries [this message]
2021-06-01 13:23       ` Tom de Vries

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=7e939933-5689-d7d0-229d-a50474ba283c@suse.de \
    --to=tdevries@suse.de \
    --cc=bernd.edlinger@hotmail.de \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    /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