GCC Middle and Back End API Reference
|
Go to the source code of this file.
Data Structures | |
struct | gcov_bucket_type |
struct | gcov_ctr_summary |
struct | gcov_summary |
struct | gcov_ctr_info |
struct | gcov_fn_info |
struct | gcov_info |
struct | gcov_var |
struct | gcov_working_set_info |
Typedefs | |
typedef unsigned gcov_unsigned_t | __attribute__ ((mode(SI))) |
typedef unsigned | gcov_unsigned_t |
typedef unsigned | gcov_position_t |
typedef HOST_WIDEST_INT | gcov_type |
typedef unsigned HOST_WIDEST_INT | gcov_type_unsigned |
typedef void(* | gcov_merge_fn )(gcov_type *, gcov_unsigned_t) |
typedef struct gcov_working_set_info | gcov_working_set_t |
Variables | |
GCOV_LINKAGE struct gcov_var | ATTRIBUTE_HIDDEN |
static void __attribute__ |
About the target
Die when sys call fails. CMSGID is the error message.
typedef void(* gcov_merge_fn)(gcov_type *, gcov_unsigned_t) |
Type of function used to merge counters.
typedef unsigned gcov_position_t |
typedef HOST_WIDEST_INT gcov_type |
typedef unsigned HOST_WIDEST_INT gcov_type_unsigned |
typedef unsigned gcov_unsigned_t |
About the host
typedef struct gcov_working_set_info gcov_working_set_t |
Working set size statistics for a given percentage of the entire profile (sum_all from the counter summary).
void __gcov_dump | ( | void | ) |
Function to enable early write of profile information so far.
int __gcov_execl | ( | const char * | , |
char * | , | ||
... | |||
) |
int __gcov_execle | ( | const char * | , |
char * | , | ||
... | |||
) |
int __gcov_execlp | ( | const char * | , |
char * | , | ||
... | |||
) |
int __gcov_execv | ( | const char * | , |
char * | const[] | ||
) |
int __gcov_execve | ( | const char * | , |
char * | const[], | ||
char * | const[] | ||
) |
int __gcov_execvp | ( | const char * | , |
char * | const[] | ||
) |
void __gcov_flush | ( | void | ) |
Called before fork, to avoid double counting.
pid_t __gcov_fork | ( | void | ) |
The wrappers around some library functions..
void __gcov_indirect_call_profiler_v2 | ( | gcov_type | , |
void * | |||
) |
void __gcov_init | ( | struct gcov_info * | ) |
Register a new object file module.
void __gcov_merge_add | ( | gcov_type * | , |
unsigned | |||
) |
The merge function that just sums the counters.
void __gcov_merge_delta | ( | gcov_type * | , |
unsigned | |||
) |
The merge function to choose the most common difference between consecutive values.
void __gcov_merge_ior | ( | gcov_type * | , |
unsigned | |||
) |
The merge function that just ors the counters together.
void __gcov_merge_single | ( | gcov_type * | , |
unsigned | |||
) |
The merge function to choose the most common value.
void __gcov_reset | ( | void | ) |
Function to reset all counters to 0.
GCOV_LINKAGE void compute_working_sets | ( | const struct gcov_ctr_summary * | summary, |
gcov_working_set_t * | gcov_working_sets | ||
) |
This is used by gcov-dump (IN_GCOV == -1) and in the compiler (!IN_GCOV && !IN_LIBGCOV).
Compute the working set information from the counter histogram in the profile summary. This is an array of information corresponding to a range of percentages of the total execution count (sum_all), and includes the number of counters required to cover that working set percentage and the minimum counter value in that working set.
References count, gcov_bucket_type::cum_value, gcov_ctr_summary::histogram, gcov_working_set_info::min_counter, gcov_bucket_type::min_value, gcov_bucket_type::num_counters, gcov_working_set_info::num_counters, and gcov_ctr_summary::sum_all.
Referenced by dump_working_sets(), and get_working_sets().
GCOV_LINKAGE int gcov_close | ( | void | ) |
Close the current gcov file. Flushes data to disk. Returns nonzero on failure or error flag set.
References gcov_var::alloc, gcov_var::buffer, gcov_var::error, gcov_var::file, free(), gcov_write_block(), gcov_var::length, gcov_var::mode, and gcov_var::offset.
Referenced by coverage_finish(), dump_gcov_file(), read_count_file(), and read_graph_file().
GCOV_LINKAGE unsigned gcov_histo_index | ( | gcov_type | value | ) |
Available only in compiler
Referenced by merge_profile_summaries().
|
inlinestatic |
Return nonzero if the error flag is set.
References gcov_var::error, and gcov_var::file.
Referenced by coverage_begin_function(), coverage_end_function(), dump_gcov_file(), read_count_file(), and read_graph_file().
GCOV_LINKAGE int gcov_magic | ( | gcov_unsigned_t | , |
gcov_unsigned_t | |||
) |
GCOV_LINKAGE int gcov_open | ( | const char @endverbatim * | ) |
Functions for reading and writing gcov files. In libgcov you can open the file for reading then writing. Elsewhere you can open the file either for reading or for writing. When reading a file you may use the gcov_read_* functions, gcov_sync, gcov_position, & gcov_error. When writing a file you may use the gcov_write functions, gcov_seek & gcov_error. When a file is to be rewritten you use the functions for reading, then gcov_rewrite then the functions for writing. Your file may become corrupted if you break these invariants.
GCOV_LINKAGE int gcov_open | ( | const char @endverbatim * | , |
int | |||
) |
|
inlinestatic |
Available everywhere.
Save the current position in the gcov file.
References gcov_var::mode, gcov_var::offset, and gcov_var::start.
Referenced by dump_gcov_file(), read_count_file(), read_graph_file(), tag_arcs(), tag_blocks(), tag_counters(), tag_function(), and tag_lines().
GCOV_LINKAGE gcov_type gcov_read_counter | ( | void | ) |
Read counter value from a coverage file. Sets error flag on file error, overflow flag on overflow
References buffer, gcov_var::error, from_file(), and gcov_read_words().
Referenced by gcov_read_summary(), read_count_file(), and tag_counters().
GCOV_LINKAGE const char* gcov_read_string | ( | void | ) |
Available outside libgcov
Read string from coverage file. Returns a pointer to a static buffer, or NULL on empty string. You must copy the string before calling another gcov function.
References gcov_read_unsigned(), and gcov_read_words().
Referenced by read_graph_file(), tag_function(), and tag_lines().
GCOV_LINKAGE void gcov_read_summary | ( | struct gcov_summary * | ) |
GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned | ( | void | ) |
Read unsigned value from a coverage file. Sets error flag on file error, overflow flag on overflow
References buffer, from_file(), and gcov_read_words().
Referenced by dump_gcov_file(), gcov_read_string(), gcov_read_summary(), read_count_file(), read_graph_file(), tag_arcs(), tag_blocks(), tag_function(), and tag_lines().
|
inlinestatic |
Move to beginning of file and initialize for writing.
References gcov_var::file, gcov_var::mode, gcov_var::offset, and gcov_var::start.
GCOV_LINKAGE void gcov_seek | ( | gcov_position_t | ) |
GCOV_LINKAGE void gcov_sync | ( | gcov_position_t | , |
gcov_unsigned_t | |||
) |
GCOV_LINKAGE time_t gcov_time | ( | void | ) |
Available in gcov
Return the modification time of the current gcov file.
References gcov_var::file.
Referenced by read_graph_file().
GCOV_LINKAGE void gcov_write_counter | ( | gcov_type | ) |
Available only in libgcov
GCOV_LINKAGE void gcov_write_length | ( | gcov_position_t | ) |
GCOV_LINKAGE void gcov_write_string | ( | const char * | ) |
GCOV_LINKAGE void gcov_write_summary | ( | gcov_unsigned_t | , |
const struct gcov_summary * | |||
) |
GCOV_LINKAGE gcov_position_t gcov_write_tag | ( | gcov_unsigned_t | ) |
GCOV_LINKAGE void gcov_write_tag_length | ( | gcov_unsigned_t | , |
gcov_unsigned_t | |||
) |
GCOV_LINKAGE void gcov_write_unsigned | ( | gcov_unsigned_t | ) |
Available outside gcov
GCOV_LINKAGE struct gcov_var ATTRIBUTE_HIDDEN |