1. 01 Jan, 2019 1 commit
  2. 17 Dec, 2018 1 commit
    • coverage.c (struct conts_entry): Add n_counts. · 0418f237
      	* coverage.c (struct conts_entry): Add n_counts.
      	(remap_counts_file): Record number of ocunts.
      	(get_coverage_counts): Verify that counts match.
      	* coverage.h (get_coverage_counts): Update prototype.
      	* profile.c (get_exec_counts. compute_value_histograms): Add
      	n_counts parametrs.
      
      From-SVN: r267200
      Jan Hubicka committed
  3. 21 Sep, 2018 1 commit
    • Remove arc profile histogram in non-LTO mode. · 512cc015
      2018-09-21  Martin Liska  <mliska@suse.cz>
      
      	* auto-profile.c (autofdo_source_profile::read): Do not
      	set sum_all.
      	(read_profile): Do not add working sets.
      	(read_autofdo_file): Remove sum_all.
      	(afdo_callsite_hot_enough_for_early_inline): Remove const
      	qualifier.
      	* coverage.c (struct counts_entry): Remove gcov_summary.
      	(read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
      	do not support GCOV_TAG_PROGRAM_SUMMARY.
      	(get_coverage_counts): Remove summary and expected
      	arguments.
      	* coverage.h (get_coverage_counts): Likewise.
      	* doc/gcov-dump.texi: Remove -w option.
      	* gcov-dump.c (dump_working_sets): Remove.
      	(main): Do not support '-w' option.
      	(print_usage): Likewise.
      	(tag_summary): Likewise.
      	* gcov-io.c (gcov_write_summary): Do not dump
      	histogram.
      	(gcov_read_summary): Likewise.
      	(gcov_histo_index): Remove.
      	(gcov_histogram_merge): Likewise.
      	(compute_working_sets): Likewise.
      	* gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
      	it not obsolete.
      	(GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
      	(GCOV_TAG_SUMMARY_LENGTH): Adjust.
      	(GCOV_HISTOGRAM_SIZE): Remove.
      	(GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
      	(struct gcov_summary): Simplify rapidly just
      	to runs and sum_max fields.
      	(gcov_histo_index): Remove.
      	(NUM_GCOV_WORKING_SETS): Likewise.
      	(compute_working_sets): Likewise.
      	* gcov-tool.c (print_overlap_usage_message): Remove
      	trailing empty line.
      	* gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
      	(output_lines): Remove program related line.
      	* ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
      	* lto-cgraph.c (output_profile_summary): Do not stream GCOV
      	histogram.
      	(input_profile_summary): Do not read it.
      	(merge_profile_summaries): And do not merge it.
      	(input_symtab): Do not call removed function.
      	* modulo-sched.c (sms_schedule): Do not print sum_max.
      	* params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
      	removed when histogram method was invented.
      	(HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
      	mode.
      	* postreload-gcse.c (eliminate_partially_redundant_load): Fix
      	GCOV coding style.
      	* predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
      	and dump selected value.
      	* profile.c (add_working_set): Remove.
      	(get_working_sets): Likewise.
      	(find_working_set): Likewise.
      	(get_exec_counts): Do not work with working sets.
      	(read_profile_edge_counts): Do not inform as sum_max is removed.
      	(compute_branch_probabilities): Likewise.
      	(compute_value_histograms): Remove argument for call of
      	get_coverage_counts.
      	* profile.h: Do not make gcov_summary const.
      2018-09-21  Martin Liska  <mliska@suse.cz>
      
      	* libgcov-driver.c (crc32_unsigned): Remove.
      	(gcov_histogram_insert): Likewise.
      	(gcov_compute_histogram): Likewise.
      	(compute_summary): Simplify rapidly.
      	(merge_one_data): Do not handle PROGRAM_SUMMARY tag.
      	(merge_summary): Rapidly simplify.
      	(dump_one_gcov): Ignore gcov_summary.
      	(gcov_do_dump): Do not handle program summary, it's not
      	used.
      	* libgcov-util.c (tag_summary): Remove.
      	(read_gcda_finalize): Fix coding style.
      	(read_gcda_file): Initialize curr_object_summary.
      	(compute_summary): Remove.
      	(calculate_overlap): Remove settings of run_max.
      
      From-SVN: r264462
      Martin Liska committed
  4. 05 Jun, 2018 1 commit
    • Simplify gcov_histogram as it's used only for ARCS counters. · 7f3577f5
      2018-06-05  Martin Liska  <mliska@suse.cz>
      
      	* auto-profile.c (read_autofdo_file): Do not use
      	gcov_ctr_summary struct.
      	(afdo_callsite_hot_enough_for_early_inline): Likewise.
      	* coverage.c (struct counts_entry): Likewise.
      	(read_counts_file): Read just single summary entry.
      	(get_coverage_counts): Use gcov_summary struct.
      	* coverage.h (get_coverage_counts): Likewise.
      	* gcov-dump.c (dump_working_sets): Likewise.
      	(tag_summary): Dump just single summary.
      	* gcov-io.c (gcov_write_summary): Write just histogram
      	summary.
      	(gcov_read_summary): Read just single summary.
      	(compute_working_sets): Use gcov_summary struct.
      	* gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
      	of GCOV_COUNTERS_SUMMABLE.
      	(GCOV_COUNTERS_SUMMABLE): Remove.
      	(GCOV_FIRST_VALUE_COUNTER): Replace with
      	GCOV_COUNTER_V_INTERVAL.
      	(struct gcov_ctr_summary): Remove.
      	(struct gcov_summary): Directly use fields of former
      	gcov_ctr_summary.
      	(compute_working_sets): Use gcov_summary struct.
      	* gcov.c (read_count_file): Do not use ctrs fields.
      	* lto-cgraph.c (merge_profile_summaries): Use gcov_summary
      	struct.
      	* lto-streamer.h (struct GTY): Make profile_info gcov_summary
      	struct.
      	* profile.c: Likewise.
      	* profile.h: Likewise.
      2018-06-05  Martin Liska  <mliska@suse.cz>
      
      	* libgcov-driver.c (gcov_compute_histogram): Remove usage
      	of gcov_ctr_summary.
      	(compute_summary): Do it just for a single summary.
      	(merge_one_data): Likewise.
      	(merge_summary): Simplify as we read just single summary.
      	(dump_one_gcov): Pass proper argument.
      	* libgcov-util.c (compute_one_gcov): Simplify as we have just
      	single summary.
      	(gcov_info_count_all_cold): Likewise.
      	(calculate_overlap): Likewise.
      
      From-SVN: r261189
      Martin Liska committed
  5. 03 Jan, 2018 1 commit
  6. 28 Apr, 2017 1 commit
  7. 01 Jan, 2017 1 commit
  8. 04 Jan, 2016 1 commit
  9. 05 Jan, 2015 1 commit
  10. 26 Jul, 2014 1 commit
  11. 04 Jun, 2014 1 commit
  12. 02 Jan, 2014 1 commit
  13. 09 Aug, 2013 1 commit
    • cgraph.h (cgraph_node): Add profile_id. · 2fa3d31b
      	* cgraph.h (cgraph_node): Add profile_id.
      	* value-prof.c (cgraph_node_map): Turn into pointer_map.
      	(init_node_map): Rewrite to handle hashes increas of incremental
      	IDs.
      	(del_node_map): Update.
      	(find_func_by_funcdef_no): Replace by ...
      	(find_func_by_profile_id): ... this one.
      	(gimple_ic_transform): Do not remove useful histograms when
      	speculation is not done; dump info when indirect call removal
      	can happen at LTO.
      	* value-prof.h (find_func_by_profile_id, gimple_ic): Declare.
      	* gcov-io.h (__gcov_indirect_call_profiler): Replace by ...
      	(__gcov_indirect_call_profiler_v2): .. this one.
      	* profile.h (init_node_map): Update.
      	* coverage.c (coverage_compute_profile_id): New function.
      	* coverage.h (coverage_compute_profile_id): Declare.
      	* tree-profile.c (init_ic_make_global_vars): Make
      	__gcov_indirect_call_callee and  __gcov_indirect_call_counters global.
      	(gimple_init_edge_profiler): Update prototype of
      	__gcov_indirect_call_profiler.
      	(gimple_gen_ic_func_profiler): Simplify.
      	(tree_profiling): Use init_node_map
      
      From-SVN: r201634
      Jan Hubicka committed
  14. 10 Jan, 2013 1 commit
  15. 04 Jan, 2013 1 commit
  16. 04 Dec, 2011 1 commit
    • gcov-io.h (struct gcov_info): Replace trailing array with pointer to array. · b724567e
      	* gcov-io.h (struct gcov_info): Replace trailing array with
      	pointer to array.
      	* profile.c (branch_prob): Only call renamed
      	coverage_begin_function once.
      	* coverage.h (coverage_begin_output): Rename to ...
      	(coverage_begin_function): ... here.
      	* coverage.c (struct function_list): Rename to ...
      	(struct coverage_data): ... this.  Update all uses.
      	(gcov_info_var, gcov_fn_info_type, gcov_fn_info_ptr_type): New
      	globals.
      	(bbg_file_opened, bbg_function_announced): Remove.
      	(get_coverage_counts): Adjust message.
      	(coverage_begin_ouput): Rename to ...
      	(coverage_begin_function): ... here.  Move file opening to
      	coverage_init.  Adjust for being called only once.
      	(coverage_end_function): Remove bbg file and inhibit further
      	output here on error.
      	(build_info_type): Adjust for change to pointer to array.
      	(build_info): Receive array of function pointers and adjust.
      	(create_coverage): Break into ...
      	(coverage_obj_init, coverage_obj_fn, coverage_obj_finish):
      	... these, and adjust.
      	(coverage_init): Open the notes file here.  Tidy.
      	(coverage_finish): Call coverage_obj_init etc.
      
      From-SVN: r181994
      Nathan Sidwell committed
  17. 29 Apr, 2011 1 commit
  18. 20 Feb, 2009 1 commit
  19. 08 Mar, 2008 1 commit
    • coverage.h (tree_coverage_counter_addr): Declare. · fc9161c1
      2008-03-08  Richard Guenther  <rguenther@suse.de>
      
      	* coverage.h (tree_coverage_counter_addr): Declare.
      	* coverage.c (tree_coverage_counter_addr): New function.
      	* tree-profile.c (tree_gen_edge_profiler): Unshare counter
      	before using again.
      	(tree_gen_pow2_profiler): Use tree_coverage_counter_addr.
      	(tree_gen_one_value_profiler): Likewise.
      	(tree_gen_ic_profiler): Likewise.
      	(tree_gen_average_profiler): Likewise.
      	(tree_gen_ior_profiler): Likewise.
      
      From-SVN: r133041
      Richard Guenther committed
  20. 26 Jul, 2007 1 commit
  21. 28 Jul, 2005 1 commit
    • Makefile.in (rtl-profile.o): Kill all traces of it. · 8a76829c
      	* Makefile.in (rtl-profile.o): Kill all traces of it.
      	* common.opt (fspeculative-prefetching, ftree-based-profiling): Kill.
      	* coverage.h (rtl_coverage_counter_ref): Kill.
      	* opts.c (flag_speculative_prefetching_set): Kill.
      	(flag_loop_optimize_set): New.
      	(common_handle_option): Disable loop optimizer when profiling;
      	do not handle speculative prefetching.
      	* passes.c (init_optimization_passes): Replace pass_profiling combo
      	by branch_prob pass.
      	* profile.c (compute_value_histograms): Update for simplified value
      	profiles.
      	(rtl_register_profile_hooks): Kill.
      	(pass_profiling): Kill.
      	(rest_of_handle_branch_prob): Do not profile.
      	* toplev.c (process_options): Remove speculative prefetching.
      	* toplev.h (flag_tree_based_profiling): Kill.
      	* tree-profile.c (prepare_instrumented_value,
      	tree_gen_interval_profiler, tree_gen_pow2_profiler,
      	tree_gen_one_value_profiler, do_tree_profiling): Update for
      	simplified datastructures.
      	* value-prof.c: Add comment that speculative prefetching was dropped;
      	update rest of file for simplified datastructures.
      	(NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX,
      	rtl_divmod_values_to_profile, insn_prefetch_values_to_profile,
      	find_mem_reference_1, find_mem_reference_2, find_mem_reference,
      	rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2,
      	rtl_mod_subtract, gen_speculative_prefetch,
      	rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform,
      	rtl_mod_subtract_transform, speculative_prefetching_transform): Kill.
      	(gate_handle_value_profile_transformations,
      	rest_of_handle_value_profile_transformations,
      	pass_value_profile_transformations): Kill.
      	* value-prof.h (histogram_value_t): Remove IL based unions.
      	(rtl_register_value_prof_hooks, rtl_register_profile_hooks,
      	rtl_profile_hooks): Remove hooks.
      
      	* invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill.
      
      	* inliner-1.c: Do not dump everything.
      	* tree-prof.exp: Do not pass -ftree-based-profiling.
      	* bprob.exp: Likewise.
      
      From-SVN: r102522
      Jan Hubicka committed
  22. 25 Jun, 2005 1 commit
  23. 06 Apr, 2005 1 commit
    • coverage.h (GCOV_TYPE_NODE): Delete. · 070e3969
      	* coverage.h (GCOV_TYPE_NODE): Delete.
      	* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref)
      	(build_ctr_info_type): Use get_gcov_type () instead of GCOV_TYPE_NODE.
      	* tree-profile.c (tree_gen_edge_profiler, tree_gen_interval_profiler)
      	(tree_gen_pow2_profiler, tree_gen_one_value_profiler): Likewise.
      	* value-prof.c (tree_divmod_fixed_value_transform): Delete.
      
      From-SVN: r97760
      Richard Sandiford committed
  24. 04 Apr, 2005 1 commit
    • system.h (GCOV_SIZE_TYPE): Unposion. · 251e2ff2
      	* system.h (GCOV_SIZE_TYPE): Unposion.
      	* gcov-io.h (GCOV_TYPE_NODE): Delete, replacing with...
      	(GCOV_TYPE_SIZE): ...this new macro.
      	* coverage.h (get_gcov_type, GCOV_TYPE_NODE): Declare.
      	* coverage.c (get_gcov_type, get_gcov_unsigned_t): New functions.
      	(rtl_coverage_counter_ref): Use GCOV_TYPE_SIZE.
      	(build_fn_info_type, build_fn_info_value, build_ctr_info_type)
      	(build_ctr_info_value, build_gcov_info): Use get_gcov_unsigned_t
      	instead of unsigned_intSI_type_node.
      	* rtl-profile.c (rtl_gen_interval_profiler, rtl_gen_pow2_profiler)
      	(rtl_gen_one_value_profiler_no_edge_manipulation)
      	(rtl_gen_const_delta_profiler): Use GCOV_TYPE_SIZE.
      	* value-prof.c: Include coverage.h.
      
      From-SVN: r97570
      Richard Sandiford committed
  25. 18 Jan, 2005 1 commit
    • basic-block.h, [...]: Update copyright. · ad616de1
      	* basic-block.h, c-common.c, c-cppbuiltin.c, c-lang.c,
      	c-tree.h, cfgbuild.c, cgraph.c, cgraph.h, collect2.c,
      	combine.c, config.gcc, coverage.h, cse.c, cselib.c,
      	defaults.h, df.c, dwarf2asm.c, dwarf2out.c, explow.c, expr.c,
      	flow.c, fold-const.c, gcse.c, ggc-page.c, gimple-low.c,
      	gimplify.c, ifcvt.c, langhooks-def.h, lcm.c, optabs.h,
      	output.h, postreload-gcse.c, postreload.c, recog.c,
      	resource.c, rtl.def, rtlanal.c, sched-deps.c, sched-rgn.c,
      	targhooks.h, toplev.c, tree-data-ref.c, tree-eh.c,
      	tree-flow.h, tree-loop-linear.c, tree-mudflap.h, tree-nrv.c,
      	tree-optimize.c, tree-outof-ssa.c, tree-pass.h,
      	tree-scalar-evolution.c, tree-ssa-copy.c, tree-ssa-dce.c,
      	tree-ssa-dse.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c,
      	tree-ssa-pre.c, tree-ssa.c, tree-vectorizer.c, tree.def,
      	unwind-dw2-fde-darwin.c, var-tracking.c: Update copyright.
      
      From-SVN: r93827
      Kazu Hirata committed
  26. 14 Jan, 2005 1 commit
  27. 15 Oct, 2004 1 commit
    • bitmap.c, [...]: Update copyright. · f30278e8
      	* bitmap.c, bitmap.h, builtin-attrs.def, cfglayout.h,
      	collect2.h, conflict.c, coretypes.h, coverage.h, errors.h,
      	gcc.h, gcov-dump.c, gen-protos.c, gencheck.c, gencodes.c,
      	genconstants.c, gengenrtl.c, genmodes.c, genpeep.c,
      	gensupport.h, graph.h, gthr-gnat.c, gthr-gnat.h, gthr-posix.c,
      	gthr-posix.h, hard-reg-set.h, hwint.h, integrate.h, libgcc2.c,
      	lists.c, machmode.def, mips-tdump.c, opts.h, params.c,
      	predict.def, predict.h, protoize.c, reload.h, resource.h,
      	rtl-error.c, sbitmap.c, sbitmap.h, sreal.c, tlink.c,
      	tree-dump.h, tree-inline.h, unwind-dw2-fde.c, unwind-dw2.c,
      	unwind-sjlj.c, value-prof.h: Update copyright.
      
      From-SVN: r89097
      Kazu Hirata committed
  28. 13 May, 2004 1 commit
  29. 20 Oct, 2003 1 commit
    • toplev.c (rest_of_compilation): Fix webizer pass ordering. · d4d1ebc1
      	* toplev.c (rest_of_compilation): Fix webizer pass ordering.
      
      	* cgraphunit.c (decide_is_function_needed):  Fix test dealing
      	with functions implicitly made inline.
      
      	* cgraphunit.c (cgraph_decide_inlining_incrementally):  New function.
      	(cgraph_finalize_function): Use it.
      	(cgraph_mark_inline): Allow incrmental decisions
      	* invoke.texi (max-inline-slope, min-inline-insns): Kill.
      	* params.def (PARAM_MAX_INLINE_SLOPE, PARAM_MIN_INLINE_INSNS): Kill.
      	* tree-inline.c (limits_allow_inlining): Kill.
      	(expand_call_inline): Always use unit-at-a-time path.
      
      	* decl.c (start_cleanup_fn):  Set DECL_DECLARED_INLINE_P to deffer
      	the expansion.
      
      	* testsuite/g++.dg/opt/inline4.C: Do not use min-inline-insns
      	parameter.
      	* testsuite/gcc.dg/inline-2.c: Likewise.
      
      From-SVN: r72721
      Jan Hubicka committed
  30. 11 May, 2003 1 commit
    • coverage.h (coverage_counter_alloc): New function. · 6d70e6be
      	* coverage.h (coverage_counter_alloc): New function.
      	* function.h (struct function): Remove arc_profile flag.
      	* coverage.c (fn_ident): Remove.
      	(fn_b_ctrs, no_coverage): New.
      	(get_coverage_counts): Use current_function_funcdef_no.
      	(coverage_counter_alloc): New.
      	(coverage_counter_ref): Adjust.
      	(coverage_begin_output): Check no_coverage. Use
      	current_function_funcdef_no.
      	(coverage_end_function): Likewise.
      	(create_coverage): Set no_coverage. Set DECL_UNINLINEABLE rather
      	than clearing flag_inline_functions. Do not clear arc_profile
      	flag.
      	* function.c (prepare_function_start): Do not set arc_profile
      	flag.
      	* profile.c (instrument_edges): Return number of instrumented
      	edges. Use a for loop.
      	(branch_prob): Call coverage_counter_alloc. Make BB_TO_GCOV_INDEX
      	local to here and simplify. Use profile_arc_flag not arc_profile
      	flag.
      	(find_spanning_tree): Reformat.
      	* toplev.c (rest_of_compilation): Use profile_arc_flags and
      	flag_test_coverage rather than arc_profile flag.
      
      From-SVN: r66695
      Nathan Sidwell committed
  31. 23 Apr, 2003 1 commit
    • Makefile.in (LIBGCC_DEPS): Add gcov headers. · cdb23767
      	* Makefile.in (LIBGCC_DEPS): Add gcov headers.
      	(libgcov.a): Depends on LIBGCC_DEPS.
      	* basic-block.h (profile_info): Moved here from coverage.h. Made
      	a pointer.
      	* coverage.c (struct function_list): Fixed array of counter types.
      	(struct counts_entry): Keyed by counter type, contains summary.
      	(profile_info): Moved to profile.c.
      	(prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global
      	vars.
      	(profiler_label): Remove.
      	(ctr_labels): New.
      	(set_purpose, label_for_tag, build_counter_section_fields,
      	build_counter_section_value, build_counter_section_data_fields,
      	build_counter_section_data_values, build_function_info_fields,
      	build_function_info_value, gcov_info_fields, gcov_info_value): Remove.
      	(build_fn_info_type, build_fn_info_value, build_ctr_info_type,
      	build_ctr_info_value, build_gcov_info): New.
      	(htab_counts_entry_hash, htab_counts_entry_eq): Adjust.
      	(reads_counts_file): Adjust.
      	(get_coverage_counts): Takes counter number. Add summary
      	parameter. Adjust.
      	(coverage_counter_ref): Tkaes counter number. Adjust. Lazily
      	create counter array labels.
      	(coverage_end_function): Adjust.
      	(create_coverage): Adjust.
      	(find_counters_section): Remove.
      	* coverage.h (MAX_COUNTER_SECTIONS): Remove.
      	(struct section_info, struct profile_info): Remove.
      	(profile_info): Moved to basic-block.h.
      	(coverage_counter_ref): Takes a counter number.
      	(get_coverage_counts): Takes a counter number. Added summary
      	parameter.
      	(find_counters_section): Remove.
      	* gcov-dump.c (tag_arc_counts): Rename to ...
      	(tag_counters): ... here. Adjust.
      	(tag_table): Move tag_counters to 3rd entry. Remove
      	PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries.
      	(dump_file): Check for counter tag values here.
      	(tag_summary): Adjust.
      	* gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust.
      	* gcov-io.h (GCOV_LOCKED): New.
      	(GCOV_TAG_ARC_COUNTS): Rename to ...
      	(GCOV_TAG_COUNTS_BASE): ... here.
      	(GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY):
      	Remove.
      	(GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New.
      	(GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG,
      	GCOV_TAG_IS_COUNTER): New.
      	(struct gcov_ctr_summary): New.
      	(struct gcov_summary): Adjust.
      	(struct gcov_counter_section): Remove.
      	struct gcov_counter_section_data): Remove.
      	(struct gcov_function_info): Rename to ...
      	(struct gcov_fn_info): ... here. Adjust.
      	(struct gcov_ctr_info): New.
      	(struct gcov_info): Adjust.
      	* gcov.c (read_count_file): Adjust.
      	(output_lines): Adjust.
      	* libgcov.c (gcov_exit): Adjust.
      	(__gcov_flush): Adjust.
      	* mklibgcc.in (libgcc2_c_dep): Add gcov headers.
      	* predict.c (maybe_hot_bb_p, probably_cold_bb_p,
      	probably_never_executed_bb_p, compute_frequency_function): Adjust
      	profile_info use.
      	* profile.c (struct counts_entry): Remove.
      	(profile_info): Define here.
      	(get_exec_counts): Adjust get_coverage_counts call.
      	(compute_branch_probablilities): Remove find_counters_section
      	call.
      	(gen_edge_profiler): Adjust coverage_counter_ref call.
      	* tracer.c (tail_duplicate): Adjust profile_info use.
      
      From-SVN: r65990
      Nathan Sidwell committed
  32. 21 Apr, 2003 1 commit
    • Break out coverage routines to new file. · ca29da43
              * 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
      Nathan Sidwell committed
  33. 26 Feb, 2003 1 commit
    • gcov-dump.c (print_prefix): Fix signedness warning. · cb9e4555
      	* 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
      Zdenek Dvorak committed
  34. 16 Dec, 2002 1 commit
  35. 12 May, 2002 1 commit
  36. 09 May, 2002 1 commit
    • final.c (end_final): Use C trees to output data structures for profiling. · 52015d87
      	* 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
      Jan Hubicka committed