trace: Add an option to show tgids in trace output
[firefly-linux-kernel-4.4.55.git] / kernel / trace / trace.h
index 919d9d07686f5bcaad65699f400748a4b4db8a5e..e1265f95457fb6586a7c159ad771df6dd8c58db3 100644 (file)
@@ -656,6 +656,7 @@ static inline void __trace_stack(struct trace_array *tr, unsigned long flags,
 extern cycle_t ftrace_now(int cpu);
 
 extern void trace_find_cmdline(int pid, char comm[]);
+extern int trace_find_tgid(int pid);
 
 #ifdef CONFIG_DYNAMIC_FTRACE
 extern unsigned long ftrace_update_tot_cnt;
@@ -970,7 +971,8 @@ extern int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
                FUNCTION_FLAGS                                  \
                FGRAPH_FLAGS                                    \
                STACK_FLAGS                                     \
-               BRANCH_FLAGS
+               BRANCH_FLAGS                                    \
+               C(TGID,                 "print-tgid"),
 
 /*
  * By defining C, we can make TRACE_FLAGS a list of bit names