diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-16 05:56:39 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-16 05:56:39 +0000 |
commit | 9dc75945d077a0b02c3770780ae0a039f6b83dcb (patch) | |
tree | 9bf2e3f5e895411e8065588b15ce395cabf67fe6 /gcc/doc | |
parent | f805d53d30cc8aae7d7bbd9b85b438b1a6fe3888 (diff) | |
download | gcc-9dc75945d077a0b02c3770780ae0a039f6b83dcb.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148515 138bc75d-0d04-0410-961f-82ee72b054a4
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 ef7a5d42fdb..b59d5f3d35e 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 287619c404d..f02f931b102 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 |