Commit de394e75 authored by peterz@infradead.org's avatar peterz@infradead.org Committed by Ingo Molnar

tracepoint: Fix overly long tracepoint names

Stephen Rothwell reported:

> Exported symbols need to be <= (64 - sizeof(Elf_Addr)) long.  This is
> presumably 56 on 64 bit arches and the above symbol (including the '.')
> is 56 characters long.

Shorten the tracepoint symbol name.

Fixes: d25e37d8 ("tracepoint: Optimize using static_call()")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200908105743.GW2674@hirez.programming.kicks-ass.net
parent 7c9903c9
...@@ -154,7 +154,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) ...@@ -154,7 +154,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
#ifdef CONFIG_HAVE_STATIC_CALL #ifdef CONFIG_HAVE_STATIC_CALL
#define __DO_TRACE_CALL(name) static_call(tp_func_##name) #define __DO_TRACE_CALL(name) static_call(tp_func_##name)
#else #else
#define __DO_TRACE_CALL(name) __tracepoint_iter_##name #define __DO_TRACE_CALL(name) __traceiter_##name
#endif /* CONFIG_HAVE_STATIC_CALL */ #endif /* CONFIG_HAVE_STATIC_CALL */
/* /*
...@@ -232,8 +232,8 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) ...@@ -232,8 +232,8 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
* poking RCU a bit. * poking RCU a bit.
*/ */
#define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \
extern int __tracepoint_iter_##name(data_proto); \ extern int __traceiter_##name(data_proto); \
DECLARE_STATIC_CALL(tp_func_##name, __tracepoint_iter_##name); \ DECLARE_STATIC_CALL(tp_func_##name, __traceiter_##name); \
extern struct tracepoint __tracepoint_##name; \ extern struct tracepoint __tracepoint_##name; \
static inline void trace_##name(proto) \ static inline void trace_##name(proto) \
{ \ { \
...@@ -288,19 +288,19 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) ...@@ -288,19 +288,19 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
static const char __tpstrtab_##_name[] \ static const char __tpstrtab_##_name[] \
__section(__tracepoints_strings) = #_name; \ __section(__tracepoints_strings) = #_name; \
extern struct static_call_key STATIC_CALL_KEY(tp_func_##_name); \ extern struct static_call_key STATIC_CALL_KEY(tp_func_##_name); \
int __tracepoint_iter_##_name(void *__data, proto); \ int __traceiter_##_name(void *__data, proto); \
struct tracepoint __tracepoint_##_name __used \ struct tracepoint __tracepoint_##_name __used \
__section(__tracepoints) = { \ __section(__tracepoints) = { \
.name = __tpstrtab_##_name, \ .name = __tpstrtab_##_name, \
.key = STATIC_KEY_INIT_FALSE, \ .key = STATIC_KEY_INIT_FALSE, \
.static_call_key = &STATIC_CALL_KEY(tp_func_##_name), \ .static_call_key = &STATIC_CALL_KEY(tp_func_##_name), \
.static_call_tramp = STATIC_CALL_TRAMP_ADDR(tp_func_##_name), \ .static_call_tramp = STATIC_CALL_TRAMP_ADDR(tp_func_##_name), \
.iterator = &__tracepoint_iter_##_name, \ .iterator = &__traceiter_##_name, \
.regfunc = _reg, \ .regfunc = _reg, \
.unregfunc = _unreg, \ .unregfunc = _unreg, \
.funcs = NULL }; \ .funcs = NULL }; \
__TRACEPOINT_ENTRY(_name); \ __TRACEPOINT_ENTRY(_name); \
int __tracepoint_iter_##_name(void *__data, proto) \ int __traceiter_##_name(void *__data, proto) \
{ \ { \
struct tracepoint_func *it_func_ptr; \ struct tracepoint_func *it_func_ptr; \
void *it_func; \ void *it_func; \
...@@ -314,18 +314,18 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) ...@@ -314,18 +314,18 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)
} while ((++it_func_ptr)->func); \ } while ((++it_func_ptr)->func); \
return 0; \ return 0; \
} \ } \
DEFINE_STATIC_CALL(tp_func_##_name, __tracepoint_iter_##_name); DEFINE_STATIC_CALL(tp_func_##_name, __traceiter_##_name);
#define DEFINE_TRACE(name, proto, args) \ #define DEFINE_TRACE(name, proto, args) \
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto), PARAMS(args)); DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto), PARAMS(args));
#define EXPORT_TRACEPOINT_SYMBOL_GPL(name) \ #define EXPORT_TRACEPOINT_SYMBOL_GPL(name) \
EXPORT_SYMBOL_GPL(__tracepoint_##name); \ EXPORT_SYMBOL_GPL(__tracepoint_##name); \
EXPORT_SYMBOL_GPL(__tracepoint_iter_##name); \ EXPORT_SYMBOL_GPL(__traceiter_##name); \
EXPORT_STATIC_CALL_GPL(tp_func_##name) EXPORT_STATIC_CALL_GPL(tp_func_##name)
#define EXPORT_TRACEPOINT_SYMBOL(name) \ #define EXPORT_TRACEPOINT_SYMBOL(name) \
EXPORT_SYMBOL(__tracepoint_##name); \ EXPORT_SYMBOL(__tracepoint_##name); \
EXPORT_SYMBOL(__tracepoint_iter_##name); \ EXPORT_SYMBOL(__traceiter_##name); \
EXPORT_STATIC_CALL(tp_func_##name) EXPORT_STATIC_CALL(tp_func_##name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment