From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [patch 0/4] varobj_list replacement [Re: [patch 4/8] Types GC [varobj_list to all_root_varobjs]]
Date: Thu, 30 Jul 2009 14:00:00 -0000 [thread overview]
Message-ID: <20090730075220.GA14542@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <200907301045.51541.vladimir@codesourcery.com>
On Thu, 30 Jul 2009 08:45:51 +0200, Vladimir Prus wrote:
> On Wednesday 29 July 2009 Tom Tromey wrote:
> > I understand from other mail that this patch is a prerequisite to the
> > type GC work. However, I don't understand in what way it is needed. I
> > probably missed something... could you either explain it or tell me
> > where to look?
>
> In fact, I'm lost the big picture as well. If we want to optimize uninstall_variable,
> then the 4/4 patch appears to be the simplest one that does the trick. However, if
> that's a part of some bigger story, I'd be interested to understand it.
The bigger story is:
------------------------------------------------------------------------------
The former Types GC code had to traverse varobj leaves (not just roots as does
current varobj_list()). As I found the current varobj_list() calling
convention is IMO-inconvenient and calling convention of the 'roots' and 'all'
iterators/enumerators of varobjs should be the same I did not want to write
a new function using the IMO-inconvenient calling convention. The new
function was called all_varobjs() in the obsoleted patch:
[patch 8/8] Types GC [varobj]
http://sourceware.org/ml/gdb-patches/2009-05/msg00551.html
So I rather IMO-fixed the calling convention of varobj_list() first so that
the later 'all' varobjs iterator can already use the new calling convention
while keeping the calling convention of the 'roots' and 'all' iterators the
same.
I found the new all_root_varobjs() iterator - patch 3/4 - to be clearly a win
over current varobj_list() - no matter how insignificant change it may be
- that just nobody so far has spent the time doing such code cleanup.
The patches 1/4, 2/4 and 4/4 were later created just to support accepting the
patch 3/4 and I probably would not submit 3/4 if I could imagine any problems
getting it accepted.
Moreover the Types GC changed from the former reference-counting to the
current mark-and-sweep where maybe the leaves traversal is no longer needed.
I have to check it more.
speculation: IIRC it should have been fixing one objfile-invalidating bug
where varobj leaf is using a different objfile due to TYPE_STUB referencing.
But it is a bug out of the critical path for Types GC.
In fact I do not like 1/4 or 2/4 to be accepted, they were created just to get
3/4 accepted. Also I do not think the 4/4 performance improvement is worth
the reviewing time, it was also created just to get 3/4 accepted.
------------------------------------------------------------------------------
As I see 3/4 is not considered as a clear cleanup win. Understood it as
rejected and I will be basing the next patches on the current varobj_list()
calling convention as the preferred one.
Thanks,
Jan
next prev parent reply other threads:[~2009-07-30 7:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 8:02 [patch 4/8] Types GC [varobj_list to all_root_varobjs] Jan Kratochvil
2009-06-09 20:50 ` Tom Tromey
2009-07-02 8:39 ` Jan Kratochvil
2009-07-02 10:09 ` Vladimir Prus
2009-07-04 21:11 ` Jan Kratochvil
2009-07-07 8:54 ` Vladimir Prus
2009-07-07 9:32 ` Jan Kratochvil
2009-07-10 20:17 ` [patch 0/4] varobj_list replacement [Re: [patch 4/8] Types GC [varobj_list to all_root_varobjs]] Jan Kratochvil
2009-07-29 21:34 ` Tom Tromey
2009-07-30 8:46 ` Vladimir Prus
2009-07-30 14:00 ` Jan Kratochvil [this message]
2009-07-30 15:13 ` Vladimir Prus
2009-07-30 15:16 ` Jan Kratochvil
2009-07-10 20:18 ` [patch 1/4] varobj_list replacement, choice 1 of 3: VEC_safe_push + VEC_unordered_remove Jan Kratochvil
2009-07-10 20:21 ` [patch 2/4] varobj_list replacement, choice 2 of 3: VEC_safe_insert + VEC_ordered_remove Jan Kratochvil
2009-07-10 21:11 ` [patch 3/4] varobj_list replacement, choice 3 of 3: Iterator Jan Kratochvil
2009-07-10 22:12 ` [patch 4/4] varobj_list replacement, choice 3 of 3: Iterator optimization Jan Kratochvil
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=20090730075220.GA14542@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
--cc=vladimir@codesourcery.com \
/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