This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/2] Demangler crash handler
- From: Gary Benson <gbenson at redhat dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb-patches at sourceware dot org
- Date: Tue, 13 May 2014 20:22:28 +0100
- Subject: Re: [PATCH 0/2] Demangler crash handler
- Authentication-results: sourceware.org; auth=none
- References: <20140509100656 dot GA4760 at blade dot nx> <201405091120 dot s49BKO1f010622 at glazunov dot sibelius dot xs4all dot nl> <87fvkhjqvs dot fsf at mid dot deneb dot enyo dot de> <20140513102223 dot GC17805 at blade dot nx> <87ppjhilni dot fsf at mid dot deneb dot enyo dot de>
Florian Weimer wrote:
> * Gary Benson:
> > > It would be more reliable to run the demangler in a separate
> > > process.
> >
> > Agreed. There are two issues though. First is performance:
> > GDB can demangle a lot of symbols--starting GDB on LibreOffice
> > demangles more than 369,000 symbols on my machine, and typing
> > "b <Tab><Tab>" demangles 2,740,000 more--so the IPC overhead
> > has to be seriously low.
>
> Is most of the demangling of the bulk kind? These cases are easy in
> the sense that a ping-pong between the two processes is avoidable.
>
> More worrisome would be the occasional demangling as part of other
> tasks, where the context switches might become very visible.
It probably is bulk, though I don't know for sure. You could probably
rearrange GDB to demangle a whole object file or CU's symbols at once.
> > > What's so difficult about fixing the demangler?
> >
> > It's not so difficult really, but fixes take time to diagnose,
> > reproduce, fix, test, review, etc.
>
> I was referring to a more permanent fix, not just patching the bug
> of the day as users encounter it.
Ah, sorry. The main difficulty for me is that I don't fully
understand the mangling spec. The people who really know it backwards
are the people who wrote the libiberty demangler in the first place :)
That, and time. This demangler work is not my main job at the moment.
It just happens that I (foolishly?) fixed a bug on it last year so now
I'm Demangler Man until someone else falls into the trap.
Cheers,
Gary
--
http://gbenson.net/