Re: Plugins & GGC ie GTY

2009-05-04 Thread Basile STARYNKEVITCH
Justin Seyster wrote: We just have to add some small code [2] into the ggc_mark_roots routine of gcc/ggc-common.c to add the scanning using this gt_ggc_r_gt_FOO_h. This is not a big deal. We should simply add a routine ggc_register_plugin_root_tab(const struct ggc_root_tab*) that adds its ar

Re: Plugins & GGC ie GTY

2009-05-04 Thread Justin Seyster
Sorry for dragging this discussion out from the distant past. I'm in the process of porting some plug-ins from the old plugin SVN branch to the new plug-in system, and this is one of the issues blocking me. My plug-ins maintain some tree nodes that I want to stay alive from function to function.

Re: Plugins & GGC ie GTY

2009-04-01 Thread Basile STARYNKEVITCH
Hello All Joern Rennecke wrote: As long as you only need to GTY known types, you can avoid having extra GTY roots by having all plugins share one GTY root in the plugin infrastructure; this root can point to a list to which each plugin can add at will. If you want new types, it gets ugly, be

Re: Plugins & GGC ie GTY

2009-04-01 Thread Steven Bosscher
On Thu, Apr 2, 2009 at 12:48 AM, Joern Rennecke wrote: >> And if garbage collection is avoidable in GCC, given the >> strong opposition it has, all the GTY & gengtype stuff would >> have been removed by now. This looks like a rather uninformed opinion... >> The mere fact it is staying here is >

Re: Plugins & GGC ie GTY

2009-04-01 Thread Joern Rennecke
> And if garbage collection is avoidable in GCC, given the strong opposition it > has, all the GTY & gengtype stuff would have been removed by now. The mere > fact it is staying here is in my opinion very significant. If GC was not > relevant in GCC, GGC & GTY would have gone long time ago. They

Re: Plugins & GGC ie GTY

2009-04-01 Thread Basile STARYNKEVITCH
Basile STARYNKEVITCH wrote: Richard Guenther wrote: Plugins shouldn't keep permanent references to GCed memory. At least that would make it unnecessary to do what you suggest. I strongly disagree with that, and I simply do not understand your position. In my perception, plugins are essent

Re: Plugins & GGC ie GTY

2009-04-01 Thread Basile STARYNKEVITCH
Richard Guenther wrote: Plugins shouldn't keep permanent references to GCed memory. At least that would make it unnecessary to do what you suggest. I strongly disagree with that, and I simply do not understand your position. In my perception, plugins are essentially loaded (dlopen-ed) but

Re: Plugins & GGC ie GTY

2009-04-01 Thread Richard Guenther
On Wed, Apr 1, 2009 at 7:22 PM, Basile STARYNKEVITCH wrote: > > Hello All, > > [I don't know if this discussion belongs to gcc@ or gcc-patches@ so I'm > sending it on gcc@ since I don't propose or discuss any code yet] > > My understanding was that most plugins people are aware that somehow some >

Plugins & GGC ie GTY

2009-04-01 Thread Basile STARYNKEVITCH
Hello All, [I don't know if this discussion belongs to gcc@ or gcc-patches@ so I'm sending it on gcc@ since I don't propose or discuss any code yet] My understanding was that most plugins people are aware that somehow some plugins would need to have static GTY-ed roots for the GGC machinery.