aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcov-profiler.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-11-03 16:24:22 +0100
committerMartin Liska <marxin@gcc.gnu.org>2016-11-03 15:24:22 +0000
commit7d29f8e3dc105bcc948377a3c68250f555119d8c (patch)
treec52598610873862306ffb6e9daafae7f170aa0f9 /libgcc/libgcov-profiler.c
parent5de3e2d862e02f7b0c8efe8fbec2c15592302ba9 (diff)
Make direct emission of time profiler counter
* libgcov-profiler.c (__gcov_time_profiler): Remove. (__gcov_time_profiler_atomic): Likewise. * profile.c (instrument_values): Fix coding style. (branch_prob): Use renamed function. * tree-profile.c (init_ic_make_global_vars): Likewise. (gimple_init_edge_profiler): Rename to gimple_init_gcov_profiler. tree_time_profiler_counter variable declaration. (gimple_gen_time_profiler): Rewrite to do a direct gimple code emission. * value-prof.h: Remove an argument. * gcc.dg/no_profile_instrument_function-attr-1.c: Update scanned output. * gcc.dg/tree-prof/time-profiler-3.c: New test. From-SVN: r241821
Diffstat (limited to 'libgcc/libgcov-profiler.c')
-rw-r--r--libgcc/libgcov-profiler.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 38ed5f113e7..4f0a40675a2 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -342,30 +342,9 @@ __gcov_indirect_call_profiler_v2 (gcov_type value, void* cur_func)
#ifdef L_gcov_time_profiler
/* Counter for first visit of each function. */
-static gcov_type function_counter;
+gcov_type __gcov_time_profiler_counter ATTRIBUTE_HIDDEN;
-/* Sets corresponding COUNTERS if there is no value. */
-
-void
-__gcov_time_profiler (gcov_type* counters)
-{
- if (!counters[0])
- counters[0] = ++function_counter;
-}
-
-#if GCOV_SUPPORTS_ATOMIC
-/* Sets corresponding COUNTERS if there is no value.
- Function is thread-safe. */
-
-void
-__gcov_time_profiler_atomic (gcov_type* counters)
-{
- if (!counters[0])
- counters[0] = __atomic_add_fetch (&function_counter, 1, __ATOMIC_RELAXED);
-}
#endif
-#endif
-
#ifdef L_gcov_average_profiler
/* Increase corresponding COUNTER by VALUE. FIXME: Perhaps we want