osprey-gcc-4.2.0/gcc/ggc.h File Reference

#include "statistics.h"
#include "gtype-desc.h"

Include dependency graph for ggc.h:

Go to the source code of this file.

Data Types

type  ggc_root_tab
type  ggc_cache_tab
type  ggc_statistics

Defines

#define digit_string(d)   (digit_vector + ((d) * 2))
#define LAST_GGC_ROOT_TAB   { NULL, 0, 0, NULL, NULL }
#define LAST_GGC_CACHE_TAB   { NULL, 0, 0, NULL, NULL, NULL }
#define ggc_test_and_set_mark(EXPR)   ((EXPR) != NULL && ((void *) (EXPR)) != (void *) 1 && ! ggc_set_mark (EXPR))
#define ggc_mark(EXPR)
#define ggc_alloc(s)   ggc_alloc_stat (s MEM_STAT_INFO)
#define ggc_alloc_typed(s, z)   ggc_alloc_typed_stat (s,z MEM_STAT_INFO)
#define ggc_alloc_cleared(s)   ggc_alloc_cleared_stat (s MEM_STAT_INFO)
#define ggc_realloc(s, z)   ggc_realloc_stat (s,z MEM_STAT_INFO)
#define GGC_NEW(T)   ((T *) ggc_alloc (sizeof (T)))
#define GGC_CNEW(T)   ((T *) ggc_alloc_cleared (sizeof (T)))
#define GGC_NEWVEC(T, N)   ((T *) ggc_alloc ((N) * sizeof(T)))
#define GGC_CNEWVEC(T, N)   ((T *) ggc_alloc_cleared ((N) * sizeof(T)))
#define GGC_NEWVAR(T, S)   ((T *) ggc_alloc ((S)))
#define GGC_CNEWVAR(T, S)   ((T *) ggc_alloc_cleared ((S)))
#define GGC_RESIZEVEC(T, P, N)   ((T *) ggc_realloc ((P), (N) * sizeof (T)))
#define ggc_alloc_rtvec(NELT)
#define ggc_alloc_tree(LENGTH)   ((tree) ggc_alloc_zone (LENGTH, &tree_zone))
#define htab_create_ggc(SIZE, HASH, EQ, DEL)   htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, NULL)
#define splay_tree_new_ggc(COMPARE)
#define ggc_strdup(S)   ggc_alloc_string((S), -1)
#define ggc_alloc_zone(s, z)   ggc_alloc (s)
#define ggc_alloc_zone_pass_stat(s, z)   ggc_alloc_stat (s PASS_MEM_STAT)

Typedefs

typedef void(* gt_pointer_operator )(void *, void *)
typedef void(* gt_note_pointers )(void *, void *, gt_pointer_operator, void *)
typedef void(* gt_handle_reorder )(void *, void *, gt_pointer_operator, void *)
typedef void(* gt_pointer_walker )(void *)

Functions/Subroutines

int gt_pch_note_object (void *, void *, gt_note_pointers, enum gt_types_enum)
void gt_pch_note_reorder (void *, void *, gt_handle_reorder)
int ggc_set_mark (const void *)
int ggc_marked_p (const void *)
void ggc_mark_stringpool (void)
void ggc_mark_roots (void)
void gt_pch_save_stringpool (void)
void gt_pch_fixup_stringpool (void)
void gt_pch_restore_stringpool (void)
void gt_pch_p_S (void *, void *, gt_pointer_operator, void *)
void gt_pch_n_S (const void *)
void gt_ggc_m_S (void *)
void init_stringpool (void)
void init_ggc (void)
struct alloc_zonenew_ggc_zone (const char *)
void destroy_ggc_zone (struct alloc_zone *)
struct ggc_pch_datainit_ggc_pch (void)
void ggc_pch_count_object (struct ggc_pch_data *, void *, size_t, bool, enum gt_types_enum)
size_t ggc_pch_total_size (struct ggc_pch_data *)
void ggc_pch_this_base (struct ggc_pch_data *, void *)
char * ggc_pch_alloc_object (struct ggc_pch_data *, void *, size_t, bool, enum gt_types_enum)
void ggc_pch_prepare_write (struct ggc_pch_data *, FILE *)
void ggc_pch_write_object (struct ggc_pch_data *, FILE *, void *, void *, size_t, bool)
void ggc_pch_finish (struct ggc_pch_data *, FILE *)
void ggc_pch_read (FILE *, void *)
voidggc_alloc_stat (size_t MEM_STAT_DECL)
voidggc_alloc_typed_stat (enum gt_types_enum, size_t MEM_STAT_DECL)
voidggc_alloc_cleared_stat (size_t MEM_STAT_DECL)
voidggc_realloc_stat (void *, size_t MEM_STAT_DECL)
voidggc_calloc (size_t, size_t)
void ggc_free (void *)
void ggc_record_overhead (size_t, size_t, void *MEM_STAT_DECL)
void ggc_free_overhead (void *)
void ggc_prune_overhead_list (void)
void dump_ggc_loc_statistics (void)
voidggc_splay_alloc (int, void *)
void ggc_splay_dont_free (void *, void *)
const char * ggc_alloc_string (const char *contents, int length)
void ggc_collect (void)
size_t ggc_get_size (const void *)
void gt_pch_save (FILE *f)
void gt_pch_restore (FILE *f)
void ggc_print_common_statistics (FILE *, ggc_statistics *)
void ggc_print_statistics (void)
void stringpool_statistics (void)
int ggc_min_expand_heuristic (void)
int ggc_min_heapsize_heuristic (void)
void init_ggc_heuristics (void)

Variables

const char empty_string []
const char digit_vector []
struct ggc_root_tab *const gt_ggc_rtab []
struct ggc_root_tab *const gt_ggc_deletable_rtab []
struct ggc_root_tab *const gt_pch_cache_rtab []
struct ggc_root_tab *const gt_pch_scalar_rtab []
struct ggc_cache_tab *const gt_ggc_cache_rtab []
bool ggc_force_collect


Define Documentation

#define digit_string ( d   )     (digit_vector + ((d) * 2))

Definition at line 32 of file ggc.h.

#define ggc_alloc (  )     ggc_alloc_stat (s MEM_STAT_INFO)

Definition at line 206 of file ggc.h.

#define ggc_alloc_cleared (  )     ggc_alloc_cleared_stat (s MEM_STAT_INFO)

Definition at line 212 of file ggc.h.

#define ggc_alloc_rtvec ( NELT   ) 

Value:

((rtvec) ggc_alloc_zone (sizeof (struct rtvec_def) + ((NELT) - 1)  \
         * sizeof (rtx), &rtl_zone))

Definition at line 236 of file ggc.h.

#define ggc_alloc_tree ( LENGTH   )     ((tree) ggc_alloc_zone (LENGTH, &tree_zone))

Definition at line 240 of file ggc.h.

#define ggc_alloc_typed ( s,
 )     ggc_alloc_typed_stat (s,z MEM_STAT_INFO)

Definition at line 209 of file ggc.h.

#define ggc_alloc_zone ( s,
 )     ggc_alloc (s)

Definition at line 312 of file ggc.h.

#define ggc_alloc_zone_pass_stat ( s,
 )     ggc_alloc_stat (s PASS_MEM_STAT)

#define GGC_CNEW ( T   )     ((T *) ggc_alloc_cleared (sizeof (T)))

Definition at line 229 of file ggc.h.

#define GGC_CNEWVAR ( T,
S   )     ((T *) ggc_alloc_cleared ((S)))

Definition at line 233 of file ggc.h.

#define GGC_CNEWVEC ( T,
 )     ((T *) ggc_alloc_cleared ((N) * sizeof(T)))

Definition at line 231 of file ggc.h.

#define ggc_mark ( EXPR   ) 

Value:

do {            \
    const void *const a__ = (EXPR);   \
    if (a__ != NULL && a__ != (void *) 1) \
      ggc_set_mark (a__);     \
  } while (0)

Definition at line 102 of file ggc.h.

#define GGC_NEW ( T   )     ((T *) ggc_alloc (sizeof (T)))

Definition at line 228 of file ggc.h.

#define GGC_NEWVAR ( T,
S   )     ((T *) ggc_alloc ((S)))

Definition at line 232 of file ggc.h.

#define GGC_NEWVEC ( T,
 )     ((T *) ggc_alloc ((N) * sizeof(T)))

Definition at line 230 of file ggc.h.

#define ggc_realloc ( s,
 )     ggc_realloc_stat (s,z MEM_STAT_INFO)

Definition at line 215 of file ggc.h.

#define GGC_RESIZEVEC ( T,
P,
 )     ((T *) ggc_realloc ((P), (N) * sizeof (T)))

Definition at line 234 of file ggc.h.

Referenced by cp_lexer_new_main().

#define ggc_strdup ( S   )     ggc_alloc_string((S), -1)

Definition at line 258 of file ggc.h.

#define ggc_test_and_set_mark ( EXPR   )     ((EXPR) != NULL && ((void *) (EXPR)) != (void *) 1 && ! ggc_set_mark (EXPR))

Definition at line 99 of file ggc.h.

#define htab_create_ggc ( SIZE,
HASH,
EQ,
DEL   )     htab_create_alloc (SIZE, HASH, EQ, DEL, ggc_calloc, NULL)

Definition at line 242 of file ggc.h.

#define LAST_GGC_CACHE_TAB   { NULL, 0, 0, NULL, NULL, NULL }

Definition at line 93 of file ggc.h.

#define LAST_GGC_ROOT_TAB   { NULL, 0, 0, NULL, NULL }

Definition at line 76 of file ggc.h.

#define splay_tree_new_ggc ( COMPARE   ) 


Typedef Documentation

Definition at line 53 of file ggc.h.

Definition at line 45 of file ggc.h.

typedef void(* gt_pointer_operator)(void *, void *)

Definition at line 38 of file ggc.h.

typedef void(* gt_pointer_walker)(void *)

Definition at line 65 of file ggc.h.


Function Documentation

void destroy_ggc_zone ( struct alloc_zone  ) 

Definition at line 943 of file ggc-zone.c.

References alloc_zone::dead, G, gcc_assert, alloc_zone::next_zone, and is::z.

void dump_ggc_loc_statistics ( void   ) 

Definition at line 935 of file ggc-common.c.

References fprintf(), ggc_collect(), ggc_force_collect, htab_traverse(), i, qsort(), s, s1, s2, sprintf(), strstr(), times, and xcalloc().

Referenced by finalize().

void* ggc_alloc_cleared_stat ( size_t  MEM_STAT_DECL  ) 

void* ggc_alloc_stat ( size_t  MEM_STAT_DECL  ) 

const char* ggc_alloc_string ( const char *  contents,
int  length 
)

void* ggc_alloc_typed_stat ( enum  gt_types_enum,
size_t  MEM_STAT_DECL 
)

void* ggc_calloc ( size_t  ,
size_t   
)

Definition at line 204 of file ggc-common.c.

References ggc_alloc_cleared.

Referenced by init_alias_analysis(), and init_reswords().

void ggc_collect ( void   ) 

Definition at line 1705 of file ggc-page.c.

References alloc_zone::allocated, alloc_zone::allocated_last_gc, always_collect, calculate_average_page_survival(), check_cookies(), clear_marks(), alloc_zone::context_depth, page_entry::context_depth, alloc_chunk::data, alloc_zone::dead, end, f, fprintf(), free(), G, gcc_assert, ggc_collect_1(), GGC_DEBUG_LEVEL, ggc_force_collect, ggc_mark_roots(), ggc_prune_overhead_list(), page_entry::large_p, main_zone, alloc_chunk::mark, MAX, alloc_zone::name, page_entry::next, alloc_zone::next_zone, p, page_entry::page, alloc_zone::pages, PARAM_VALUE, poison_pages, prefetch, printf(), quiet_flag, release_pages(), alloc_chunk::size, sweep_objs(), sweep_pages(), timevar_pop, timevar_push, alloc_chunk::u, validate_free_objects, alloc_zone::was_collected, and zone_free_marks().

Referenced by begin_parsing_inclass_inline(), c_parser_translation_unit(), cgraph_finalize_compilation_unit(), cgraph_finalize_function(), cp_finish_file(), cse_main(), dump_ggc_loc_statistics(), execute_ipa_pass_list(), execute_todo(), expand_body(), expand_or_defer_fn(), ggc_print_common_statistics(), GTY(), loop_optimize(), rest_of_compilation(), rest_of_handle_branch_target_load_optimize(), rest_of_handle_combine(), rest_of_handle_cse(), rest_of_handle_cse2(), rest_of_handle_final(), rest_of_handle_flow2(), rest_of_handle_gcse(), rest_of_handle_gcse2(), rest_of_handle_jump(), rest_of_handle_jump2(), rest_of_handle_jump_bypass(), rest_of_handle_life(), rest_of_handle_loop2(), rest_of_handle_loop_optimize(), rest_of_handle_machine_reorg(), rest_of_handle_old_regalloc(), rest_of_handle_regmove(), and tree_rest_of_compilation().

void ggc_free ( void  ) 

Definition at line 72 of file ggc-none.c.

void ggc_free_overhead ( void  ) 

size_t ggc_get_size ( const void  ) 

void ggc_mark_roots ( void   ) 

void ggc_mark_stringpool ( void   ) 

Definition at line 171 of file stringpool.c.

References ht_forall(), mark_ident(), and NULL.

int ggc_marked_p ( const void  ) 

int ggc_min_expand_heuristic ( void   ) 

Definition at line 320 of file ggc-common.c.

References ggc_rlimit_bound(), MIN, and physmem_total().

Referenced by ggc_min_heapsize_heuristic(), and init_ggc_heuristics().

int ggc_min_heapsize_heuristic ( void   ) 

char* ggc_pch_alloc_object ( struct ggc_pch_data ,
void ,
size_t  ,
bool  ,
enum  gt_types_enum 
)

void ggc_pch_count_object ( struct ggc_pch_data ,
void ,
size_t  ,
bool  ,
enum  gt_types_enum 
)

void ggc_pch_finish ( struct ggc_pch_data ,
FILE  
)

void ggc_pch_prepare_write ( struct ggc_pch_data ,
FILE  
)

Definition at line 2271 of file ggc-zone.c.

References ftell(), and ggc_pch_data::start_offset.

void ggc_pch_read ( FILE ,
void  
)

void ggc_pch_this_base ( struct ggc_pch_data ,
void  
)

size_t ggc_pch_total_size ( struct ggc_pch_data  ) 

void ggc_pch_write_object ( struct ggc_pch_data ,
FILE ,
void ,
void ,
size_t  ,
bool   
)

void ggc_print_common_statistics ( FILE ,
ggc_statistics  
)

void ggc_print_statistics ( void   ) 

void ggc_prune_overhead_list ( void   ) 

void* ggc_realloc_stat ( void ,
size_t  MEM_STAT_DECL 
)

void ggc_record_overhead ( size_t  ,
size_t  ,
void MEM_STAT_DECL 
)

int ggc_set_mark ( const void  ) 

void* ggc_splay_alloc ( int  ,
void  
)

Definition at line 198 of file ggc-common.c.

References gcc_assert, and ggc_alloc.

void ggc_splay_dont_free ( void ,
void  
)

void gt_ggc_m_S ( void  ) 

void gt_pch_fixup_stringpool ( void   ) 

Definition at line 238 of file stringpool.c.

void gt_pch_n_S ( const void  ) 

Definition at line 198 of file stringpool.c.

References gt_pch_note_object(), gt_pch_p_S(), and gt_types_enum_last.

int gt_pch_note_object ( void ,
void ,
gt_note_pointers  ,
enum  gt_types_enum 
)

void gt_pch_note_reorder ( void ,
void ,
gt_handle_reorder   
)

void gt_pch_p_S ( void ,
void ,
gt_pointer_operator  ,
void  
)

void gt_pch_restore ( FILE f  ) 

void gt_pch_restore_stringpool ( void   ) 

Definition at line 246 of file stringpool.c.

References ht_load(), and NULL.

void gt_pch_save ( FILE f  ) 

void gt_pch_save_stringpool ( void   ) 

void init_ggc ( void   ) 

void init_ggc_heuristics ( void   ) 

struct ggc_pch_data* init_ggc_pch ( void   )  [read]

Definition at line 2115 of file ggc-page.c.

References xcalloc(), and XCNEW.

Referenced by gt_pch_save().

void init_stringpool ( void   ) 

struct alloc_zone* new_ggc_zone ( const char *   )  [read]

Definition at line 932 of file ggc-zone.c.

References G, alloc_zone::name, new_ggc_zone_1(), alloc_zone::next_zone, and xcalloc().

void stringpool_statistics ( void   ) 

Definition at line 158 of file stringpool.c.

References ht_dump_statistics().

Referenced by finalize().


Variable Documentation

const char digit_vector[]

Definition at line 49 of file stringpool.c.

const char empty_string[]

Definition at line 45 of file stringpool.c.

Definition at line 65 of file ggc-common.c.

Referenced by dump_ggc_loc_statistics(), ggc_collect(), and ggc_print_statistics().

Definition at line 97 of file gtype-c.h.

Definition at line 86 of file gtype-c.h.

Definition at line 52 of file gtype-c.h.


Generated on Wed Apr 8 15:34:40 2009 for Open64 by  doxygen 1.5.6