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

Go to the source code of this file.

Data Structures

struct  edge_profile_info

Macros

#define EDGE_INFO(e)

Typedefs

typedef struct gcov_working_set_info gcov_working_set_t

Functions

gcov_typeedge_gcov_count (edge e)
gcov_typebb_gcov_count (basic_block bb)
gcov_working_set_tfind_working_set (unsigned pct_times_10)
void add_working_set (gcov_working_set_t *)
void mcf_smooth_cfg (void)
gcov_type sum_edge_counts (vec< edge, va_gc > *edges)
void init_node_map (bool)
void del_node_map (void)
void get_working_sets (void)
bool coverage_instrumentation_p ()
bool in_pragma_suppress_coverage_p (gimple *, bool)
bool location_in_pragma_suppress_coverage_p (location_t)
bool coverage_suppressed_p (basic_block)
void suppress_coverage (basic_block)
void suppress_coverage_unset (basic_block)

Variables

vec< gcov_typebb_gcov_counts
hash_map< edge, gcov_type > * edge_gcov_counts
struct gcov_summaryprofile_info
struct gcov_summarygcov_profile_info

Macro Definition Documentation

◆ EDGE_INFO

#define EDGE_INFO ( e)
Value:
((struct edge_profile_info *) (e)->aux)
Definition profile.h:27

Typedef Documentation

◆ gcov_working_set_t

typedef struct gcov_working_set_info gcov_working_set_t

Function Documentation

◆ add_working_set()

void add_working_set ( gcov_working_set_t * )
extern

◆ bb_gcov_count()

◆ coverage_instrumentation_p()

bool coverage_instrumentation_p ( )
extern
Return true if any cfg coverage/profiling is enabled; -fprofile-arcs
-fcondition-coverage -fpath-coverage.   

◆ coverage_suppressed_p()

bool coverage_suppressed_p ( basic_block bb)
extern

◆ del_node_map()

void del_node_map ( void )
extern
Delete the CGRAPH_NODE_MAP.   

References cgraph_node_map.

Referenced by ipa_profile(), and tree_profiling().

◆ edge_gcov_count()

◆ find_working_set()

gcov_working_set_t * find_working_set ( unsigned pct_times_10)
extern

◆ get_working_sets()

void get_working_sets ( void )
extern

◆ in_pragma_suppress_coverage_p()

bool in_pragma_suppress_coverage_p ( gimple * stmt,
bool prev )
extern
For #pragma GCC suppress_coverage begin/end.   
Check if STMT is anchored to a line of code in a range disabled by #pragma
GCC suppress_coverage begin/end.  This function always returns false if
coverage is disabled as it is the faster check, and nothing should be
suppressed anyway.

If STMT is at an UNKNOWN_LOCATION or ADHOC_LOC, this function returns PREV.
This is probably a compiler-generated statement that should inherit the
disabled state of the previous statement since it is really tied to it, and
there is no opportunity for a #pragma in-between.   

References coverage_instrumentation_p(), expansion_point_location(), gimple_location(), location_in_pragma_suppress_coverage_p(), and UNKNOWN_LOCATION.

Referenced by make_blocks(), and make_blocks_1().

◆ init_node_map()

void init_node_map ( bool local)
extern
Initialize map from PROFILE_ID to CGRAPH_NODE.
When LOCAL is true, the PROFILE_IDs are computed.  when it is false we assume
that the PROFILE_IDs was already assigned.   

References cgraph_node_map, coverage_compute_profile_id(), dump_enabled_p(), dump_printf_loc(), FOR_EACH_DEFINED_FUNCTION, dump_user_location_t::from_function_decl(), cgraph_node::local, MSG_MISSED_OPTIMIZATION, and NULL.

Referenced by autofdo::auto_profile(), ipa_profile(), and tree_profiling().

◆ location_in_pragma_suppress_coverage_p()

bool location_in_pragma_suppress_coverage_p ( location_t loc)
extern
Check if LOC is within a #pragma GCC suppress_coverage block.   

References expansion_point_location(), get_pure_location(), line_table, suppress_coverage_ranges, and UNKNOWN_LOCATION.

Referenced by in_pragma_suppress_coverage_p(), and make_blocks().

◆ mcf_smooth_cfg()

void mcf_smooth_cfg ( void )
extern
Smoothes the initial assigned basic block and edge counts using
a minimum cost flow algorithm.  
Main routine. Smoothes the initial assigned basic block and edge counts using
a minimum cost flow algorithm, to ensure that the flow consistency rule is
obeyed: sum of outgoing edges = sum of incoming edges for each basic
block.   

References adjust_cfg_counts(), create_fixup_graph(), delete_fixup_graph(), and find_minimum_cost_flow().

Referenced by compute_branch_probabilities().

◆ sum_edge_counts()

gcov_type sum_edge_counts ( vec< edge, va_gc > * to_edges)
extern
Compute the sum of the edge counts in TO_EDGES.   

References edge_gcov_count(), EDGE_INFO, and FOR_EACH_EDGE.

Referenced by adjust_cfg_counts(), is_inconsistent(), and set_bb_counts().

◆ suppress_coverage()

void suppress_coverage ( basic_block bb)
extern
Disable coverage for BB.  This is used for #pragma GCC suppress_coverage.   

References basic_block_def::flags.

Referenced by gimple_duplicate_bb(), gimple_split_block(), gimple_split_edge(), insert_cond_bb(), and make_blocks_1().

◆ suppress_coverage_unset()

void suppress_coverage_unset ( basic_block bb)
extern
Unset the flag set by suppress_coverage.  This is only useful when merging
blocks.   

References basic_block_def::flags.

Referenced by gimple_merge_blocks().

Variable Documentation

◆ bb_gcov_counts

vec<gcov_type> bb_gcov_counts
extern
Helpers annotating edges/basic blocks to GCOV counts.   
Map from BBs/edges to gcov counters.   

Referenced by bb_gcov_count(), and compute_branch_probabilities().

◆ edge_gcov_counts

hash_map<edge,gcov_type>* edge_gcov_counts
extern

◆ gcov_profile_info

struct gcov_summary * gcov_profile_info

◆ profile_info