public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "tromey at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/13498] save-index makes gdb slow with dwarf4 Date: Mon, 20 Feb 2012 19:51:00 -0000 [thread overview] Message-ID: <bug-13498-4717-85nD29zfLD@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-13498-4717@http.sourceware.org/bugzilla/> http://sourceware.org/bugzilla/show_bug.cgi?id=13498 --- Comment #6 from Tom Tromey <tromey at redhat dot com> 2012-02-20 19:51:01 UTC --- (In reply to comment #5) > I think I concluded that this is not a localized problem in > dw2_map_symbol_filenames(), but a design problem with the gdb internal > structures. I had a patch for dw2_map_symbol_filenames() that would have worked > sufficiently for me for that one specific problem, but I went back to dwarf-2 > anyway, and IIRC I decided that larger changes were needed that I wasn't > feeling up to. What I did today is look at all the places where we iterate over all CUs and TUs when using the index. Then I went backward from here to find the callers and thus construct test cases that may exhibit bad behavior. Aside from map_symbol_filenames, which I've already fixed locally, there were only 2 such methods that could plausibly cause problems: map_symtabs_matching_filenames and expand_symtabs_matching. The former had a very bad performance bug in CVS HEAD: http://sourceware.org/ml/gdb-patches/2012-02/msg00409.html However, this is pretty new and I don't think it would have shown up in your tests :-( The test case for this one, with libooxlo.so is just: break numberformatsbuffer.cxx:100 In my testing, the latter is slower when type units are present, but not drastically so. The index speeds things up in both cases: Normal Index +-------+-------+ DW3 |0:07.61|0:01.76| +-------+-------+ DW4 |0:08.80|0:03.45| +-------+-------+ I plan to look into this one a bit more. The test case here is: info function CRYPTO > Specifically, I think I found the bottleneck to be > dwarf2_per_objfile->n_type_units being a large number in general that slows > down more operations than just the one specific example given. As I understand > it dwarf-2 had this number quite low, so it wasn't a problem, but dwarf-4 by > design causes the number to be much higher. Yes, in DWARF < 4, there are no type units. BTW you might wish to use -gdwarf-4 -fno-debug-types-section. This gets you some DWARF 4 benefits without type units; it should be a pure improvement over DWARF[23]. I'm definitely interested if you know of other specific things that are too slow. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
next prev parent reply other threads:[~2012-02-20 19:51 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-14 17:21 [Bug gdb/13498] New: " l.lunak at suse dot cz 2011-12-14 23:28 ` [Bug gdb/13498] " l.lunak at suse dot cz 2011-12-15 15:55 ` l.lunak at suse dot cz 2012-02-15 12:12 ` lionel at mamane dot lu 2012-02-16 11:00 ` mjw at redhat dot com 2012-02-17 21:48 ` tromey at redhat dot com 2012-02-17 21:52 ` tromey at redhat dot com 2012-02-20 13:51 ` l.lunak at suse dot cz 2012-02-20 19:51 ` tromey at redhat dot com [this message] 2012-02-20 19:55 ` tromey at redhat dot com 2012-02-20 20:57 ` cvs-commit at gcc dot gnu.org 2012-02-21 6:32 ` dje at google dot com 2012-02-21 18:17 ` l.lunak at suse dot cz 2012-07-08 19:35 ` dje at google dot com 2012-07-10 20:29 ` cvs-commit at gcc dot gnu.org 2023-12-31 13:08 ` ssbssa at sourceware dot org 2023-12-31 16:42 ` 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-13498-4717-85nD29zfLD@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).