diff options
author | Basile Starynkevitch <basile@starynkevitch.net> | 2009-06-16 05:56:39 +0000 |
---|---|---|
committer | Basile Starynkevitch <bstarynk@gcc.gnu.org> | 2009-06-16 05:56:39 +0000 |
commit | bd117bb6b44870ca006eb12630a454302873674e (patch) | |
tree | 9bf2e3f5e895411e8065588b15ce395cabf67fe6 /gcc/doc | |
parent | e1b7793c8ebdc72bd3d7283d70a29444da614c13 (diff) | |
download | gcc-bd117bb6b44870ca006eb12630a454302873674e.zip gcc-bd117bb6b44870ca006eb12630a454302873674e.tar.gz gcc-bd117bb6b44870ca006eb12630a454302873674e.tar.bz2 |
plugins.texi (Interacting with the GCC Garbage Collector): Mention the plugin mode of gengtype.
2009-06-16 Basile Starynkevitch <basile@starynkevitch.net>
* gcc/doc/plugins.texi (Interacting with the GCC Garbage Collector):
Mention the plugin mode of gengtype.
* gcc/doc/gty.texi (Source Files Containing Type Information):
Likewise.
* gcc/gengtype.c: Updated copyright.
(plugin_files, nb_plugin_files) Added new static variables.
(measure_input_list) Care about plugin_files.
(write_rtx_next): Added early return in plugin mode.
(create_file): Updated copyright year in generated file. Added
asserts.
(oprintf): Added early return if NULL outf.
(get_output_file_with_visibility): Care of plugin_files.
(get_output_file_name): May return null.
(write_local): Added early return.
(put_mangled_filename): Ditto.
(finish_root_table): Added check for base_files.
(write_roots): Care about null when plugins.
(main): Added plugin mode.
From-SVN: r148515
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/gty.texi | 8 | ||||
-rw-r--r-- | gcc/doc/plugins.texi | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi index ef7a5d4..b59d5f3 100644 --- a/gcc/doc/gty.texi +++ b/gcc/doc/gty.texi @@ -450,6 +450,14 @@ For language frontends, there is another file that needs to be included somewhere. It will be called @file{gtype-@var{lang}.h}, where @var{lang} is the name of the subdirectory the language is contained in. +Plugins can add additional root tables. Run the @code{gengtype} +utility in plugin mode as @code{gengtype -p @var{source-dir} +@var{file-list} @var{plugin*.c}} with your plugin files +@var{plugin*.c} using @code{GTY} to generate the corresponding +@var{gt-plugin*.h} files. The GCC build tree is needed to be present in +that mode. + + @node Invoking the garbage collector @section How to invoke the garbage collector @cindex garbage collector, invocation diff --git a/gcc/doc/plugins.texi b/gcc/doc/plugins.texi index 287619c..f02f931 100644 --- a/gcc/doc/plugins.texi +++ b/gcc/doc/plugins.texi @@ -198,13 +198,15 @@ Some plugins may need to have GGC mark additional data. This can be done by registering a callback (called with a null @code{gcc_data}) for the @code{PLUGIN_GGC_MARKING} event. Such callbacks can call the @code{ggc_set_mark} routine, preferably thru the @code{ggc_mark} macro -(and conversly, these routines should usually not be used in plugins -outside of the @code{PLUGIN_GGC_MARKING} event). +(and conversely, these routines should usually not be used in plugins +outside of the @code{PLUGIN_GGC_MARKING} event). Some plugins may need to add extra GGC root tables, e.g. to handle their own @code{GTY}-ed data. This can be done with the -@code{PLUGIN_REGISTER_GGC_ROOTS} pseudo-event with a null callback and the -extra root table as @code{user_data}. +@code{PLUGIN_REGISTER_GGC_ROOTS} pseudo-event with a null callback and +the extra root table as @code{user_data}. Running the @code{gengtype +-p @var{source-dir} @var{file-list} @var{plugin*.c} ...} utility +generates this extra root table. You should understand the details of memory management inside GCC before using @code{PLUGIN_GGC_MARKING} or |