This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Plugins & GGC ie GTY
- From: Basile STARYNKEVITCH <basile at starynkevitch dot net>
- To: Taras Glek <tglek at mozilla dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Guenther <richard dot guenther at gmail dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>, Le-Chun Wu <lcwu at google dot com>, Grigori Fursin <grigori dot fursin at inria dot fr>
- Date: Wed, 01 Apr 2009 19:22:18 +0200
- Subject: Plugins & GGC ie GTY
- References: <49D25E40.6080507@mozilla.com> <84fc9c000904010146j53e49ed9i6c271751d41dfd42@mail.gmail.com> <Pine.LNX.4.64.0904011257550.14922@digraph.polyomino.org.uk> <49D398C9.1010809@mozilla.com>
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?
Regards.
PS. This is not an April Fool joke! I am quit serious about extra GTY-ed
roots. It is for me an essential & required condition to perhaps
transform the MELT branch into a mega-plugin.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***