aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.h
AgeCommit message (Collapse)AuthorFilesLines
2008-08-18profile.h: Really add it.H.J. Lu1-0/+47
2008-08-18 H.J. Lu <hongjiu.lu@intel.com> * profile.h: Really add it. From-SVN: r139210
2003-04-21Break out coverage routines to new file.Nathan Sidwell1-62/+0
* Makefile.in (COVERAGE_H): New variable (C_OBJS): Add coverage.o (coverage.o): New target. (profile.o, loop-init.o, sched-ebb.o, predict.o, tracer.o): Adjust dependencies. (GTFILES): Adjust. (gt-coverage.h): New target. (gt-profile.h): Remove. * profile.h: Remove. Move to ... * coverage.h: ... here. New. #include gcov-io.h. * gcov-io.h: Move function definitions to ... * gcov-io.c: ... here. New. * profile.c: Move coverage routines to coverage.c. (instrument_edges, get_exec_counts, branch_prob, init_branch_prob, end_branch_prob): Adjust. * coverage.c: New. Coverage routines from profile.c (coverage_counter_ref, coverage_init, coverage_finish, coverage_end_function, coverage_begin_output, coverage_counter_ref, get_coverage_counts): Define. * gcov-dump.c, gcov.c: #include gcov-io.c. * libgcov.c: Likewise. Adjust. * loop-init.c: Don't #include profile.h * tracer.c, predict.c, sched-ebb.c: Adjust #includes. * rtl.h: Add coverage prototypes. * toplev.c (compile_file): Init coverage, not branch_prob. Always call coverage_finish. (rest_of_compilation): Call coverage_end_function. From-SVN: r65897
2003-02-26gcov-dump.c (print_prefix): Fix signedness warning.Zdenek Dvorak1-11/+19
* gcov-dump.c (print_prefix): Fix signedness warning. * gcov-io.h (struct counter_section, struct counter_section_data): New. (struct function_info): n_arc_counts field removed, n_counter_sections, counter_sections fields added. (struct gcov_info): arc_counts, n_arc_counts fields removed, n_counter_sections, counter_sections fields added. * libgcov.c (gcov_exit, __gcov_flush): Add support for multiple profile sections. * profile.h (MAX_COUNTER_SECTIONS): New. (struct section_info): New. (struct profile_info): count_instrumented_edges, count_edges_instrumented_now fields removed, n_sections, section_info fields added. (find_counters_section): Declare. * profile.c (struct function_list): count_edges field removed, n_counter_sections, counter_sections fields added. (set_purpose, label_for_tag, build_counter_section_fields, build_counter_section_value, build_counter_section_data_fields, build_counter_section_data_value, build_function_info_fields, build_function_info_value, build_gcov_info_fields, build_gcov_info_value): New static functions. (find_counters_section): New function. (instrument_edges, get_exec_counts, compute_branch_probabilities, branch_prob, create_profiler): Modified to support multiple profile sections. From-SVN: r63474
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-1/+1
From-SVN: r60174
2002-05-12profile.h (profile_info): Add missing extern to declaration.Richard Henderson1-2/+4
* profile.h (profile_info): Add missing extern to declaration. * profile.c (profile_info): Define it. From-SVN: r53400
2002-05-09final.c (end_final): Use C trees to output data structures for profiling.Jan Hubicka1-0/+52
* final.c (end_final): Use C trees to output data structures for profiling. * Makefile.in (LIBGCC_DEPS): Added missing dependency on gcov-io.h (profile.o): New dependency profile.h (final.o): New dependency profile.h * profile.h: New file. New global structure profile_info. * final.h (count_edges_instrumented_now): Declare. (current_function_cfg_checksum): Declare. (function_list): New structure. (functions_head, functions_tail): New static variables. (end_final): Emits more data, removed some -ax stuff. (final): Stores function names and chcksums. * gcov-io.h (__write_gcov_string): New function. (__read_gcov_string): New function. * gcov.c (read_profile): New function. (create_program_flow_graph): Uses read_profile instead of reading da_file. (read_files): Removed da_file checking, it's done by read_profile now. * libgcc2.c (bb_function_info): New structure. (bb): New field in structure, removed some -ax stuff. (__bb_exit_func): Changed structure of da_file. * profile.c (count_edges_instrumented_now): New global variable. (current_function_cfg_checksum): New global variable. (max_counter_in_program): New global variable. (get_exec_counts): New function. (compute_checksum): New function. (instrument_edges): Sets count_edges_instrumented_now. (compute_branch_probabilities): Uses get_exec_counts instead of reading da_file. (branch_prob): Calls compute_checksum and writes extra data to bbg_file. (init_branch_prob): Removed da_file checking, done in get_exec_counts now. (end_branch_prob): Removed da_file checking, done in get_exec_counts now. * gcov.texi: Updated information about gcov file format. From-SVN: r53330