aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-driver-system.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-27Remove quite obvious dead assignments.Martin Liska1-3/+1
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
2019-06-25Do not call strlen with NULL argument in libgcov.Martin Liska1-2/+3
2019-06-25 Martin Liska <mliska@suse.cz> * libgcov-driver-system.c (replace_filename_variables): Do not call strlen with NULL argument. From-SVN: r272650
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-06-07Fix libgcov-driver-system bootstrap failure (PR bootstrap/86057).Martin Liska1-9/+25
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
2018-06-05Support variables in expansion of -fprofile-generate option (PR ↵Martin Liska1-0/+70
gcov-profile/47618). 2018-06-05 Martin Liska <mliska@suse.cz> PR gcov-profile/47618 * doc/invoke.texi: Document how -fprofile-dir format is extended. 2018-06-05 Martin Liska <mliska@suse.cz> PR gcov-profile/47618 * libgcov-driver-system.c (replace_filename_variables): New function. (gcov_exit_open_gcda_file): Use it. From-SVN: r261199
2018-05-29libgcov: report about a different timestamp (PR gcov-profile/85759).Martin Liska1-1/+9
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
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-06-06re PR bootstrap/71400 (profiledbootstrap failed)Aaron Conole1-14/+12
PR libgcc/71400 * libgcov-driver-system.c (__gcov_error_file): Disable if IN_GCOV_TOOL. (get_gcov_error_file): Check __gcov_error_file before trying to initialize it. (gcov_error): Always use get_gcov_error_file. Co-Authored-By: Nathan Sidwell <nathan@acm.org> From-SVN: r237135
2016-06-02On behalf of Aaron Conole <aconole@redhat.com>Aaron Conole1-2/+47
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
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-02-10re PR gcov-profile/61889 (gcov-tool.c uses nftw, ftw.h)Rainer Emrich1-0/+3
2015-02-10 Rainer Emrich <rainer@emrich-ebersheim.de> PR gcov-profile/61889 * libgcc/libgcov-driver-system.c: undefine clashing macro for mkdir. From-SVN: r220582
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-07-27libgcov-driver.c (struct gcov_filename_aux): Rename ...Nathan Sidwell1-59/+46
* 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
2014-01-08gcov-io.c (gcov_var): Move from gcov-io.h.Rong Xu1-1/+1
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
2014-01-02Update copyright years in libgcc/Richard Sandiford1-1/+1
From-SVN: r206295
2013-11-13The patch re-factors libgcov.c to make it better modulelized.Rong Xu1-0/+203
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