Skip to content
Snippets Groups Projects
  1. Jan 03, 2024
  2. Jan 16, 2023
  3. Apr 28, 2022
    • Sebastian Huber's avatar
      gcov: Add open mode parameter to gcov_do_dump() · 1a6314b0
      Sebastian Huber authored
      gcc/
      
      	* gcov-tool.cc (gcov_do_dump): Add mode parameter.
      	(gcov_output_files): Open files for reading and writing.
      
      libgcc/
      
      	* libgcov-driver-system.c (gcov_exit_open_gcda_file): Add mode
      	parameter.  Pass mode to gcov_open() calls.
      	* libgcov-driver.c (dump_one_gcov):  Add mode parameter.  Pass mode to
      	gcov_exit_open_gcda_file() call.
      	(gcov_do_dump): Add mode parameter.  Pass mode to dump_one_gcov()
      	calls.
      	(__gcov_dump_one):  Open file for reading and writing.
      1a6314b0
    • Sebastian Huber's avatar
      gcov: Add mode to all gcov_open() · d170ecc9
      Sebastian Huber authored
      gcc/
      
      	* gcov-io.cc (gcov_open): Always use the mode parameter.
      	* gcov-io.h (gcov_open): Declare it unconditionally.
      
      libgcc/
      
      	* libgcov-driver-system.c (gcov_exit_open_gcda_file): Open file for
      	reading and writing.
      	* libgcov-util.c (read_gcda_file): Open file for reading.
      	* libgcov.h (gcov_open): Delete declaration.
      d170ecc9
  4. Jan 03, 2022
  5. Jan 04, 2021
  6. Jul 23, 2020
    • Martin Liska's avatar
      gcov: create folders with 0777. · 24c35a5e
      Martin Liska authored
      libgcc/ChangeLog:
      
      	PR gcov-profile/96035
      	* libgcov-driver-system.c: Create gcov folders with 0777
      	so that it respects a system umask.
      24c35a5e
  7. Jan 01, 2020
  8. Jun 27, 2019
    • Martin Liska's avatar
      Remove quite obvious dead assignments. · 45309d28
      Martin Liska authored
      2019-06-27  Martin Liska  <mliska@suse.cz>
      
      	* asan.c (asan_emit_allocas_unpoison): Remove obviously
      	dead assignments.
      	* bt-load.c (move_btr_def): Likewise.
      	* builtins.c (expand_builtin_apply_args_1): Likewise.
      	(expand_builtin_apply): Likewise.
      	* cfgexpand.c (expand_asm_stmt): Likewise.
      	(construct_init_block): Likewise.
      	* cfghooks.c (verify_flow_info): Likewise.
      	* cfgloopmanip.c (remove_path): Likewise.
      	* cfgrtl.c (rtl_verify_bb_layout): Likewise.
      	* cgraph.c (cgraph_node::set_pure_flag): Likewise.
      	* combine.c (simplify_if_then_else): Likewise.
      	* config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
      	(choose_basereg): Likewise.
      	(ix86_expand_prologue): Likewise.
      	(ix86_preferred_output_reload_class): Likewise.
      	* cselib.c (cselib_record_sets): Likewise.
      	* df-scan.c (df_scan_alloc): Likewise.
      	* dojump.c (do_jump_by_parts_greater_rtx): Likewise.
      	* early-remat.c (early_remat::record_equiv_candidates): Likewise.
      	* emit-rtl.c (try_split): Likewise.
      	* graphite-scop-detection.c (assign_parameter_index_in_region): Likewise.
      	* ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Likewise.
      	* ira-color.c (setup_profitable_hard_regs): Likewise.
      	* ira.c (rtx_moveable_p): Likewise.
      	* lra-eliminations.c (eliminate_regs_in_insn): Likewise.
      	* read-rtl.c (read_subst_mapping): Likewise.
      	* regrename.c (scan_rtx): Likewise.
      	* reorg.c (fill_slots_from_thread): Likewise.
      	* tree-inline.c (tree_function_versioning): Likewise.
      	* tree-ssa-reassoc.c (optimize_ops_list): Likewise.
      	* tree-ssa-sink.c (statement_sink_location): Likewise.
      	* tree-ssa-threadedge.c (thread_across_edge): Likewise.
      	* tree-vect-loop.c (vect_get_loop_niters): Likewise.
      	(vect_create_epilog_for_reduction): Likewise.
      	* tree.c (build_nonstandard_integer_type): Likewise.
      2019-06-27  Martin Liska  <mliska@suse.cz>
      
      	* class.c (adjust_clone_args): Remove obviously
      	dead assignments.
      	(dump_class_hierarchy_r): Likewise.
      	* decl.c (check_initializer): Likewise.
      	* parser.c (cp_parser_lambda_expression): Likewise.
      	* pt.c (unify_bound_ttp_args): Likewise.
      	(convert_template_argument): Likewise.
      	* rtti.c (build_headof): Likewise.
      	* typeck.c (convert_for_initialization): Likewise.
      2019-06-27  Martin Liska  <mliska@suse.cz>
      
      	* libgcov-driver-system.c (gcov_exit_open_gcda_file): Remove obviously
      	dead assignments.
      	* libgcov-util.c: Likewise.
      
      From-SVN: r272744
      45309d28
  9. Jun 25, 2019
  10. Jan 01, 2019
  11. Jun 07, 2018
    • Martin Liska's avatar
      Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057). · 6c086e8c
      Martin Liska authored
      2018-06-07  Martin Liska  <mliska@suse.cz>
      
              PR bootstrap/86057
      	* libgcov-driver-system.c (replace_filename_variables): Use
              memcpy instead of mempcpy.
      	(allocate_filename_struct): Do not allocate filename, allocate
              prefix and set it.
      	(gcov_exit_open_gcda_file): Allocate memory for gf->filename
              here and properly copy content into it.
      	* libgcov-driver.c (struct gcov_filename): Remove max_length
              field, change prefix from size_t into char *.
      	(compute_summary): Do not calculate longest filename.
      	(gcov_do_dump): Release memory of gf.filename after each file.
      	* libgcov-util.c (compute_summary): Use new signature of
              compute_summary.
      	(calculate_overlap): Likewise.
      
      From-SVN: r261260
      6c086e8c
  12. Jun 05, 2018
  13. May 29, 2018
    • Martin Liska's avatar
      libgcov: report about a different timestamp (PR gcov-profile/85759). · 0e8f29da
      Martin Liska authored
      2018-05-29  Martin Liska  <mliska@suse.cz>
      
              PR gcov-profile/85759
      	* doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
      	env variables.
      2018-05-29  Martin Liska  <mliska@suse.cz>
      
              PR gcov-profile/85759
      	* libgcov-driver-system.c (gcov_error): Introduce usage of
              GCOV_EXIT_AT_ERROR env. variable.
      	* libgcov-driver.c (merge_one_data): Print error that we
              overwrite a gcov file with a different timestamp.
      
      From-SVN: r260895
      0e8f29da
  14. Jan 03, 2018
  15. Jan 01, 2017
  16. Jun 06, 2016
  17. Jun 02, 2016
    • Aaron Conole's avatar
      On behalf of Aaron Conole <aconole@redhat.com> · 8aa5bdd6
      Aaron Conole authored
      On behalf of  Aaron Conole  <aconole@redhat.com>
      	* libgcov-driver-system.c (__gcov_error_file): New.
      	(get_gcov_error_file): New.
      	(gcov_error): Use and set __gcov_error_file.
      	(gcov_error_exit): New.
      	* libgcov-driver.c (gcov_exit): Call gcov_error_exit.
      
      From-SVN: r237033
      8aa5bdd6
  18. Jan 04, 2016
  19. Feb 10, 2015
  20. Jan 05, 2015
  21. Jul 27, 2014
    • Nathan Sidwell's avatar
      libgcov-driver.c (struct gcov_filename_aux): Rename ... · 6dc33097
      Nathan Sidwell authored
      	* libgcov-driver.c (struct gcov_filename_aux): Rename ...
      	(struct gcov_filename): ... here.  Include buffer and max length
      	fields.
      	(gcov_max_filename): Remove.
      	(gi_filename): Remove.
      	(gcov_exit_compute_summary): Compute max filename here.
      	(gcov_exit_merge_gcda): Add filename parm, adjust.
      	(gcov_exit_merge_summary): Likewise.
      	(gcov_exit_dump_gcov): Adjust for struct gcov_filename changes.
      	(gcov_exit): Likewise.
      	(__gcov_init): Don't calculate max length here.
      	* libgcov_util.c (max_filename_len): Remove.
      	(read_gcda_file): Don't calculate max length here.
      	(gcov_read_profile_dir): Don't propagate here.
      	* libgcov-driver-system.c (alloc_filename_struct): Adjust for
      	struct gcov_filename changes.
      	(gcov_exit_open_gcda_file): Likewise.
      
      From-SVN: r213092
      6dc33097
  22. Jan 08, 2014
    • Rong Xu's avatar
      gcov-io.c (gcov_var): Move from gcov-io.h. · 40d6b753
      Rong Xu authored
      2014-01-08  Rong Xu  <xur@google.com> 
      
      	* gcc/gcov-io.c (gcov_var): Move from gcov-io.h.
      	(gcov_position): Ditto.
      	(gcov_is_error): Ditto.
      	(gcov_rewrite): Ditto.
      	* gcc/gcov-io.h: Refactor. Move gcov_var to gcov-io.h, and libgcov
      	only part to libgcc/libgcov.h.
      	* libgcc/libgcov-driver.c: Use libgcov.h.
      	(buffer_fn_data): Use xmalloc instead of malloc.
      	(gcov_exit_merge_gcda): Ditto.
      	* libgcc/libgcov-driver-system.c (allocate_filename_struct): Ditto.
      	* libgcc/libgcov.h: New common header files for libgcov-*.h.
      	* libgcc/libgcov-interface.c: Use libgcov.h
      	* libgcc/libgcov-merge.c: Ditto.
      	* libgcc/libgcov-profiler.c: Ditto.
      	* libgcc/Makefile.in: Add dependence to libgcov.h
      
      From-SVN: r206435
      40d6b753
  23. Jan 02, 2014
  24. Nov 13, 2013
    • Rong Xu's avatar
      The patch re-factors libgcov.c to make it better modulelized. · d6d3f033
      Rong Xu authored
      2013-11-12  Rong Xu  <xur@google.com>
      
      The patch re-factors libgcov.c to make it better modulelized.
      It contains two pieces of work:
      1. break gcov_exit() into the following structure:
         gcov_exit()
            --> gcov_exit_compute_summary()
            --> allocate_filename_struct()
                for gi_ptr in gcov_list
                  --> gcov_exit_dump_gcov()
                         --> gcov_exit_open_gcda_file()
                         --> gcov_exit_merge_gcda ()
                         --> gcov_exit_merge_summary ()
                         --> gcov_exit_write_gcda ()
      2. split libgcov.c into the following files:
           libgcov-profiler.c
           libgcov-merge.c
           libgcov-interface.c
           libgcov-driver.c
             libgcov-driver-system.c (source included into libgcov-driver.c)
      
      	* libgcc/libgcov.c: Delete as part of re-factoring.
      	* gcc/gcov-io.h (__gcov_indirect_call_profiler): Add the decl to
              avoid warning.
      	* libgcc/libgcov-interface.c (init_mx): Moved from libgcov.c.
      	(init_mx_once): Ditto.
      	(__gcov_flush): Ditto.
      	(__gcov_reset): Ditto.
      	(__gcov_dump): Ditto.
      	(__gcov_fork): Ditto.
      	(__gcov_execl): Ditto.
      	(__gcov_execlp): Ditto.
      	(__gcov_execle): Ditto.
      	(__gcov_execv): Ditto.
      	(__gcov_execvp): Ditto.
      	(__gcov_execve): Ditto.
              * libgcc/libgcov-merge.c (__gcov_merge_time_profile): Moved from
              libgcov.c.
      	(__gcov_merge_add): Ditto.
      	(__gcov_merge_ior): Ditto.
      	(__gcov_merge_single): Ditto.
      	(__gcov_merge_delta): Ditto.
      	* libgcc/libgcov-profiler.c 
      	(__gcov_interval_profiler): Ditto.
      	(__gcov_pow2_profiler): Ditto.
      	(__gcov_one_value_profiler_body): Ditto.
      	(__gcov_one_value_profiler): Ditto.
      	(__gcov_indirect_call_profiler): Ditto.
      	(__gcov_indirect_call_profiler_v2): Ditto.
      	(__gcov_time_profiler): Ditto.
      	(__gcov_average_profiler): Ditto.
      	(__gcov_ior_profiler): Ditto.
      	* libgcc/libgcov-driver.c (set_gcov_list): New.
      	(get_gcov_dump_complete): Ditto.
      	(set_gcov_dump_complete):Ditto.
      	(reset_gcov_dump_complete):Ditto.
      	(gcov_exit_compute_summary): New function split from gcov_exit().
      	(gcov_exit_merge_gcda): Ditto.
      	(gcov_exit_write_gcda): Ditto.
      	(gcov_exit_merge_summary): Ditto.
      	(gcov_exit_dump_gcov): Ditto.
      	(struct gcov_fn_buffer): Moved from libgcov.c
      	(struct gcov_summary_buffer): Ditto.
      	(free_fn_data): Ditto.
      	(buffer_fn_data): Ditto.
      	(crc32_unsigned): Ditto.
      	(gcov_version): Ditto.
      	(gcov_histogram_insert): Ditto.
      	(gcov_compute_histogram): Ditto.
      	(gcov_exit): Ditto.
      	(gcov_clear): Ditto.
      	(__gcov_init): Ditto.
              (this_prg): Make it file scope static variable.
              (all_prg): Ditto.
              (crc32): Ditto.
              (gi_filename): Ditto.
              (fn_buffer): Ditto.
              (sum_buffer): Ditto.
              (struct gcov_filename_aux): New types to store auxiliary information
              for gi_filename.
      	* libgcc/libgcov-driver-system.c (gcov_error): New utility function.
      	(allocate_filename_struct): New function split from gcov_exit().
      	(gcov_exit_open_gcda_file): Ditto.
      	(create_file_directory): Moved from libgcov.c
      	* libgcc/Makefile.in: Change to build newly added files.
      
      From-SVN: r204730
      d6d3f033
Loading