This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: introduce scoped cleanups
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org
- Date: Fri, 31 May 2013 17:14:57 +0100
- Subject: Re: RFC: introduce scoped cleanups
- References: <87li7ohtiu dot fsf at fleche dot redhat dot com> <87ppw8qlgl dot fsf at fleche dot redhat dot com> <20130531061135 dot GA12363 at adacore dot com> <87obbrp2hg dot fsf at fleche dot redhat dot com>
On 05/31/2013 04:56 PM, Tom Tromey wrote:
>>> Pedro said he was interested in general stack-based allocation of
>>> cleanups, so I implemented that, following his plan.
>
> Joel> Is this purely for performance?
>
> Yeah, I think so.
Yeah, like, Tom, I've occasionally found myself sometimes
considering avoiding cleanups, avoiding the heap allocations,
in cases performance may matter. Clearly we're not alone, as
evidenced from several of Tom's patches exposing spots where
we were avoiding having a "master" cleanup, some times using
tricky conditionals. I had thought of this stack cleanups
scheme before, but never actually went through with it. Seeing
Tom's scope cleanups were already stack based and most of the
way there, made me feel that it'd be a pity to be able to have
stack-based cleanups, but then as soon as you need a real cleanup
that does actual cleanup (as opposed to null_cleanup), you still
need to get back to install a heap cleanup anyway.
--
Pedro Alves