GCC Middle and Back End API Reference
statistics.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GCC_MEM_STAT_ARGUMENTS   const char * ARG_UNUSED (_loc_name), int ARG_UNUSED (_loc_line), const char * ARG_UNUSED (_loc_function)
 
#define ALONE_MEM_STAT_DECL   void
 
#define ALONE_FINAL_MEM_STAT_DECL   GCC_MEM_STAT_ARGUMENTS
 
#define ALONE_PASS_MEM_STAT
 
#define ALONE_FINAL_PASS_MEM_STAT   0,0,0
 
#define ALONE_MEM_STAT_INFO
 
#define MEM_STAT_DECL
 
#define FINAL_MEM_STAT_DECL   , ALONE_FINAL_MEM_STAT_DECL
 
#define PASS_MEM_STAT
 
#define FINAL_PASS_MEM_STAT   , ALONE_FINAL_PASS_MEM_STAT
 
#define MEM_STAT_INFO   ALONE_MEM_STAT_INFO
 
#define ALONE_CXX_MEM_STAT_INFO
 
#define CXX_MEM_STAT_INFO
 

Functions

void statistics_early_init (void)
 
void statistics_init (void)
 
void statistics_fini (void)
 
void statistics_fini_pass (void)
 
void statistics_counter_event (struct function *, const char *, int)
 
void statistics_histogram_event (struct function *, const char *, int)
 

Macro Definition Documentation

◆ ALONE_CXX_MEM_STAT_INFO

#define ALONE_CXX_MEM_STAT_INFO

◆ ALONE_FINAL_MEM_STAT_DECL

#define ALONE_FINAL_MEM_STAT_DECL   GCC_MEM_STAT_ARGUMENTS

◆ ALONE_FINAL_PASS_MEM_STAT

#define ALONE_FINAL_PASS_MEM_STAT   0,0,0

◆ ALONE_MEM_STAT_DECL

#define ALONE_MEM_STAT_DECL   void

◆ ALONE_MEM_STAT_INFO

#define ALONE_MEM_STAT_INFO

◆ ALONE_PASS_MEM_STAT

#define ALONE_PASS_MEM_STAT

◆ CXX_MEM_STAT_INFO

#define CXX_MEM_STAT_INFO

◆ FINAL_MEM_STAT_DECL

#define FINAL_MEM_STAT_DECL   , ALONE_FINAL_MEM_STAT_DECL

◆ FINAL_PASS_MEM_STAT

◆ GCC_MEM_STAT_ARGUMENTS

#define GCC_MEM_STAT_ARGUMENTS   const char * ARG_UNUSED (_loc_name), int ARG_UNUSED (_loc_line), const char * ARG_UNUSED (_loc_function)
Memory and optimization statistics helpers.
Copyright (C) 2004-2024 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.

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/>.   

◆ MEM_STAT_DECL

#define MEM_STAT_DECL

◆ MEM_STAT_INFO

#define MEM_STAT_INFO   ALONE_MEM_STAT_INFO

Referenced by gen_raw_REG().

◆ PASS_MEM_STAT

#define PASS_MEM_STAT

Referenced by hash_table< Descriptor, Lazy, Allocator >::alloc_entries(), auto_bitmap::auto_bitmap(), auto_bitmap::auto_bitmap(), auto_vec< T, N >::auto_vec(), auto_vec< T, 0 >::auto_vec(), bitmap_alloc(), bitmap_gc_alloc(), bitmap_initialize(), build0(), build1_loc(), build2(), build2_loc(), build3(), build3_loc(), build4_loc(), build5_loc(), build_constructor(), build_decl(), build_distinct_type_copy(), build_new_poly_int_cst(), build_qualified_type(), build_tree_list(), build_tree_list_vec(), build_variant_type_copy(), build_vl_exp(), vec< T, A, vl_embed >::copy(), copy_node(), vec< T, va_heap, vl_ptr >::create(), hash_map< KeyId, Value, Traits >::create_ggc(), hash_table< Descriptor, Lazy, Allocator >::create_ggc(), fast_call_summary< T *, V >::fast_call_summary(), fast_function_summary< T *, V >::fast_function_summary(), fold_build1_loc(), fold_build2_loc(), fold_build3_loc(), ggc_alloc(), ggc_alloc_atomic(), ggc_alloc_cleared_gimple_statement_stat(), ggc_alloc_cleared_tree_node_stat(), ggc_alloc_no_dtor(), ggc_alloc_rtx_def_stat(), ggc_alloc_tree_node_stat(), ggc_cleared_alloc(), ggc_cleared_vec_alloc(), ggc_internal_alloc(), ggc_internal_cleared_alloc(), ggc_internal_cleared_alloc(), ggc_realloc(), ggc_vec_alloc(), gimple_alloc(), gimple_build_assign(), gimple_build_assign(), gimple_build_assign(), gimple_build_assign(), gimple_build_assign_1(), gimple_build_debug_begin_stmt(), gimple_build_debug_bind(), gimple_build_debug_inline_entry(), gimple_build_debug_source_bind(), gimple_build_with_ops_stat(), grow_tree_vec(), hash_table< Descriptor, Lazy, Allocator >::hash_table(), make_int_cst(), make_node(), make_tree_binfo(), make_tree_vec(), make_vector(), va_gc::reserve(), va_heap::reserve(), vec< T, va_heap, vl_ptr >::reserve(), vec< T, va_heap, vl_ptr >::reserve_exact(), rtx_alloc(), rtx_alloc_stat_v(), vec< T, va_heap, vl_ptr >::safe_grow(), vec< T, va_heap, vl_ptr >::safe_grow_cleared(), vec< T, va_heap, vl_ptr >::safe_insert(), vec< T, va_heap, vl_ptr >::safe_push(), shallow_copy_rtx(), tree_cons(), vec_alloc(), vec_alloc(), vec_check_alloc(), vec_safe_grow(), vec_safe_grow_cleared(), vec_safe_grow_cleared(), vec_safe_insert(), vec_safe_push(), vec_safe_reserve(), vec_safe_reserve_exact(), and vec_safe_splice().

Function Documentation

◆ statistics_counter_event()

◆ statistics_early_init()

void statistics_early_init ( void )
extern
In statistics.cc  
Register the statistics dump file.   

References DK_tree, gcc::dump_manager::dump_register(), g, gcc::context::get_dumps(), OPTGROUP_NONE, and statistics_dump_nr.

Referenced by general_init().

◆ statistics_fini()

◆ statistics_fini_pass()

◆ statistics_histogram_event()

void statistics_histogram_event ( struct function * fn,
const char * id,
int val )
extern
Add statistics information about event ID in function FN with the
histogram value VAL.
It will dump the event to the global statistics file if requested.   

References statistics_counter::count, curr_statistics_hash(), current_pass, dump_flags, gcc_assert, get_function_name(), statistics_counter::histogram_p, lookup_or_add_counter(), pass_data::name, opt_pass::static_pass_number, statistics_dump_file, statistics_dump_flags, TDF_DETAILS, and TDF_STATS.

Referenced by compute_antic(), do_rpo_vn_1(), and insert().

◆ statistics_init()