* [PATCH] Bump version of __gcov_indirect_call_profiler function as there was ABI change.
@ 2019-01-18 10:06 Martin Liška
2019-01-18 10:17 ` Jan Hubicka
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2019-01-18 10:06 UTC (permalink / raw)
To: gcc-patches; +Cc: Jan Hubicka
[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]
Hi.
Last GCOV patch renames __gcov_indirect_call_profiler_v2 to __gcov_indirect_call_profiler_v3
as we changed ABI and one should see a linker error instead of strange run-time error.
That can happen when somebody mixes objects built with a different version of compiler.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
gcc/ChangeLog:
2019-01-18 Martin Liska <mliska@suse.cz>
* params.def: Fix comment.
* tree-profile.c (gimple_init_gcov_profiler): Bump function
name.
(gimple_gen_ic_func_profiler): Likewise.
gcc/testsuite/ChangeLog:
2019-01-18 Martin Liska <mliska@suse.cz>
* gcc.dg/no_profile_instrument_function-attr-1.c: Update
expected function name.
libgcc/ChangeLog:
2019-01-18 Martin Liska <mliska@suse.cz>
* libgcov-profiler.c (__gcov_indirect_call_profiler_v2): Rename
to ...
(__gcov_indirect_call_profiler_v3): ... this.
* libgcov.h (__gcov_indirect_call_profiler_v2): Likewise.
(__gcov_indirect_call_profiler_v3): Likewise.
* Makefile.in: Bump function name.
---
gcc/params.def | 2 +-
.../gcc.dg/no_profile_instrument_function-attr-1.c | 2 +-
gcc/tree-profile.c | 6 +++---
libgcc/Makefile.in | 2 +-
libgcc/libgcov-profiler.c | 4 ++--
libgcc/libgcov.h | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
[-- Attachment #2: 0001-Bump-version-of-__gcov_indirect_call_profiler-functi.patch --]
[-- Type: text/x-patch, Size: 4562 bytes --]
diff --git a/gcc/params.def b/gcc/params.def
index 1a2af2c80bb..e5553af63c4 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -995,7 +995,7 @@ DEFPARAM (PARAM_PROFILE_FUNC_INTERNAL_ID,
/* When the parameter is 1, track the most frequent N target
addresses in indirect-call profile. This disables
- indirect_call_profiler_v2 which tracks single target. */
+ indirect_call_profiler_v3 which tracks single target. */
DEFPARAM (PARAM_INDIR_CALL_TOPN_PROFILE,
"indir-call-topn-profile",
"Track top N target addresses in indirect-call profile.",
diff --git a/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c b/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c
index 0f04fb1eedc..41d745532fa 100644
--- a/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c
+++ b/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c
@@ -19,6 +19,6 @@ int main ()
}
/* { dg-final { scan-tree-dump-times "__gcov0\\.main.* = PROF_edge_counter" 1 "optimized"} } */
-/* { dg-final { scan-tree-dump-times "__gcov_indirect_call_profiler_v2" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "__gcov_indirect_call_profiler_v3" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__gcov_time_profiler_counter = " 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "__gcov_init" 1 "optimized" } } */
diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c
index 5860e7c3f19..1c3034aac10 100644
--- a/gcc/tree-profile.c
+++ b/gcc/tree-profile.c
@@ -186,7 +186,7 @@ gimple_init_gcov_profiler (void)
gcov_type_node,
ptr_type_node,
NULL_TREE);
- profiler_fn_name = "__gcov_indirect_call_profiler_v2";
+ profiler_fn_name = "__gcov_indirect_call_profiler_v3";
if (PARAM_VALUE (PARAM_INDIR_CALL_TOPN_PROFILE))
profiler_fn_name = "__gcov_indirect_call_topn_profiler";
@@ -459,9 +459,9 @@ gimple_gen_ic_func_profiler (void)
/* Insert code:
if (__gcov_indirect_call_callee != NULL)
- __gcov_indirect_call_profiler_v2 (profile_id, ¤t_function_decl);
+ __gcov_indirect_call_profiler_v3 (profile_id, ¤t_function_decl);
- The function __gcov_indirect_call_profiler_v2 is responsible for
+ The function __gcov_indirect_call_profiler_v3 is responsible for
resetting __gcov_indirect_call_callee to NULL. */
gimple_stmt_iterator gsi = gsi_start_bb (cond_bb);
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 8b0f0cf042b..ea390a5bbea 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -899,7 +899,7 @@ LIBGCOV_PROFILER = _gcov_interval_profiler \
_gcov_average_profiler_atomic \
_gcov_ior_profiler \
_gcov_ior_profiler_atomic \
- _gcov_indirect_call_profiler_v2 \
+ _gcov_indirect_call_profiler_v3 \
_gcov_time_profiler \
_gcov_indirect_call_topn_profiler
LIBGCOV_INTERFACE = _gcov_dump _gcov_flush _gcov_fork \
diff --git a/libgcc/libgcov-profiler.c b/libgcc/libgcov-profiler.c
index 4cacf894174..7116330252b 100644
--- a/libgcc/libgcov-profiler.c
+++ b/libgcc/libgcov-profiler.c
@@ -296,7 +296,7 @@ __gcov_indirect_call_topn_profiler (gcov_type value, void* cur_func)
}
#endif
-#ifdef L_gcov_indirect_call_profiler_v2
+#ifdef L_gcov_indirect_call_profiler_v3
/* These two variables are used to actually track caller and callee. Keep
them in TLS memory so races are not common (they are written to often).
@@ -318,7 +318,7 @@ struct indirect_call_tuple __gcov_indirect_call;
/* Tries to determine the most common value among its inputs. */
void
-__gcov_indirect_call_profiler_v2 (gcov_type value, void* cur_func)
+__gcov_indirect_call_profiler_v3 (gcov_type value, void* cur_func)
{
/* If the C++ virtual tables contain function descriptors then one
function may have multiple descriptors and we need to dereference
diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h
index be5682fd8b2..993db8fb057 100644
--- a/libgcc/libgcov.h
+++ b/libgcc/libgcov.h
@@ -278,7 +278,7 @@ extern void __gcov_pow2_profiler (gcov_type *, gcov_type);
extern void __gcov_pow2_profiler_atomic (gcov_type *, gcov_type);
extern void __gcov_one_value_profiler (gcov_type *, gcov_type);
extern void __gcov_one_value_profiler_atomic (gcov_type *, gcov_type);
-extern void __gcov_indirect_call_profiler_v2 (gcov_type, void *);
+extern void __gcov_indirect_call_profiler_v3 (gcov_type, void *);
extern void __gcov_time_profiler (gcov_type *);
extern void __gcov_time_profiler_atomic (gcov_type *);
extern void __gcov_average_profiler (gcov_type *, gcov_type);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Bump version of __gcov_indirect_call_profiler function as there was ABI change.
2019-01-18 10:06 [PATCH] Bump version of __gcov_indirect_call_profiler function as there was ABI change Martin Liška
@ 2019-01-18 10:17 ` Jan Hubicka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Hubicka @ 2019-01-18 10:17 UTC (permalink / raw)
To: Martin Liška; +Cc: gcc-patches
> Hi.
>
> Last GCOV patch renames __gcov_indirect_call_profiler_v2 to __gcov_indirect_call_profiler_v3
> as we changed ABI and one should see a linker error instead of strange run-time error.
> That can happen when somebody mixes objects built with a different version of compiler.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
OK,
thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-18 10:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-18 10:06 [PATCH] Bump version of __gcov_indirect_call_profiler function as there was ABI change Martin Liška
2019-01-18 10:17 ` Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).