aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-interface.c
AgeCommit message (Collapse)AuthorFilesLines
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-05-05Remove __gcov_flush.Martin Liska1-29/+7
PR gcov-profile/93623 * tree-cfg.c (stmt_can_terminate_bb_p): Update comment to reflect reality. PR gcov-profile/93623 * Makefile.in: Remove __gcov_flush. * gcov.h (__gcov_flush): Remove. * libgcov-interface.c (__gcov_flush): Remove. (init_mx): Use renamed mutex. (__gcov_lock): Likewise. (__gcov_unlock): Likewise. (__gcov_fork): Likewise. (__gcov_flush): Remove.
2020-05-05Use __gcov_dump and __gcov_reset in execv and fork context.Martin Liska1-16/+43
PR gcov-profile/93623 * libgcov-interface.c (__gcov_fork): Do not flush and reset only in child process. (__gcov_execl): Dump counters only and reset them only if exec* fails. (__gcov_execlp): Likewise. (__gcov_execle): Likewise. (__gcov_execv): Likewise. (__gcov_execvp): Likewise. (__gcov_execve): Likewise.
2020-05-05Do locking for __gcov_dump and __gcov_reset as well.Martin Liska1-15/+44
PR gcov-profile/93623 * Makefile.in: Add _gcov_lock_unlock to LIBGCOV_INTERFACE. * libgcov-interface.c (ALIAS_void_fn): Remove. (__gcov_lock): New. (__gcov_unlock): New. (__gcov_flush): Use __gcov_lock and __gcov_unlock. (__gcov_reset): Likewise. (__gcov_dump): Likewise. * libgcov.h (__gcov_lock): New declaration. (__gcov_unlock): Likewise.
2020-03-02Remove duplicate declaration.Martin Liska1-1/+0
* libgcov-interface.c: Remove duplicate declaration of __gcov_flush_mx.
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
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-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-09-17Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ...Nathan Sidwell1-7/+23
* Makefile.in (LIBGCOV_INTERFACE): Add _gcov_dump from ... (LIBGCOV_DRIVER): ... here. * libgcov-driver.c (gcov_master): New. (gcov_exit): Remove from master chain. (__gcov_init): Add to master chain if version compatible. Don't clear the version. * libgcov_interface (__gcov_flust): Call gcov_dump_int. (gcov_reset_int): Clear master chain, if compatible. (gcov_dump_int): New internal interface. Dump master chain, if compatible. (gcov_dump): Alias for gcov_dump_int. * libgcov.h (struct gcov_root): Add next and prev fields. (struct gcov_master): New struct. (__gcov_master): New. (gcov_dump_int): Declare. From-SVN: r215337
2014-09-07libgcov-interface.c (STRONG_ALIAS): Rename to ...Nathan Sidwell1-5/+8
* libgcov-interface.c (STRONG_ALIAS): Rename to ... (ALIAS_weak): ... here. Use forwarding function. Adjust uses. From-SVN: r215005
2014-09-03libgcov-interface.c (STRONG_ALIAS): New.Nathan Sidwell1-2/+10
* libgcov-interface.c (STRONG_ALIAS): New. (__gcov_flush): Call __gcov_reset_int. (__gcov_reset): Strong alias for ... (__gcov_reset_ing): ... this renamed hidden version. * libgcov.h (__gcov_reset_int): New declaration. From-SVN: r214840
2014-08-07Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ...Nathan Sidwell1-9/+37
* Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ... (LIBGCOV_DRIVER): ... to here. * libgcov.h (gcov_do_dump): New #define. (struct gcov_root): New. (__gcov_root): New declaration. (__gcov_dump_one): Declare. * libgcov-driver.c (gcov_list, gcov_dump_complete, run_accounted): Delete. (gcov_compute_histogram): Add LIST argument, adjust. (compute_summary): Adjust gcov_compute_histogram call. (gcov_do_dump): Not hidden, static in libgcov. (gcov_clear): Move to interface.c. (__gcov_dump_one): New, broken out of ... (gcov_exit): ... here. Make static. (__gcov_root): New. (__gcov_init): Adjust. * libgcov-interface.c (gcov_clear, gcov_exit): Remove declarations. (__gcov_flush): Use __gcov_dump_one and __gcov_reset. (gcov_clear): Moved from driver.c. Add LIST argument. (__gcov_reset): Adjust for changed interfaces. (__gcov_fork): Remove local declaration of __gcov_flush_mx. From-SVN: r213719
2014-08-01Makefile.in (LIBGCOV_MERGE, [...]): Reformat.Nathan Sidwell1-13/+14
* Makefile.in (LIBGCOV_MERGE, LIBGCOV_PROFILER, LIBGCOV_INTERFACE): Reformat. * libgcov-driver.c (gcov_exit, __gcov_init): Disable when IN_GCOV_TOOL. * libgcov-interface.c: Reformat some comments. (__gcov_flush_mx): Add declaration. Tidy up definition. From-SVN: r213442
2014-07-25libgcov-driver.c (set_gcov_dump_complete, [...]): Remove global functions ↵Nathan Sidwell1-7/+0
polluting user's namespace. * libgcov-driver.c (set_gcov_dump_complete, reset_gcov_dump_complete, get_gcov_dump_complete): Remove global functions polluting user's namespace. (gcov_exit): Set variable directly. (gcov_clear): Reset variable directly. * libgcov-interface.c (get_gcov_dymp_complete, reset_gov_dump_complete): Remove declarations. (__gcov_reset, __gcov_dump): Don't call them. From-SVN: r213058
2014-01-08gcov-io.c (gcov_var): Move from gcov-io.h.Rong Xu1-12/+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/+279
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