GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | ggc_statistics |
|
extern |
|
extern |
Return the number of bytes allocated at the indicated address.
Return the size of the gc-able object P.
References lookup_page_table_entry(), OBJECT_SIZE, and page_entry::order.
Referenced by ggc_realloc(), and gt_pch_note_object().
|
extern |
Garbage collection for the GNU compiler. Internal definitions for ggc-*.c and stringpool.cc. Copyright (C) 2009-2024 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Call ggc_set_mark on all the roots.
Iterate through all registered roots and mark each element.
References ggc_root_tab::base, extra_root_vec, FOR_EACH_VEC_ELT, ggc_mark_root_tab(), ggc_mark_stringpool(), ggc_protect_identifiers, ggc_purge_stringpool(), gt_clear_caches(), gt_ggc_deletable_rtab, gt_ggc_rtab, i, invoke_plugin_callbacks(), ggc_root_tab::nelt, NULL, and ggc_root_tab::stride.
Referenced by ggc_collect().
|
extern |
Stringpool.
Mark the entries in the string pool.
Mark the trees hanging off the identifier node for GGC. These are handled specially (not using gengtype) because identifiers are only roots during one part of compilation.
References ident_hash, ident_hash_extra, mark_ident(), and NULL.
Referenced by ggc_mark_roots().
|
extern |
Assuming that the objects really do end up at the address passed to ggc_pch_this_base, return the address of this object.
References ggc_pch_data::d, NUM_SIZE_LOOKUP, OBJECT_SIZE, and size_lookup.
Referenced by ggc_call_alloc().
|
extern |
The second parameter and third parameters give the address and size of an object. Update the ggc_pch_data structure with as much of that information as is necessary.
References ggc_pch_data::d, NUM_SIZE_LOOKUP, OBJECT_SIZE, size_lookup, and ggc_pch_ondisk::totals.
Referenced by ggc_call_count().
|
extern |
All objects have been written, write out any final information required.
References ggc_pch_data::d, fatal_error(), free(), and input_location.
Referenced by gt_pch_save().
|
extern |
Write out any initial information required.
Referenced by gt_pch_save().
|
extern |
A PCH file has just been read in at the address specified second parameter. Set up the GC implementation for the new objects.
References ggc_globals::allocated, ggc_globals::allocated_last_gc, BITMAP_SIZE, ggc_globals::by_depth_in_use, page_entry::bytes, clear_marks(), ggc_globals::context_depth, page_entry::context_depth, fatal_error(), ggc_globals::finalizers, G, gcc_assert, HOST_BITS_PER_LONG, i, page_entry::in_use_p, input_location, move_ptes_to_front(), page_entry::next, NULL, page_entry::num_free_objects, NUM_ORDERS, OBJECT_SIZE, page_entry::order, page_entry::page, PAGE_ALIGN, ggc_globals::page_tails, ggc_globals::pages, ggc_globals::pagesize, poison_pages, push_by_depth(), set_page_table_entry(), ggc_pch_ondisk::totals, validate_free_objects, ggc_globals::vec_finalizers, and vNULL.
Referenced by gt_pch_restore().
|
extern |
The objects, when read, will most likely be at the address in the second parameter.
References a, ggc_pch_data::base, ggc_pch_data::d, i, NUM_ORDERS, OBJECT_SIZE, PAGE_ALIGN, and ggc_pch_ondisk::totals.
Referenced by gt_pch_save().
|
extern |
Return the total size of the data to be written to hold all the objects previously passed to ggc_pch_count_object.
References a, ggc_pch_data::d, i, NUM_ORDERS, OBJECT_SIZE, PAGE_ALIGN, and ggc_pch_ondisk::totals.
Referenced by gt_pch_save().
|
extern |
Write out this object, including any padding.
References ggc_pch_data::d, fatal_error(), G, input_location, NUM_SIZE_LOOKUP, OBJECT_SIZE, ggc_globals::pagesize, ROUND_UP_VALUE, SEEK_CUR, size_lookup, and ggc_pch_ondisk::totals.
Referenced by gt_pch_save().
|
extern |
Used by the various collectors to gather and print statistics that do not depend on the collector in use.
References ggc_stats, NULL, and stats.
Referenced by ggc_print_statistics().
|
extern |
After live values has been marked, walk all recorded pointers and see if they are still live.
References hash_map< KeyId, Value, Traits >::begin(), ggc_marked_p(), and ggc_mem_desc.
Referenced by ggc_collect().
|
extern |
Purge the entries in the string pool.
Purge the identifier hash of identifiers which are no longer referenced.
References ggc_marked_p(), ident_hash, ident_hash_extra, maybe_delete_ident(), and NULL.
Referenced by ggc_mark_roots().
|
extern |
Allocation and collection.
|
extern |
Return the stringpool to its state before gt_pch_save_stringpool was called.
Referenced by gt_pch_save().
|
extern |
PCH and GGC handling for strings, mostly trivial.
Pointer-walking routine for strings (not very interesting, since strings don't contain pointers).
References gcc_unreachable.
Referenced by gt_pch_n_S(), gt_pch_n_S2(), gt_pch_note_object(), gt_pch_note_reorder(), and gt_pch_save().
|
extern |
A PCH file has been restored, which loaded SPD; fill the real hash table from SPD.
Referenced by gt_pch_restore().
|
extern |
Save and restore the string pool entries for PCH.
Save the stringpool data in SPD.
References string_pool_data::entries, string_pool_data_extra::entries, ggc_alloc(), ggc_vec_alloc(), ident_hash, ident_hash_extra, string_pool_data::nelements, string_pool_data_extra::nelements, string_pool_data::nslots, string_pool_data_extra::nslots, spd, and spd2.
Referenced by gt_pch_save().
|
extern |
Return a new ggc_pch_data structure.
Referenced by gt_pch_save().