public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug macros/27754] Excessive CPU load and memory usage with -g3 debug info Date: Wed, 12 May 2021 20:37:43 +0000 [thread overview] Message-ID: <bug-27754-4717-PakBH0lEva@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27754-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27754 Simon Marchi <simark at simark dot ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #13 from Simon Marchi <simark at simark dot ca> --- I am encountering something similar, although I don't use LTO. My symptom is that when I do "thread apply all bt", there's a noticeable pause of 2-3 seconds between each thread. I added a bit of logging, that time is spent expanding a single CU. I profiled, and all that time is spent in dwarf_decode_macros. I'll attach a binary (lt-lttng-sessiond). I am experimenting with: $ ./gdb --data-directory=data-directory -nx /home/simark/build/lttng-tools-noasan/src/bin/lttng-sessiond/.libs/lt-lttng-sessiond -ex "maint expand register.c" -batch Which expands the CU at 0x6a1c9. That reads the macros at 0x2919d in .debug_macro. Here are the first few lines: DW_MACRO_import - offset : 0x0 DW_MACRO_start_file - lineno: 0 filenum: 9 filename: /home/simark/src/lttng-tools/src/bin/lttng-sessiond/register.c DW_MACRO_start_file - lineno: 0 filenum: 41 filename: /usr/include/stdc-predef.h DW_MACRO_import - offset : 0x0 DW_MACRO_end_file DW_MACRO_start_file - lineno: 0 filenum: 42 filename: ../../../include/config.h DW_MACRO_import - offset : 0x0 DW_MACRO_end_file DW_MACRO_start_file - lineno: 10 filenum: 10 filename: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/stddef.h DW_MACRO_import - offset : 0x0 DW_MACRO_end_file DW_MACRO_start_file - lineno: 11 filenum: 43 filename: /usr/include/stdlib.h DW_MACRO_define_strp - lineno : 24 macro : __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION DW_MACRO_start_file - lineno: 25 filenum: 44 filename: /usr/include/bits/libc-header-start.h DW_MACRO_undef_strp - lineno : 31 macro : __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION DW_MACRO_start_file - lineno: 33 filenum: 45 filename: /usr/include/features.h DW_MACRO_import - offset : 0x0 DW_MACRO_start_file - lineno: 473 filenum: 46 filename: /usr/include/sys/cdefs.h DW_MACRO_import - offset : 0x0 DW_MACRO_start_file - lineno: 462 filenum: 47 filename: /usr/include/bits/wordsize.h DW_MACRO_import - offset : 0x0 DW_MACRO_end_file DW_MACRO_start_file - lineno: 463 filenum: 48 filename: /usr/include/bits/long-double.h ... The imports at offset 0 look wrong. First, there are a ton of them, one at pretty much every included file. But also because the macro informations at offset 0 in .debug_macro are those of a totally unrelated CU. When I check the relocations in the corresponding .o, I do see: Relocation section '.rela.debug_macro' at offset 0x25cb0 contains 412 entries: Offset Info Type Symbol's Value Symbol's Name + Addend 0000000000000003 0000002b0000000a R_X86_64_32 0000000000000000 .debug_line + 0 0000000000000008 0000002d0000000a R_X86_64_32 0000000000000000 .debug_macro + 0 0000000000000013 0000002e0000000a R_X86_64_32 0000000000000000 .debug_macro + 0 000000000000001c 0000002f0000000a R_X86_64_32 0000000000000000 .debug_macro + 0 0000000000000025 000000300000000a R_X86_64_32 0000000000000000 .debug_macro + 0 So the relocations are really asking for ".debug_macro + 0". -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-05-12 20:37 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-19 16:03 [Bug gdb/27754] New: " rdiezmail-binutils at yahoo dot de 2021-04-19 16:04 ` [Bug gdb/27754] " rdiezmail-binutils at yahoo dot de 2021-04-19 17:02 ` dblaikie at gmail dot com 2021-04-19 17:07 ` psmith at gnu dot org 2021-04-23 18:38 ` tromey at sourceware dot org 2021-04-23 18:56 ` tromey at sourceware dot org 2021-04-23 20:31 ` rdiezmail-binutils at yahoo dot de 2021-04-23 20:52 ` dblaikie at gmail dot com 2021-05-06 11:13 ` rguenth at gcc dot gnu.org 2021-05-06 11:45 ` rdiezmail-binutils at yahoo dot de 2021-05-06 12:34 ` rdiezmail-binutils at yahoo dot de 2021-05-10 14:27 ` [Bug macros/27754] " tromey at sourceware dot org 2021-05-10 14:51 ` tromey at sourceware dot org 2021-05-10 20:30 ` tromey at sourceware dot org 2021-05-11 8:15 ` rguenth at gcc dot gnu.org 2021-05-11 8:19 ` jakub at redhat dot com 2021-05-12 20:37 ` simark at simark dot ca [this message] 2021-05-12 20:38 ` simark at simark dot ca 2021-05-13 17:20 ` tromey at sourceware dot org 2021-05-13 17:26 ` jakub at redhat dot com 2021-05-13 17:31 ` simark at simark dot ca 2021-12-21 21:25 ` rdiezmail-binutils at yahoo dot de 2021-12-21 21:26 ` rdiezmail-binutils at yahoo dot de 2021-12-22 20:27 ` ssbssa at sourceware dot org 2021-12-23 2:48 ` simark at simark dot ca 2021-12-23 16:36 ` ssbssa at sourceware dot org 2022-10-25 16:16 ` tromey at sourceware dot org 2022-10-25 16:16 ` tromey at sourceware dot org 2022-10-25 16:19 ` tromey at sourceware dot org 2022-10-25 16:43 ` rdiezmail-binutils at yahoo dot de 2022-10-25 16:58 ` rajpal.gusain at gmail dot com 2022-11-17 20:04 ` pedro at palves dot net 2022-11-18 2:24 ` tromey at sourceware dot org
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-27754-4717-PakBH0lEva@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).