Skip to contentSkip to conversation

include/trace/syscall.h: Use HAVE_SYSCALL_TRACEPOINTS instead of TRACEPOINTS

PATCH In review Chen Gang 2 participants 3 messages Jun 21, 2014 Tracing

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 include/trace/syscall.h: Use HAVE_SYSCALL_TRACEPOINTS instead of TRACEPOINTS

At present, most architectures can support TRACEPOINTS, but about 10/29 architectures support HAVE_SYSCALL_TRACEPOINTS.

TIF_SYSCALL_TRACEPOINT depends on HAVE_SYSCALL_TRACEPOINTS, not all architectures which support TRACEPOINTS also must support TIF_SYSCALL_TRACEPOINT.

So at present, need use HAVE_SYSCALL_TRACEPOINTS instead of TRACEPOINTS, or can not pass compiling. The related error (allmodconfig under score):

CC init/main.o
In file included from include/asm-generic/preempt.h:4:0,

                   from arch/score/include/generated/asm/preempt.h:1,
                   from include/linux/preempt.h:18,
                   from include/linux/spinlock.h:50,
                   from include/linux/seqlock.h:35,
                   from include/linux/time.h:5,
                   from include/linux/stat.h:18,
                   from include/linux/module.h:10,
                   from init/main.c:15:
  include/trace/syscall.h: In function 'syscall_tracepoint_update':
  include/trace/syscall.h:39:23: error: 'TIF_SYSCALL_TRACEPOINT' undeclared (first use in this function)
    if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
                         ^
  include/linux/thread_info.h:103:45: note: in definition of macro 'test_thread_flag'
    test_ti_thread_flag(current_thread_info(), flag)
                                               ^
  include/trace/syscall.h:39:23: note: each undeclared identifier is reported only once for each function it appears in
    if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
                         ^
  include/linux/thread_info.h:103:45: note: in definition of macro 'test_thread_flag'
    test_ti_thread_flag(current_thread_info(), flag)
                                               ^

make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

---
 include/trace/syscall.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/trace/syscall.h +1 -1
index 291c282..a709cbd 100644
@@ -33,7 +33,7 @@ struct syscall_metadata {
 	struct ftrace_event_call *exit_event;
 };
 
-#ifdef CONFIG_TRACEPOINTS
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
 static inline void syscall_tracepoint_update(struct task_struct *p)
 {
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
Signature · 1 line
1.9.2.459.g68773ac
maintainer
#1 lore raw

include/trace/syscall.h struct syscall_metadata { · line 39

Quoted 13 lines · On Sat, 21 Jun 2014 10:32:37 +0800 Chen Gang <[email protected]> wrote:
include/trace/syscall.h +1 -1
index 291c282..a709cbd 100644
@@ -33,7 +33,7 @@ struct syscall_metadata {
 	struct ftrace_event_call *exit_event;
 };
 
-#ifdef CONFIG_TRACEPOINTS
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
 static inline void syscall_tracepoint_update(struct task_struct *p)
 {
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))

This has already been fixed and is in my for-next branch getting ready to be pushed.

-- Steve

author
#2 lore raw
Quoted 11 lines · Steven Rostedt
Quoted 8 lines · On Sat, 21 Jun 2014 10:32:37 +0800 Chen Gang <[email protected]> wrote:
include/trace/syscall.h +0 -0
index 291c282..a709cbd 100644
@@ -33,7 +33,7 @@ struct syscall_metadata {
 	struct ftrace_event_call *exit_event;
 };
 
Quoted 9 lines

include/trace/syscall.h struct syscall_metadata { · line 39

Quoted 5 lines
include/trace/syscall.h +1 -1
-#ifdef CONFIG_TRACEPOINTS
+#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
 static inline void syscall_tracepoint_update(struct task_struct *p)
 {
 	if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))

This has already been fixed and is in my for-next branch getting ready to be pushed.

OK, thank you for replying in time.

Thanks.

Signature · 1 line
Open share and attitude like air warter and life which God blessed