summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-06-09 14:54:53 +0200
committerMartin Liska <marxin@gcc.gnu.org>2017-06-09 12:54:53 +0000
commit4f751c5437988863e622fd8b3ff82ec65e281260 (patch)
treee9a69c8567c8e3789ca0f89d0560978b67d5d97b /libgcc
parentf05d82a711d37d7958b6eda223f7afedb3eb5837 (diff)
downloadgcc-4f751c5437988863e622fd8b3ff82ec65e281260.tar.gz
Speed-up indirect-call instrumentation
2017-06-09 Martin Liska <mliska@suse.cz> * tree-profile.c (gimple_gen_ic_profiler): Update comment. (gimple_gen_ic_func_profiler): Emit direct comparison of __gcov_indirect_call_callee with NULL. (gimple_gen_time_profiler): Change probability from PROB_VERY_UNLIKELY to PROB_UNLIKELY. 2017-06-09 Martin Liska <mliska@suse.cz> * libgcov-profiler.c (__gcov_indirect_call_profiler_v2): Reset __gcov_indirect_call_callee to NULL. From-SVN: r249058
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/libgcov-profiler.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 5d531d9cea6..9a97dba918f 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-09 Martin Liska <mliska@suse.cz>
+
+ * libgcov-profiler.c (__gcov_indirect_call_profiler_v2):
+ Reset __gcov_indirect_call_callee to NULL.
+
2017-06-08 Olivier Hainque <hainque@adacore.com>
* config/t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 067d762c2af..e4570a01318 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -336,6 +336,8 @@ __gcov_indirect_call_profiler_v2 (gcov_type value, void* cur_func)
|| (__LIBGCC_VTABLE_USES_DESCRIPTORS__ && __gcov_indirect_call_callee
&& *(void **) cur_func == *(void **) __gcov_indirect_call_callee))
__gcov_one_value_profiler_body (__gcov_indirect_call_counters, value, 0);
+
+ __gcov_indirect_call_callee = NULL;
}
#endif