On Wed, Apr 1, 2009 at 7:22 PM, Basile STARYNKEVITCH
<bas...@starynkevitch.net> 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 would need to have static GTY-ed roots for the GGC machinery.
>
> So it seems to me that we'll need :
>
> 1. The ability to run gengtype in a special mode for plugins, on the source
> code of the plugin. to generate the gt-*.h files included by the source code
> of the plugin. This would require a patch to gengtype.
>
> 2. The ability to handle, very probably using dlsym, or perhaps by having a
> gcc_plugin_register_gty_table function called from the plugin initialization
> routine, to plug the generated root tables (an array of struct ggc_root_tab,
> which is defined in the generated gt-*.h files) of the plugin into the GGC
> machinery. This would require a short patch to ggc-common.c or similar
> ggc-*.c files.
>
> Did I miss anything?

Plugins shouldn't keep permanent references to GCed memory.  At least
that would make it unnecessary to do what you suggest.

Richard.

Reply via email to