aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov-io.h
AgeCommit message (Collapse)AuthorFilesLines
2007-02-03re PR gcov-profile/30650 (ICE with -fprofile-use)Jan Hubicka1-4/+4
PR gcov-profile/30650 * value-prof.c (stringop_block_profile): Fix handling of size counter; do not divide by zero for never executed counters. (tree_find_values_to_profile): Fix counters. * gcov-ui.h (GCOV_COUNTER_AVERAGE, GCOV_COUNTER_IOR): Fix comments. From-SVN: r121554
2007-01-29gcov-io.h (__gcov_indirect_call_profiler): Declare.Ben Elliston1-0/+4
* gcov-io.h (__gcov_indirect_call_profiler): Declare. (__gcov_average_profiler): Likewise. (__gcov_ior_profiler): Likewise. (__gcov_merge_ior): Likewise. From-SVN: r121280
2007-01-28expr.c (emit_block_move_via_movmem, [...]): Add variant handling histograms; ↵Jan Hubicka1-4/+11
add wrapper. * expr.c (emit_block_move_via_movmem, emit_block_move_via_libcall): Add variant handling histograms; add wrapper. (clear_storage_via_libcall): Export. (emit_block_move_hints): Break out from ...; add histograms. (emit_block_move): ... this one. (clear_storage_hints): Break out from ...; add histograms. (clear_storage): ... this one. (set_storage_via_memset): Handle histogram. * expr.h (emit_block_move_via_libcall, emit_block_move_hints): Declare. (clear_storage_hints, clear_storage_via_libcall): Declare. (set_storage_via_setmem): Update prototype. * doc/md.texi (movmem, setmem): Document new arguments. * value-prof.c (dump_histogram_value, tree_find_values_to_profile): Add new histograms. (stringop_block_profile): New global function. (tree_stringops_values_to_profile): Profile block size and alignment. * value-prof.h (enum hist_type): add HIST_TYPE_AVERAGE and HIST_TYPE_IOR. (struct profile_hooks): Add gen_average_profiler and gen_ior_profiler. (stringop_block_profile): Declare. * builtins.c: Include value-prof.h. (expand_builtin_memcpy, expand_builtin_memset): Pass block profile. * gcov-ui.h (GCOV_COUNTER_NAMES): Add new counter. (GCOV_COUNTER_AVERAGE, GCOV_COUNTER_IOR): New constants. (GCOV_COUNTERS, GCOV_LAST_VALUE_COUNTER): Update. * profile.c (instrument_values): Add new counters. * cfgexpand.c (expand_gimple_basic_block): Propagate histograms to calls. * tree-profile.c (tree_average_profiler_fn, tree_ior_profiler_fn): New. (tree_init_edge_profiler): Build new profilers. (tree_gen_average_profiler, tree_gen_ior_profiler): New. (pass_tree_profile): Add dump. (tree_profile_hooks): Update. * Makefile.in (LIBGCOV): Add new constants. * libgcov.c (__gcov_merge_ior, __gcov_average_profiler, __gcov_ior_profiler): New. * i386.md (movmem/setmem expanders): Add new optional arguments. From-SVN: r121270
2007-01-19Patch by Tomas Bily <tbily@suse.cz>Tomas Bily1-4/+7
Patch by Tomas Bily <tbily@suse.cz> * cgraphunit.c (cgraph_finalize_function): Updating of pid * tree-profile.c: (tree_init_ic_make_global_vars): New function (tree_init_edge_profiler): call of tree_init_ic_make_global_vars (tree_gen_ic_profiler): New function (tree_gen_ic_func_profiler): New function (tree_profiling): Added calling of tree_gen_ic_func_profiler (tree_profile_hooks): Added hook for indirec/virtual calls * value-prof.c (tree_find_values_to_profile): New case for indirect calls (tree_values_to_profile): Call for determining indirect/virtual counters (tree_indirect_call_to_profile): New function (tree_ic_transform): New function (tree_ic): New function (find_func_by_pid): New function (init_pid_map): New function (tree_value_profile_transformations): Added check for indirect/virtual call transformation * value-prof.h (enum hist_type): New counter type for indirect/virtual calls (profile_hooks): Added new hook for profiling indirect/virtual calls * profile.c (instrument_values): New case for indirect/virtual call added * gcov-io.h (GCOV_LAST_VALUE_COUNTER): Changed to 6 (GCOV_COUNTER_V_INDIR): New counter type (GCOV_COUNTER_NAMES): New name of counter "indirect" added (GCOV_MERGE_FUNCTIONS): New merge function for indirect/virtual call added * cgraph.c: Definition of cgraph_max_pid (cgraph_create_node): Default init of pid attribute * cgraph.h: Declaration of cgraph_max_pid (struct cgraph_node): Added pid attribute * libgcov.c (__gcov_indirect_call_profiler): New function (__gcov_one_value_profiler_body): New function (__gcov_one_value_profiler): Body was moved to __gcov_one_value_profiler_body and calls it gcc.dg/tree-prof/indir-call-prof.c: New. g++.dg/dg.exp: Add tree-prof subdirectory. g++.dg/tree-prof/indir-call-prof.C: New. g++.dg/tree-prof/tree-prof.exp: New. From-SVN: r120975
2005-07-13linux.h (TARGET_HAS_F_SETLKW): Renamed to ...H.J. Lu1-1/+1
2005-07-13 H.J. Lu <hongjiu.lu@intel.com> * config/alpha/linux.h (TARGET_HAS_F_SETLKW): Renamed to ... (TARGET_POSIX_IO): This. * config/darwin.h: Likewise. * config/freebsd.h: Likewise. * config/linux.h: Likewise. * config/lynx.h: Likewise. * config/netbsd.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/linux.h: Likewise. * config/s390/tpf.h: Likewise. * config/sh/embed-elf.h: Likewise. * config/sparc/linux64.h: Likewise. * config/sparc/linux.h: Likewise. * config/svr4.h: Likewise. * gcov-io.h: Likewise. * doc/tm.texi: Updated. * libgcov.c (create_file_directory): Defined only if TARGET_POSIX_IO is defined. (gcov_exit): Call create_file_directory only if TARGET_POSIX_IO is defined. From-SVN: r101973
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-05-08Makefile.in (cs-tconfig.h): Pass USED_FOR_TARGET to mkconfig.shNathan Sidwell1-1/+1
* Makefile.in (cs-tconfig.h): Pass USED_FOR_TARGET to mkconfig.sh * aclocal.m4 (GCC_TARGET_TEMPLATE, AH_TEMPLATE): New. * configure.ac (enable_checking): Fix typos in runtime_checking. (ENABLE_RUNTIME_CHECKING): Mark as target template. (xm_file): Prepend auto-host.h (HAVE_GAS_HIDDEN, HAVE_LD_EH_FRAME_HDR): Mark as target template. * mkconfig.sh: Do not automatically define USED_FOR_TARGET in tconfig.h. * crtstuff.c: Do not include auto-host.h. (IN_LIBGCC2): Do not define. * gcov-io.h: Include tconfig.h, not auto-host.h. * libgcc2.c: Do not include auto-host.h. (abort): Do not undefine. * libgcov.c: Remove unneeded comment about config.h. * unwind-dw2-fde-glibc.c: Do not inlude auto-host.h. * config.in, configure: Regenerated. Co-Authored-By: Paolo Bonzini <bonzini@gnu.org> From-SVN: r99386
2005-05-02re PR middle-end/19985 (executables created with -fprofile-arcs ↵Janis Johnson1-26/+43
-ftest-coverage segfault in gcov_exit ()) PR 19985 * gcov-io.h: Declare gcov external functions hidden. From-SVN: r99109
2005-04-28attribs.c, [...]: Update copyright.Kazu Hirata1-1/+1
* attribs.c, c-pragma.c, caller-save.c, cfghooks.h, coverage.c, cselib.h, domwalk.c, domwalk.h, errors.c, errors.h, gcov-dump.c, gcov-io.c, gcov-io.h, gen-protos.c, genattrtab.h, genextract.c, gthr-win32.h, insn-notes.def, integrate.c, lambda-mat.c, lambda.h, libgcov.c, local-alloc.c, machmode.def, mips-tfile.c, params.c, pretty-print.c, print-rtl.c, protoize.c, regmove.c, sched-vis.c, tree-chrec.h, tree-data-ref.h, vec.h, config/darwin-c.c, config/sol2-c.c, config/sol2.c, config/arm/arm-cores.def, config/arm/cirrus.md, config/arm/symbian.h, config/c4x/c4x.c, config/c4x/c4x.h, config/i386/cygming.h, config/i386/djgpp.h, config/i386/lynx.h, config/i386/netware.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/iq2000/iq2000.c, config/m32r/little.h, config/m68k/m68k-protos.h, config/m68k/m68k.h, config/m68k/m68k.md, config/mcore/mcore.c, config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.md, config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/netbsd.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa-hpux11.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/rs6000/darwin.h, config/rs6000/default64.h, config/rs6000/rs6000-c.c, config/s390/2064.md, config/s390/2084.md, config/s390/s390-modes.def, config/s390/s390-protos.h, config/s390/tpf.h, config/sh/sh.h, config/sh/symbian.c, config/stormy16/stormy16.c, config/vax/vax-protos.h, config/vax/vax.c, config/vax/vax.h, config/xtensa/lib1funcs.asm, config/xtensa/xtensa.md: Update copyright. From-SVN: r98914
2005-04-22Makefile.in (LIBGCOV): Add _gcov_interval_profiler, _gcov_pow2_profiler and ↵Zdenek Dvorak1-0/+5
_gcov_one_value_profiler. * Makefile.in (LIBGCOV): Add _gcov_interval_profiler, _gcov_pow2_profiler and _gcov_one_value_profiler. (tree-profile.o): Add GGC_H and gt-tree-profile.h dependency. (GTFILES): Add $(srcdir)/tree-profile.c. * gcov-io.h (__gcov_interval_profiler, __gcov_pow2_profiler, __gcov_one_value_profiler): Declare. * gimplify.c (force_gimple_operand): Check whether the statements should be produced in ssa form. (force_gimple_operand_bsi): New function. * libgcov.c (__gcov_interval_profiler, __gcov_pow2_profiler, __gcov_one_value_profiler): New functions. * rtl-profile.c (rtl_gen_pow2_profiler): Only measure whether the profiled value is a power of two or not. * tree-cfg.c (tree_block_ends_with_condjump_p): Handle empty blocks. * tree-flow.h (in_ssa_p): Declare. (force_gimple_operand_bsi): Declare. * tree-into-ssa.c (in_ssa_p): New variable. (rewrite_into_ssa): Set in_ssa_p. * tree-outof-ssa.c (rewrite_out_of_ssa): Set in_ssa_p. * tree-profile.c: Include ggc.h and gt-tree-profile.h. (gcov_type_node, tree_interval_profiler_fn, tree_pow2_profiler_fn, tree_one_value_profiler_fn): New variables. (tree_init_edge_profiler): Initialize the profiler function decls. (tree_gen_edge_profiler): Use global gcov_type_node. (prepare_instrumented_value): New function. (tree_gen_interval_profiler, tree_gen_interval_profiler, tree_gen_one_value_profiler): Call the library functions instead of creating instrumentation code. * tree.c (build_fn_decl): New function. * tree.h (build_fn_decl): Declare. * value-prof.c (rtl_divmod_values_to_profile, rtl_find_values_to_profile, rtl_mod_pow2_value_transform, tree_mod_pow2_value_transform, tree_find_values_to_profile): Do not handle may_be_other and precise values of exponents at pow2 profiler. (tree_mod_subtract_transform): Reflect that value field of histogram has changed meaning. (tree_divmod_values_to_profile): Record the values correctly. (tree_values_to_profile): Update comment. * value-prof.h (struct histogram_value_t): Remove pow2 data. From-SVN: r98555
2005-04-04system.h (GCOV_SIZE_TYPE): Unposion.Richard Sandiford1-5/+1
* 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
2005-04-01gcov-io.h (GCOV_CHECK, [...]): Remove.Nathan Sidwell1-16/+2
* gcov-io.h (GCOV_CHECK, GCOV_CHECK_READING, GCOV_CHECK_WRITING): Remove. (gcov_position, gcov_rewrite): Use gcc_assert. * gcov-io.c (gcov_open, gcov_write_words, gcov_write_length, gcov_read_words, gcov_sync, gcov_seek): Use gcc_assert. * libgcov.c (__gcov_merge_single, __gcov_merge_delta): Use gcc_assert. From-SVN: r97392
2004-08-30gcov-io.c (GCOV_CHECK): Use gcc_assert when available.Nathan Sidwell1-2/+7
* gcov-io.c (GCOV_CHECK): Use gcc_assert when available. * gcov.c (abort): Remove undef. From-SVN: r86781
2004-07-29gcov-io.h: Allow zero tag as EOF indicator.Nathan Sidwell1-31/+11
* gcov-io.h: Allow zero tag as EOF indicator. (gcov_is_eof): Remove. (gcov_truncate): Remove. * gcov-io.c (gcov_seek): Always SEEK_SET. * libgcov.c (gcov_exit): Don't use gcov_truncate. Write explicit EOF tag. * coverage.c (read_counts_file): Don't use gcov_is_eof. * gcov-dump.c (dump_file): Likewise. * gcov.c (read_graph_file, read_count_file): Likewise. From-SVN: r85291
2004-04-25gcov-io.h (__gcov_fork, [...]): Do not declare when inhibit_libc is defined.Zdenek Dvorak1-0/+2
* gcov-io.h (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle, __gcov_execv, __gcov_execvp, __gcov_execve): Do not declare when inhibit_libc is defined. From-SVN: r81164
2004-04-23Makefile.in (LIBGCOV): Add _gcov_fork...Zdenek Dvorak1-0/+10
* Makefile.in (LIBGCOV): Add _gcov_fork, _gcov_execl, _gcov_execlp, _gcov_execle, _gcov_execv, _gcov_execvp, _gcov_execve. * builtin-types.def (BT_PID, BT_PTR_CONST_STRING, BT_FN_PID, BT_FN_INT_CONST_STRING_PTR_CONST_STRING, BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING): New. * builtins.c (expand_builtin_fork_or_exec): New. (expand_builtin): Call it. * builtins.def (BUILT_IN_EXECL, BUILT_IN_EXECLP,BUILT_IN_EXECLE, BUILT_IN_EXECV, BUILT_IN_EXECVP, BUILT_IN_EXECVE, BUILT_IN_FORK): New. * c-common.c (PID_TYPE): New macro. (c_common_nodes_and_builtins): Initialize pid_type_node. * calls.c (special_function_p): Do not handle fork and exec. (expand_call): Do not handle ECF_FORK_OR_EXEC. * gcov-io.h (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle, __gcov_execv, __gcov_execvp, __gcov_execve): Declare. * libgcov.c (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle, __gcov_execv, __gcov_execvp, __gcov_execve): New. * tree.h (enum tree_index): Add TI_PID_TYPE. (pid_type_node): New macro. (ECF_FORK_OR_EXEC): Removed. From-SVN: r81118
2004-03-22re PR target/14291 (-fprofile-arcs fails (unresolved symbol))Danny Smith1-1/+4
PR target/14291 * gcov-io.h (gcov_truncate): Define ftruncate as _chsize for __MINGW32__. From-SVN: r79809
2003-10-10Fri Oct 10 18:54:39 CEST 2003 Herman A.J. ten Brugge <hermantenbrugge@home.nl>Herman A.J. ten Brugge1-0/+21
* gcov-io.h: Check BITS_PER_UNIT when defining gcov_unsigned_t, gcov_position_t and gcov_type. From-SVN: r72301
2003-10-05c-pretty-print.c: Fix comment typos.Kazu Hirata1-1/+1
* c-pretty-print.c: Fix comment typos. * c-pretty-print.h: Likewise. * calls.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cppfiles.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcov-io.h: Likewise. * gcse.c: Likewise. * genoutput.c: Likewise. * loop.c: Likewise. * postreload.c: Likewise. * reg-stack.c: Likewise. * regmove.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * simplify-rtx.c: Likewise. * tree-inline.c: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.md: Likewise. * config/sh/sh.h: Likewise. From-SVN: r72118
2003-07-30combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes.Zdenek Dvorak1-0/+11
* combine.c (distribute_notes): Cancel REG_VALUE_PROFILE notes. * gcov-io.h (GCOV_FIRST_VALUE_COUNTER, GCOV_LAST_VALUE_COUNTER, GCOV_N_VALUE_COUNTERS): New. * profile.c (compute_value_histograms): New static function. (branch_prob): Read back the value histograms. * rtl.c (reg_note_name): Add name for REG_VALUE_PROFILE note. * rtl.h (enum reg_note): Add REG_VALUE_PROFILE note. * value-prof.c: Add comment on reading the profile. * value-prof.h (COUNTER_FOR_HIST_TYPE, HIST_TYPE_FOR_COUNTER): New. * doc/invoke.texi (-fprofile-values): Document behavior with -fbranch-probabilities. From-SVN: r69969
2003-07-12c-format.c: Fix comment formatting.Kazu Hirata1-1/+1
* c-format.c: Fix comment formatting. * c-typeck.c: Likewise. * coverage.c: Likewise. * cppcharset.c: Likewise. * cpplib.c: Likewise. * dbxout.c: Likewise. * gcov-io.h: Likewise. * toplev.c: Likewise. From-SVN: r69276
2003-07-10gcov-io.h: Update documentation.Nathan Sidwell1-22/+34
* gcov-io.h: Update documentation. (GCOV_UNSIGNED2STRING): New. (GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH, GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH, GCOV_TAG_SUMMARY_LENGTH): Adjust. (GCOV_TAG_BLOCKS_NUM, GCOV_TAG_ARCS_NUM, GCOV_TAG_COUNTER_NUM): New. (GCOV_BLOCK_SIZE): Number of words. (gcov_var): Adjust buffer type. * gcov-io.c (gcov_write_bytes, gcov_read_bytes): Rename to ... (gcov_write_words, gcov_read_words): ... here. Take a 4-byte word count, not byte count. (gcov_open): Adjust overread init. (gcov_allocate, gcov_write_unsigned, gcov_write_counter, gcov_write_string, gcov_write_tag, gcov_write_length, gcov_write_tag_length): Adjust. (gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust. (gcov_sync, gcov_seek): Adjust. * gcov-dump.c (print_usage): Show gcc version only. (dump_file): Use GCOV_UNSIGNED2STRING. (tag_blocks, tag_arcs, tag_counters): Use GCOV_TAG_*_NUM macros. * gcov.c (print_version): Show gcc version only. (read_graph_file): Use GCOV_UNSIGNED2STRING. Use GCOV_TAG_*_NUM macros. (read_count_file): Use GCOV_UNSIGNED2STRING. Use GCOV_TAG_COUNTER_LENGTH. * coverage.c (read_counts_file): Use GCOV_UNSIGNED2STRING. Use GCOV_TAG_COUNTER_NUM. * libgcov.c (gcov_version): Use GCOV_UNSIGNED2STRING. (__gcov_merge_single, __gcov_merge_delta): Use GCOV_CHECK. From-SVN: r69188
2003-07-09gcov-io.h: Update documentation.Nathan Sidwell1-84/+90
* gcov-io.h: Update documentation. (GCOV_GRAPH_SUFFIX, GCOV_GRAPH_MAGIC): Rename to GCOV_NOTE_SUFFIX, GCOV_NOTE_MAGIC. (GCOV_DATA_SUFFIX, GCOV_NOTE_SUFFIX): Update. (GCOV_DATA_MAGIC, GCOV_NOTE_MAGIC): Make non-palindromic. (struct gcov_var): Change buffer's type. Add endian flag. (gcov_open): Remove mode in libgcov. (gcov_magic): Prototype. * gcov-io.c (from_file): New. (gcov_open): Clear endian flag. (gcov_magic): New. (gcov_write_bytes, gcov_read_bytes): Return gcov_unsigned_t pointers. (gcov_write_unsigned, gcov_write_counter, gcov_write_string, gcov_write_tag, gcov_write_length, gcov_write_tag_length): Update. (gcov_read_unsigned, gcov_read_counter, gcov_read_string): Update. * gcov-iov.c (main): Correct cast. * coverage.c (read_counts_file): Use gcov_magic. Remove endianness conversion. (gcov_begin_output): Use GCOV_NOTE_MAGIC. (coverage_init): Use GCOV_NOTE_SUFFIX. * libgcov.c (gcov_version_mismatch): Remove endianness conversion. Rename to gcov_version, and return flag. (gcov_exit): Use gcov_version. (__gcov_init): Use gcov_version. * Makefile.in (coverageexts): Update. * gcov.c (print_version): Remove endianness conversion. (create_file_names): Use GCOV_NOTE_SUFFIX. (read_graph_file): Use gcov_magic. (read_count_file): Likewise. * gcov-dump.c (dump_file): Remove endianness conversion, use gcov_magic. From-SVN: r69137
2003-07-06gcov-io.h: Add a local time stamp.Nathan Sidwell1-3/+17
* gcov-io.h: Add a local time stamp. (struct gcov_info): Add stamp field. (gcov_truncate): New. * coverage.c (read_counts_file): Skip the stamp. (coverage_begin_output): Write the stamp. (build_gcov_info): Declare and init the stamp. (coverage_finish): Only unlink data file, if stamp is zero. * gcov-dump.c (dump_file): Dump the stamp. * gcov.c (bbg_stamp): New. (release_structures): Clear bbg_stamp. (read_graph_file): Read stamp. (read_count_file): Check stamp. * libgcov.c (gcov_exit): Check stamp and truncate if needed. From-SVN: r69006
2003-07-01basic-block.h: Fix comment typos.Kazu Hirata1-2/+2
* basic-block.h: Fix comment typos. * bb-reorder.c: Likewise. * c-format.c: Likewise. * cfgcleanup.c: Likewise. * cfghooks.h: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.h: Likewise. * cgraphunit.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * df.h: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * et-forest.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.h: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * ra-build.c: Likewise. * ra-colorize.c: Likewise. * ra-rewrite.c: Likewise. * ra.h: Likewise. * regmove.c: Likewise. * reload.c: Likewise. * rtlanal.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-vis.c: Likewise. * sreal.c: Likewise. * ssa-ccp.c: Likewise. * ssa.c: Likewise. * toplev.c: Likewise. * tree-inline.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. From-SVN: r68770
2003-06-30gcov-io.c: Convert prototypes to ISO C90.Andreas Jaeger1-2/+2
* gcov-io.c: Convert prototypes to ISO C90. * gcov-io.h: Likewise. From-SVN: r68735
2003-06-29alloc-pool.c: Fix comment formatting.Kazu Hirata1-1/+1
* alloc-pool.c: Fix comment formatting. * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * cfganal.c: Likewise. * cfgrtl.c: Likewise. * collect2.c: Likewise. * cse.c: Likewise. * df.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * libgcov.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * prefix.c: Likewise. * rtlanal.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. From-SVN: r68672
2003-06-26value-prof.c: New.Zdenek Dvorak1-8/+25
* value-prof.c: New. * value-prof.h: New. * Makefile.in (value-prof.o): New. (LIBGCOV): Add _gcov_merge_single and _gcov_merge_delta (profile.o): Add value-prof.h and tree.h dependency. * flags.h (flag_profile_values): Declare. * gcov-io.h (GCOV_COUNTERS, GCOV_COUNTER_NAMES, GCOV_MERGE_FUNCTIONS): Add new counters. (GCOV_COUNTER_V_INTERVAL, GCOV_COUNTER_V_POW2, GCOV_COUNTER_V_SINGLE, GCOV_COUNTER_V_DELTA): New counter sections. (__gcov_merge_single, __gcov_merge_delta): Declare. * flow.c (mark_used_regs): Set subregs_of_mode only when the structure is initialized. * libgcov.c (__gcov_merge_single, __gcov_merge_delta): New functions. * profile.c: Include value-prof.h and tree.h. (gen_interval_profiler, gen_pow2_profiler, gen_one_value_profiler, gen_const_delta_profiler, instrument_values): New static functions. (get_exec_counts): Fix comment. (branch_prob): Invoke instrument_values. * toplev.c (flag_profile_values): New flag. * doc/invoke.texi (-fprofile-values): Document. From-SVN: r68519
2003-06-23basic-block.h: Fix comment formatting.Kazu Hirata1-8/+8
* basic-block.h: Fix comment formatting. * bt-load.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-format.c: Likewise. * coverage.c: Likewise. * cpplib.h: Likewise. * cpppch.c: Likewise. * dbxout.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * profile.c: Likewise. * real.h: Likewise. * sched-deps.c: Likewise. From-SVN: r68369
2003-06-12ChangeLog: Follow spelling conventions.Kazu Hirata1-4/+4
* ChangeLog: Follow spelling conventions. * ChangeLog.2: Likewise. * c-decl.c: Likewise. * cfgloop.h: Likewise. * cgraph.c: Likewise. * coverage.c: Likewise. * cppcharset.c: Likewise. * cpphash.h: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * dbxout.c: Likewise. * df.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * explow.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gengtype.c: Likewise. * ggc.h: Likewise. * opts.c: Likewise. * real.c: Likewise. * reload.c: Likewise. * stmt.c: Likewise. From-SVN: r67849
2003-05-14gcov-io.h (gcov_write_bytes, [...]): Remove here.Nathan Sidwell1-94/+108
* gcov-io.h (gcov_write_bytes, gcov_read_bytes): Remove here. (GCOV_TAG_*) Force type to gcov_unsigned_t. (GCOV_CHECK, GCOV_CHECK_READING, GCOV_CHECK_WRITING): New. (struct gcov_var): Remove modified. Add start, length, offset, overread. Have buffer array for libgcov. (gcov_sync, gcov_seek): Definitions moved to gcov-io.c. (gcov_position, gcov_rewrite, gcov_is_eof): Adjust. * gcov-io.c (gcov_open): Set mode, do not read anything. (gcov_close): Write final block. (gcov_write_block, gcov_allocate): New. (gcov_write_bytes): Make static. Write or allocate buffer. (gcov_write_unsigned, gcov_write_counter): Buffer can never be null. (gcov_write_string): Adjust. (gcov_write_tag) (gcov_write_length): Adjust. Flush the block. (gcov_write_tag_length): Buffer can never be null. (gcov_read_bytes): Make static. Read in block. (gcov_sync): Moved here. Adjust. (gcov_seek): Moved here. Adjust. * coverage.c (read_counts_file): Adjust. * gcov-dump.c (print_prefix): Add position parameter. (flag_dump_positions): New flag. (options, main, print_usage): Add it. (dump_file, tag_blocks, tag_arcs, tag_lines, tag_counters, tag_summary): Adjust. * gcov.c (read_graph_file, read_count_file): Adjust. * libgcov.c (gcov_exit): Adjust. From-SVN: r66805
2003-05-10defaults.h (GCOV_TYPE_SIZE): Remove.Nathan Sidwell1-41/+62
* defaults.h (GCOV_TYPE_SIZE): Remove. * gcov-io.h (gcov_type): Set to specific mode int on target. (gcov_unsigned_t, gcov_position_t): New. (GCOV_TYPE_NODE): New. (GCOV_TAG_SUMMARY_LENGTH): Adjust. (GCOV_COUNTERS_SUMMABLE): New. (gcov_ctr_summary, gcov_sumary, gcov_fn_info, gcov_merge_fn, gcov_ctr_info, gcov_info): Adjust types. (gcov_var): Adjust types. (gcov_write_unsigned, gcov_write_tag, gcov_write_length, gcov_write_tag_length, gcov_write_summary, gcov_read_unsigned, gcov_read_summary): Adjust gcov types. (gcov_position, gcov_sync, gcov_seek): Adjust gcov types. * gcov-io.c (gcov_write_unsigned, gcov_write_tag, gcov_write_length, gcov_write_tag_length, gcov_write_summary, gcov_read_unsigned, gcov_read_summary): Adjust gcov types. * libgcov.c (gcov_crc32, gcov_version_mismatch, gcov_exit, __gcov_init, __gcov_merge_add): Adjust gcov types. * coverage.c (ctr_merge_functions): Constify. (ctr_names): New. (read_counts_file): Adjust gcov types. Only summarize & merge summable counters. (coverage_counter_ref): Use GCOV_TYPE_NODE. (build_fn_info_type, build_fn_info_value, build_ctr_info_type, build_ctr_info_value, build_gcov_info): Adjust types. * profile.c (branch_prob): Adjust gcov types. * gcov_dump (dump_file): Adjust gcov types. From-SVN: r66668
2003-05-07gcov-io.h (GCOV_LOCKED): New #define.Nathan Sidwell1-24/+44
* gcov-io.h (GCOV_LOCKED): New #define. (GCOV_LINKAGE): Make sure it is #defined. (gcov_write_string, gcov_write_tag, gcov_write_length, gcov_read_string, gcov_time): Poison in libgcov. (gcov_seek_end): Remove. (gcov_write_tag_length, gcov_sync, gcov_rewrite): New. (GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH, GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH, GCOV_TAG_SUMMARY_LENGTH): New #defines. (gcov_write_tag, gcov_write_length): Not in libgcov. * gcov-io.c (gcov_open): Use GCOV_LOCKED. (gcov_write_tag, gcov_write_length): Not in libgcov. (gcov_write_tag_length): New. (gcov_write_summary): Use gcov_write_tag_length. * libgcov.c: Always #include gcov-io.h. (IN_LIBGCOV): -1 for inhibit_libc, +1 otherwise. (GCOV_LINKAGE): Define to nothing for L_gcov. (gcov_exit): Replace gcov_write_tag, gcov_write_length with gcov_write_tag_length. Use gcov_rewrite & gcov_seek. * gcov.c (read_graph_file): Replace gcov_seek by gcov_sync. (read_count_file): Likewise. * gcov-dump.c (dump_file): Likewise. * coverag.c (read_counts_file): Likewise. From-SVN: r66555
2003-05-04Makefile.in (LIBGCOV): Add _gcov_merge_add.Zdenek Dvorak1-5/+45
* Makefile.in (LIBGCOV): Add _gcov_merge_add. * gcov-io.h: Make GCOV_LINKAGE extern in libgcov and prevent resulting namespace clash. (GCOV_MERGE_FUNCTIONS): New. (gcov_merge_fn): Declare. (struct gcov_ctr_info): New field "merge". (__gcov_merge_add): Declare. * coverage.c (ctr_merge_functions): New. (build_ctr_info_type, build_ctr_info_value): Initialize merge field of gcov_ctr_info type. * libgcov.c (__gcov_merge_add): New. (gcov_exit): Call a hook to merge values of counters. From-SVN: r66457
2003-04-24New GCOV_TAG_FUNCTION layoutNathan Sidwell1-8/+12
New GCOV_TAG_FUNCTION layout * coverage.c (struct function_list): Replace name with ident. (struct counts_entry): Likewise. (fn_ident): New. (htab_counts_entry_hash, htab_counts_entry_eq, htab_counts_entry_del): Adjust. (reads_count_file, get_coverage_counts, coverage_begin_output, coverage_end_function): Adjust. (build_fn_info_type, build_fn_info_value): Likewise. * gcov-dump.c (tag_function): Adjust. * gcov-io.c (gcov_write_string, gcov_read_string): Not in LIBGCOV. * gcov-io.h (gcov_write_string, gcov_read_string): Not in LIBGCOV. * gcov.c (struct function_info): Add ident. (read_graph_file, read_count_file): Adjust. * libgcov.c (gcov_exit): Adjust. From-SVN: r66035
2003-04-23Makefile.in (LIBGCC_DEPS): Add gcov headers.Nathan Sidwell1-34/+55
* 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
2003-04-22gbl-ctors.h: Add special license exception.David Turner1-0/+7
* gbl-ctors.h: Add special license exception. * libgcc2.h: Likewise. * tsystem.h: Likewise. * gcov-io.h: Likewise. From-SVN: r65949
2003-04-21Break out coverage routines to new file.Nathan Sidwell1-434/+35
* 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-04-17gcov-dump.c (tag_summary): Remove max_sumJan Hubicka1-4/+1
* gcov-dump.c (tag_summary): Remove max_sum * gcov-io.h (gcov_summary, gcov_write_summary, gcov_read_summary): Kill max_sum. * libgcov.c (gcov_exit): Do one pass over the data. Make error message more verbose. From-SVN: r65758
2003-04-11Makefile.in (loop-init.o): Do not depend on gcov-io.h, gcov-iov.h.Nathan Sidwell1-251/+229
* Makefile.in (loop-init.o): Do not depend on gcov-io.h, gcov-iov.h. Simplify interface to gcov reading and writing. * gcov-io.h (gcov_file, gcov_position, gcov_length, gcov_buffer, gcov_alloc, gcov_modified, gcov_errored): Move into ... (struct gcov_var gcov_var): ... this static structure. (gcov_write_unsigned, gcov_write_counter, gcov_write_string): Return void. (gcov_read_unsigned, gcov_read_couter, gcov_read_string): Return read object. (gcov_read_bytes, gcov_write_bytes): Set error flag on error. (gcov_reserve_length): Remove. (gcov_write_tag): New. (gcov_write_length): Adjust. (gcov_read_summary, gcov_write_summary): Adjust. (gcov_eof, gcov_ok): Rename to ... (gcov_is_eof, gcov_is_error): ... here. Return error code. (gcov_save_position, gcov_resync): Rename to ... (gcov_position, gcov_seek): ... here. (gcov_skip, gcov_skip_string): Remove. (gcov_error): Remove. (gcov_open, gcov_close): Adjust. * gcov.c (find_source): Take const char *, copy it on allocation. (read_graph_file): Adjust. (read_count_file): Adjust. * libgcov.c (gcov_exit): Adjust. * gcov-dump.c (tag_function, tag_blocks, tag_arcs, tag_lines, tag_arc_counts, tag_summary): Return void. Adjust. (struct tag_format): Adjust proc member. (dump_file): Adjust gcov calls. From-SVN: r65464
2003-04-08gcov-io.h (gcov_save_position): Remove __inline__ from declaration.Nathan Sidwell1-1/+1
* gcov-io.h (gcov_save_position): Remove __inline__ from declaration. From-SVN: r65366
2003-04-07Change gcov file interface to single file at a time.Nathan Sidwell1-417/+413
* gcov-io.h: Replace IN_LIBGCC1 with IN_LIBGCOV. Use IN_GCOV. Convert to C89 prototypes. (gcov_file, gcov_length, gcov_position, gcov_buffer, gcov_alloc, gcov_error, gcov_modified): New static variables. (gcov_open, gcov_close, gcov_read_bytes, gcov_write_bytes): New functions. (gcov_write_unsigned, gcov_write_counter, gcov_write_string, gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust. (gcov_read_summary, gcov_write_summary): Adjust. (gcov_save_position, gcov_reserve_length, gcov_write_length): Adjust. (gcov_resync, gcov_skip, gcov_skip_string): Adjust. (da_file_open, da_file_close, da_file_eof, da_file_error): Remove. (da_file_position, da_file_seek, da_file_write, da_file_read): Remove. (gcov_error, gcov_eof, gcov_ok, gcov_time): New functions. * gcov.c (gcov_type): Don't typedef here. (IN_GCOV): #define (read_graph_file, read_count_file): Adjust. * gcov-dump.c (gcov_type): Don't typedef here. (IN_GCOV): #define. (tag_function, tag_blocks, tag_arcs, tag_lines, tag_arc_counts): Remove FILE parameter, adjust. (struct tag_format): Adjust proc member. (dump_file): Adjust. * libgcov.c (IN_LIBGCOV): #define. (gcov_exit): Adjust. * loop-init.c: Don't #include gcov-io.h * profile.c (struct counts_entry): New structure to hold counter values. (struct section_reference, struct da_index_entry): Remove. (bbg_file, da_file): Remove. (htab_counts_index_hash, htab_counts_index_eq, htab_counts_index_del): Replace with ... (htab_counts_entry_hash, htab_counts_entry_eq, htab_counts_entry_del): ... these. (cleanup_counts_index, index_counts_file): Remove. (read_counts_file): New function. (get_exec_counts): Adjust. (compute_branch_probabilities): Don't free the exec counts here. (branch_prob): Adjust. (init_branch_prob): Adjust. (end_branch_prob): Adjust. From-SVN: r65338
2003-03-31gcov.c: Add -a & -u options.Nathan Sidwell1-2/+4
* gcov.c: Add -a & -u options. (struct arc_info): Add local_span, is_call_non_return, is_nonlocal_return, is_unconditional flags, remove is_call flag. (struct block_info): Add flags, is_call_site, is_nonlocal_return members. Make encodings a union with span member. (struct function_info): Add blocks_executed, line, src, line_next members. (struct coverage_info): Make branches a union with blocks member. (struct source_info): Add functions member. (object_summary, program_count): New global variables. (flag_all_blocks, flag_unconditional): New flags. (find_source, output_branch_count): New functions. (print_usage): Adjust. (options): Adjust. (process_args): Adjust. (read_graph_file) <GCOV_TAG_FUNCTION>: Adjust. <GCOV_TAG_BLOCKS>: Read flags. <GCOV_TAG_LINES>: Adjust. (read_count_file): Process SUMMARY tags. (solve_flow_graph): Set is_unconditional and clear is_call_site appropriately. (add_branch_counts): Adjust. Don't count unconditional branches. (add_line_counts): Deal with all-blocks mode, accumulate block coverage. (accumulate_line_counts): Adjust, generate local spanning tree for all-blocks mode. (output_lines): Adjust. * profile.c (branch_prob): Alter GCOV_FUNCTION_TAG record. * doc/gcov.texi: Document. testsuite: * lib/gcov.exp: Adjust call return testing strings. * g77.dg/gcov/gcov-1.f: Don't expect unconditional branches. From-SVN: r65090
2003-03-04gcov-io.h (gcov_save_position, [...]): Modified to enable reading/ writing ↵Zdenek Dvorak1-16/+310
of whole .da file just once. * gcov-io.h (gcov_save_position, gcov_reserve_length, gcov_resync, gcov_skip, gcov_skip_string, gcov_write_unsigned, gcov_write_counter, gcov_write_string, gcov_read_unsigned, gcov_read_counter, gcov_read_string, gcov_write_length): Modified to enable reading/ writing of whole .da file just once. (da_file_open, da_file_close, da_file_eof, da_file_error, da_file_position, da_file_seek, da_file_write, da_file_read): New functions. (actual_da_file, actual_da_file_position, actual_da_file_length, actual_da_file_buffer, actual_da_file_buffer_size): New static functions. * libgcov.c (gcov_exit): Modified to read/write the whole .da file at just once. From-SVN: r63800
2003-02-26gcov-dump.c (print_prefix): Fix signedness warning.Zdenek Dvorak1-5/+23
* 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
2003-01-24ChangeLog (configure.in): Don't include ansidecl.h in tconfig.h.Kaveh R. Ghazi1-0/+9
* ChangeLog (configure.in): Don't include ansidecl.h in tconfig.h. * gcov-io.h (PARAMS, ATTRIBUTE_UNUSED: Define if IN_LIBGCC2. * unwind-dw2-fde.h (last_fde): Use __attribute__, not ATTRIBUTE_UNUSED. * configure: Regenerate. From-SVN: r61692
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg1-213/+409
From-SVN: r60174
2002-09-22dbxout.c: Follow spelling conventions.Kazu Hirata1-4/+4
* dbxout.c: Follow spelling conventions. * defaults.h: Likewise. * df.c: Likewise. * diagnostic.h: Likewise. * doloop.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flags.h: Likewise. * flow.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genconfig.c: Likewise. * genrecog.c: Likewise. * ggc-page.c: Likewise. * ggc.h: Likewise. * global.c: Likewise. * gthr-win32.h: Likewise. * integrate.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * langhooks.h: Likewise. * line-map.h: Likewise. * local-alloc.c: Likewise. * longlong.h: Likewise. * loop.c: Likewise. * loop.h: Likewise. From-SVN: r57406
2002-06-04gbl-ctors.h: Fix formatting.Kazu Hirata1-1/+1
* gbl-ctors.h: Fix formatting. * gcc.c: Likewise. * gccspec.c: Likewise. * gcov.c: Likewise. * gcov-io.h: Likewise. * gcse.c: Likewise. * ggc-common.c: Likewise. * ggc.h: Likewise. * ggc-page.c: Likewise. * ggc-simple.c: Likewise. * global.c: Likewise. * graph.h: Likewise. * gthr-dce.h: Likewise. * gthr.h: Likewise. * gthr-posix.h: Likewise. * gthr-rtems.h: Likewise. * gthr-solaris.h: Likewise. * gthr-win32.h: Likewise. From-SVN: r54240
2002-05-09final.c (end_final): Use C trees to output data structures for profiling.Jan Hubicka1-7/+108
* 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. Co-Authored-By: Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz> From-SVN: r53326