summaryrefslogtreecommitdiff
path: root/gcc/gcov-tool.c
Commit message (Collapse)AuthorAgeFilesLines
* gcc/jakub2016-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gcc.c (process_command): Update copyright notice dates. * gcov-dump.c (print_version): Ditto. * gcov.c (print_version): Ditto. * gcov-tool.c (print_version): Ditto. * gengtype.c (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. gcc/ada/ * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Update copyright notice dates. * gfc-internals.texi: Bump @copying's copyright year. * gfortran.texi: Ditto. * intrinsic.texi: Ditto. * invoke.texi: Ditto. gcc/go/ * gccgo.texi: Bump @copyrights-go year. gcc/java/ * jcf-dump.c (version): Update copyright notice dates. libgomp/ * libgomp.texi: Bump @copying's copyright year. libitm/ * libitm.texi: Bump @copying's copyright year. libjava/ * classpath/gnu/java/rmi/registry/RegistryImpl.java (version): Update copyright notice dates. * classpath/tools/gnu/classpath/tools/orbd/Main.java (run): Ditto. * gnu/gcj/convert/Convert.java (version): Update copyright notice dates. * gnu/gcj/tools/gcj_dbtool/Main.java (main): Ditto. libquadmath/ * libquadmath.texi: Bump @copying's copyright year. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232053 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcov-tool.c (do_merge): Refactore to remove int ret.jakub2015-05-071-5/+2
| | | | | | | | | | * ipa-icf.c (sem_item::hash_referenced_symbol_properties): Change !type == FUNC to type != FUNC. * reload.h (struct target_reload): Changee to type of x_spill_indirect_levels from bool to unsigned char. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222884 138bc75d-0d04-0410-961f-82ee72b054a4
* 2015-02-10 Rainer Emrich <rainer@emrich-ebersheim.de>ktietz2015-02-101-4/+0
| | | | | | | | | PR gcov-profile/61889 * gcov-tool.c: Remove wrong #if !defined(_WIN32) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220584 138bc75d-0d04-0410-961f-82ee72b054a4
* Support gcov-tool without ftw.htbsaunde2015-02-101-1/+10
| | | | | | | | | | | | gcc/ PR gcov-profile/61889 * config.in: regenerate. * configure.in: Likewise. * configure.ac: Check for ftw.h. * gcov-tool.c: Check for ftw.h before using nftw. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220566 138bc75d-0d04-0410-961f-82ee72b054a4
* Always pass explicit location to fatal_error.jsm282015-01-301-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch <https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00698.html> adding an overload for fatal_error that passes an explicit location broke gcc.pot regeneration because xgettext cannot handle function overloads with the diagnostic string argument in different positions. As the desired direction is for all diagnostics to have explicit locations, this patch addresses the regression by removing the version of fatal_error that does not pass a location, passing explicit input_location everywhere (in the hope that those will incrementally be changed to other locations, much as with the addition of a location argument to pedwarn some time ago - a lot of cases aren't meaningfully associated with a source file so UNKNOWN_LOCATION may be better). Note that this patch does not attempt to fix any existing issues with these diagnostics (such as wrongly starting with capital letters or ending with '.' or '\n'); it just adds the input_location argument. Bootstrapped with no regressions for x86_64-unknown-linux-gnu (Go excluded). gcc: * diagnostic.c (fatal_error (const char *, ...)): Remove function. * diagnostic-core.h (fatal_error (const char *, ...)): Remove prototype. * toplev.h (init_asm_output): Update comment on use of UNKNOWN_LOCATION with fatal_error. * cgraph.c, collect-utils.c, collect2.c, config/arc/arc.c, config/arc/arc.md, config/avr/avr.c, config/c6x/c6x.h, config/darwin.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/intelmic-mkoffload.c, config/nios2/nios2.c, config/nvptx/mkoffload.c, config/nvptx/nvptx.h, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, gcc.c, gcov-io.h, gcov-tool.c, ggc-common.c, ggc-page.c, graph.c, ipa-inline-analysis.c, ipa-reference.c, lto-cgraph.c, lto-section-in.c, lto-streamer-in.c, lto-streamer.c, lto-wrapper.c, objc/objc-act.c, opts.c, passes.c, plugin.c, tlink.c, toplev.c, tree-streamer-in.c, varpool.c: All callers of fatal_error changed to pass input_location as first argument. gcc/c-family: * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/cp: * class.c, except.c, parser.c, pt.c: All callers of fatal_error changed to pass input_location as first argument. gcc/fortran: * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All callers of fatal_error changed to pass input_location as first argument. gcc/java: * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/lto: * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error changed to pass input_location as first argument. libcc1: * plugin.cc: All callers of fatal_error changed to pass input_location as first argument. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220293 138bc75d-0d04-0410-961f-82ee72b054a4
* PR gcov-profile/61790danglin2015-01-091-1/+11
| | | | | | | | | | * gcov-tool.c (do_rewrite): Use strtoll instead of atoll if host has long long. Fallback to int64_t if host doesn't have long long and use strtol if int64_t is long. Otherwise, use sscanf for conversion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219372 138bc75d-0d04-0410-961f-82ee72b054a4
* Update copyright years.jakub2015-01-051-2/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219188 138bc75d-0d04-0410-961f-82ee72b054a4
* Add overlap functionality to gcov-tool.xur2014-10-081-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-10-08 Rong Xu <xur@google.com> * gcc/gcov-tool.c (profile_overlap): New driver function to compute profile overlap. (print_overlap_usage_message): New. (overlap_usage): New. (do_overlap): New. (print_usage): Add calls to overlap function. (main): Ditto. * libgcc/libgcov-util.c (read_gcda_file): Fix format. (find_match_gcov_info): Ditto. (calculate_2_entries): New. (compute_one_gcov): Ditto. (gcov_info_count_all_cold): Ditto. (gcov_info_count_all_zero): Ditto. (extract_file_basename): Ditto. (get_file_basename): Ditto. (set_flag): Ditto. (matched_gcov_info): Ditto. (calculate_overlap): Ditto. (gcov_profile_overlap): Ditto. * libgcc/libgcov-driver.c (compute_summary): Make it avavilable for external calls. * gcc/doc/gcov-tool.texi: Add documentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216015 138bc75d-0d04-0410-961f-82ee72b054a4
* libgcc/nathan2014-07-291-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libgcov.h: Move renaming of entry points to lib gcov specific portion. (gcov_do_dump): New rename. (gcov_rewrite): Remove inline, make HIDDEN. * libgcov-driver.c (gcov_clear, gcov_exit): Remove declarations. (gcov_exit_compute_summary): Rename to ... (compute_summary): ... here. Add LIST argument. (gcov_exit_merge_gcda): Rename to ... (merge_one_data): ... here. (gcov_exit_write_gcda): Rename to ... (write_one_data): ... here. (gcov_exit_merge_summary): Rename to ... (merge_summary): Add RUN_COUNTED argument. (gcov_exit_dump_gcov): Rename to ... (dump_one_gcov): Add RUN_COUNTED argument. (gcov_do_dump): New function, broken out of ... (gcov_exit): ... here. Call it. gcc/ * gcov-io.c (gcov_var): Make hidden. * gcov-tool.c (gcov_list, gcov_exit): Remove declarations. (gcov_do_dump): Declare. (gcov_output_files): Call gcov_do_dump, not gcov_exit). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213188 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/nathan2014-07-231-2/+3
| | | | | | | | | | | | | | * gcov-tool.c (gcov_list): Declare here. (set_gcov_list): Remove. (gcov_output_files): Set gcov_list directly. libgcc/ * libgcov-driver.c (set_gcov_list): Remove. (gcov_list): Make non-static in GCOV_TOOL. * libgcov.h (GCOV_TOOL_LINKAGE): Remove unused #define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212931 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-11 Rong Xu <xur@google.com>xur2014-07-111-2/+2
| | | | | | | | * gcov-tool.c (gcov_output_files): Fix build error introduced in commit r212448. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212462 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-10 Rong Xu <xur@google.com>xur2014-07-111-0/+478
Add gcov-tool: an offline gcda profile processing tool Support. * gcc/gcov-io.c (gcov_position): Make avaialble to gcov-tool. (gcov_is_error): Ditto. (gcov_read_string): Ditto. (gcov_read_sync): Ditto. * gcc/gcov-io.h: Move counter defines to gcov-counter.def. * gcc/gcov-dump.c (tag_counters): Use gcov-counter.def. * gcc/coverage.c: Ditto. * gcc/gcov-tool.c: Offline gcda profile processing tool. (unlink_gcda_file): Remove one gcda file. (unlink_profile_dir): Remove gcda files from the profile path. (gcov_output_files): Output gcda files to an output dir. (profile_merge): Merge two profiles in directory. (print_merge_usage_message): Print merge usage. (merge_usage): Print merge usage and exit. (do_merge): Driver for profile merge sub-command. (profile_rewrite): Rewrite profile. (print_rewrite_usage_message): Print rewrite usage. (rewrite_usage): Print rewrite usage and exit. (do_rewrite): Driver for profile rewrite sub-command. (print_usage): Print gcov-info usage and exit. (print_version): Print gcov-info version. (process_args): Process arguments. (main): Main routine for gcov-tool. * gcc/Makefile.in: Build and install gcov-tool. * gcc/gcov-counter.def: New file split from gcov-io.h. * libgcc/libgcov-driver.c (gcov_max_filename): Make available to gcov-tool. * libgcc/libgcov-merge.c (__gcov_merge_add): Replace gcov_read_counter() with a Macro. (__gcov_merge_ior): Ditto. (__gcov_merge_time_profile): Ditto. (__gcov_merge_single): Ditto. (__gcov_merge_delta): Ditto. * libgcc/libgcov-util.c (void gcov_set_verbose): Set the verbose flag in the utility functions. (set_fn_ctrs): Utility function for reading gcda files to in-memory gcov_list object link lists. (tag_function): Ditto. (tag_blocks): Ditto. (tag_arcs): Ditto. (tag_lines): Ditto. (tag_counters): Ditto. (tag_summary): Ditto. (read_gcda_finalize): Ditto. (read_gcda_file): Ditto. (ftw_read_file): Ditto. (read_profile_dir_init): Ditto. (gcov_read_profile_dir): Ditto. (gcov_read_counter_mem): Ditto. (gcov_get_merge_weight): Ditto. (merge_wrapper): A wrapper function that calls merging handler. (gcov_merge): Merge two gcov_info objects with weights. (find_match_gcov_info): Find the matched gcov_info in the list. (gcov_profile_merge): Merge two gcov_info object lists. (__gcov_add_counter_op): Process edge profile counter values. (__gcov_ior_counter_op): Process IOR profile counter values. (__gcov_delta_counter_op): Process delta profile counter values. (__gcov_single_counter_op): Process single profile counter values. (fp_scale): Callback function for float-point scaling. (int_scale): Callback function for integer fraction scaling. (gcov_profile_scale): Scaling profile counters. (gcov_profile_normalize): Normalize profile counters. * libgcc/libgcov.h: Add headers and functions for gcov-tool use. (gcov_get_counter): New. (gcov_get_counter_target): Ditto. (struct gcov_info): Make the functions field mutable in gcov-tool compilation. * gcc/doc/gcc.texi: Include gcov-tool.texi. * gcc/doc/gcov-tool.texi: Document for gcov-tool. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212448 138bc75d-0d04-0410-961f-82ee72b054a4