tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/static_call
head: 814cfbceba54e980b1f949a13d04b1909bbe80da
commit: 742ae762f81fd75c8bbcbfb3a807502aabd75291 [29/34] tracepoints: Use static_call
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout 742ae762f81fd75c8bbcbfb3a807502aabd75291
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from sound/hda/trace.h:8:0,
from sound/hda/trace.c:6:
> include/linux/tracepoint.h:292:5: error: implicit declaration of
function 'STATIC_CALL_TRAMP_ADDR'; did you mean 'STATOC_CALL_TRAMP_ADDR'?
[-Werror=implicit-function-declaration]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/hda/./trace.h:19:1: note: in expansion of macro
'TRACE_EVENT'
TRACE_EVENT(hda_send_cmd,
^~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/hda/./trace.h:19:1: note: in expansion of macro
'TRACE_EVENT'
TRACE_EVENT(hda_send_cmd,
^~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_hda_send_cmd.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/hda/./trace.h:19:1: note: in expansion of macro
'TRACE_EVENT'
TRACE_EVENT(hda_send_cmd,
^~~~~~~~~~~
> include/linux/tracepoint.h:292:5: error: initializer element is
not constant
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/hda/./trace.h:19:1: note: in expansion of macro
'TRACE_EVENT'
TRACE_EVENT(hda_send_cmd,
^~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_hda_send_cmd.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/hda/./trace.h:19:1: note: in expansion of macro
'TRACE_EVENT'
TRACE_EVENT(hda_send_cmd,
^~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
--
In file included from sound/pci/hda/hda_controller_trace.h:9:0,
from sound/pci/hda/hda_controller.c:30:
> include/linux/tracepoint.h:292:5: error: implicit declaration of
function 'STATIC_CALL_TRAMP_ADDR'; did you mean 'STATOC_CALL_TRAMP_ADDR'?
[-Werror=implicit-function-declaration]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_controller_trace.h:14:1: note: in expansion
of macro 'TRACE_EVENT'
TRACE_EVENT(azx_pcm_trigger,
^~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_controller_trace.h:14:1: note: in expansion
of macro 'TRACE_EVENT'
TRACE_EVENT(azx_pcm_trigger,
^~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_azx_pcm_trigger.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_controller_trace.h:14:1: note: in expansion
of macro 'TRACE_EVENT'
TRACE_EVENT(azx_pcm_trigger,
^~~~~~~~~~~
> include/linux/tracepoint.h:292:5: error: initializer element is
not constant
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_controller_trace.h:14:1: note: in expansion
of macro 'TRACE_EVENT'
TRACE_EVENT(azx_pcm_trigger,
^~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_azx_pcm_trigger.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
> include/trace/define_trace.h:28:2: note: in expansion of macro
'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_controller_trace.h:14:1: note: in expansion
of macro 'TRACE_EVENT'
TRACE_EVENT(azx_pcm_trigger,
^~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
--
In file included from sound/pci/hda/hda_intel_trace.h:9:0,
from sound/pci/hda/hda_intel.c:58:
> include/linux/tracepoint.h:292:5: error: implicit declaration of
function 'STATIC_CALL_TRAMP_ADDR'; did you mean 'STATOC_CALL_TRAMP_ADDR'?
[-Werror=implicit-function-declaration]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_intel_trace.h:27:1: note: in expansion of
macro 'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_suspend,
^~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_intel_trace.h:27:1: note: in expansion of
macro 'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_suspend,
^~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_azx_suspend.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_intel_trace.h:27:1: note: in expansion of
macro 'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_suspend,
^~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: error: initializer element is
not constant
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_intel_trace.h:27:1: note: in expansion of
macro 'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_suspend,
^~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_azx_suspend.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
> sound/pci/hda/./hda_intel_trace.h:27:1: note: in expansion of
macro 'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_suspend,
^~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
sound/pci/hda/./hda_intel_trace.h:32:1: note: in expansion of macro
'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_resume,
^~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_azx_resume.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
sound/pci/hda/./hda_intel_trace.h:32:1: note: in expansion of macro
'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_resume,
^~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: error: initializer element is
not constant
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
sound/pci/hda/./hda_intel_trace.h:32:1: note: in expansion of macro
'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_resume,
^~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_azx_resume.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/linux/tracepoint.h:313:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto),
PARAMS(args));
^~~~~~~~~~~~~~~
include/trace/define_trace.h:57:2: note: in expansion of macro 'DEFINE_TRACE'
DEFINE_TRACE(name, PARAMS(proto), PARAMS(args))
^~~~~~~~~~~~
sound/pci/hda/./hda_intel_trace.h:32:1: note: in expansion of macro
'DEFINE_EVENT'
DEFINE_EVENT(hda_pm, azx_resume,
^~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
--
In file included from include/trace/syscall.h:5:0,
from include/linux/syscalls.h:85,
from arch/x86//entry/common.c:27:
> include/linux/tracepoint.h:292:5: error: implicit declaration of
function 'STATIC_CALL_TRAMP_ADDR'; did you mean 'STATOC_CALL_TRAMP_ADDR'?
[-Werror=implicit-function-declaration]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
> include/trace/events/syscalls.h:18:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_enter,
^~~~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
> include/trace/events/syscalls.h:18:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_enter,
^~~~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_sys_enter.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
> include/trace/events/syscalls.h:18:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_enter,
^~~~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: error: initializer element is
not constant
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
> include/trace/events/syscalls.h:18:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_enter,
^~~~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_sys_enter.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
> include/trace/events/syscalls.h:18:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_enter,
^~~~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
include/trace/events/syscalls.h:44:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_exit,
^~~~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_sys_exit.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
include/trace/events/syscalls.h:44:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_exit,
^~~~~~~~~~~~~~
> include/linux/tracepoint.h:292:5: error: initializer element is
not constant
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
include/trace/events/syscalls.h:44:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_exit,
^~~~~~~~~~~~~~
include/linux/tracepoint.h:292:5: note: (near initialization for
'__tracepoint_sys_exit.static_call_tramp')
STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
^
> include/trace/define_trace.h:42:2: note: in expansion of macro
'DEFINE_TRACE_FN'
DEFINE_TRACE_FN(name, reg, unreg, PARAMS(proto),
PARAMS(args))
^~~~~~~~~~~~~~~
include/trace/events/syscalls.h:44:1: note: in expansion of macro
'TRACE_EVENT_FN'
TRACE_EVENT_FN(sys_exit,
^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
..
vim +292 include/linux/tracepoint.h
217
218 /*
219 * Make sure the alignment of the structure in the __tracepoints section will
220 * not add unwanted padding between the beginning of the section and the
221 * structure. Force alignment to the same alignment as the section start.
222 *
223 * When lockdep is enabled, we make sure to always do the RCU portions of
224 * the tracepoint code, regardless of whether tracing is on. However,
225 * don't check if the condition is false, due to interaction with idle
226 * instrumentation. This lets us find RCU issues triggered with tracepoints
227 * even when this tracepoint is off. This code has no purpose other than
228 * poking RCU a bit.
229 */
230 #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \
231 extern int __tracepoint_iter_##name(data_proto); \
232 DECLARE_STATIC_CALL(tp_func_##name, __tracepoint_iter_##name); \
233 extern struct tracepoint __tracepoint_##name; \
234 static inline void trace_##name(proto) \
235 { \
236 if (static_key_false(&__tracepoint_##name.key)) \
237 __DO_TRACE(name, \
238 TP_PROTO(data_proto), \
239 TP_ARGS(data_args), \
240 TP_CONDITION(cond), 0); \
241 if (IS_ENABLED(CONFIG_LOCKDEP) && (cond)) { \
242 rcu_read_lock_sched_notrace(); \
243 rcu_dereference_sched(__tracepoint_##name.funcs);\
244 rcu_read_unlock_sched_notrace(); \
245 } \
246 } \
247 __DECLARE_TRACE_RCU(name, PARAMS(proto), PARAMS(args), \
248 PARAMS(cond), PARAMS(data_proto), PARAMS(data_args)) \
249 static inline int \
250 register_trace_##name(void (*probe)(data_proto), void *data) \
251 { \
252 return tracepoint_probe_register(&__tracepoint_##name, \
253 (void *)probe, data); \
254 } \
255 static inline int \
256 register_trace_prio_##name(void (*probe)(data_proto), void *data,\
257 int prio) \
258 { \
259 return tracepoint_probe_register_prio(&__tracepoint_##name, \
260 (void *)probe, data, prio); \
261 } \
262 static inline int \
263 unregister_trace_##name(void (*probe)(data_proto), void *data) \
264 { \
265 return tracepoint_probe_unregister(&__tracepoint_##name,\
266 (void *)probe, data); \
267 } \
268 static inline void \
269 check_trace_callback_type_##name(void (*cb)(data_proto)) \
270 { \
271 } \
272 static inline bool \
273 trace_##name##_enabled(void) \
274 { \
275 return static_key_false(&__tracepoint_##name.key); \
276 }
277
278 /*
279 * We have no guarantee that gcc and the linker won't up-align the tracepoint
280 * structures, so we create an array of pointers that will be used for iteration
281 * on the tracepoints.
282 */
283 #define DEFINE_TRACE_FN(name, reg, unreg, proto, args) \
284 static const char __tpstrtab_##name[] \
285 __attribute__((section("__tracepoints_strings"))) = #name; \
286 extern struct static_call_key tp_func_##name; \
287 int __tracepoint_iter_##name(void *__data, proto); \
288 struct tracepoint __tracepoint_##name \
289 __attribute__((section("__tracepoints"), used)) = \
290 { __tpstrtab_##name, STATIC_KEY_INIT_FALSE, \
291 &STATIC_CALL_NAME(tp_func_##name), \
292 STATIC_CALL_TRAMP_ADDR(tp_func_##name), \
293
&__tracepoint_iter_##name, \
294 reg, unreg, NULL }; \
295 __TRACEPOINT_ENTRY(name); \
296 int __tracepoint_iter_##name(void *__data, proto) \
297 { \
298 struct tracepoint_func *it_func_ptr; \
299 void *it_func; \
300 \
301 it_func_ptr = \
302 rcu_dereference_raw((&__tracepoint_##name)->funcs); \
303 do { \
304 it_func = (it_func_ptr)->func; \
305 __data = (it_func_ptr)->data; \
306 ((void(*)(void *, proto))(it_func))(__data, args); \
307 } while ((++it_func_ptr)->func); \
308 return 0; \
309 } \
310 DEFINE_STATIC_CALL(tp_func_##name, __tracepoint_iter_##name);
311
312 #define DEFINE_TRACE(name, proto, args) \
313 DEFINE_TRACE_FN(name, NULL, NULL, PARAMS(proto), PARAMS(args));
314
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation