提交 9011262a 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Ingo Molnar

ftrace: add ftrace_vprintk

Impact: new helper function
Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 5ce1b1ed
...@@ -302,6 +302,9 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3); ...@@ -302,6 +302,9 @@ ftrace_special(unsigned long arg1, unsigned long arg2, unsigned long arg3);
extern int extern int
__ftrace_printk(unsigned long ip, const char *fmt, ...) __ftrace_printk(unsigned long ip, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3))); __attribute__ ((format (printf, 2, 3)));
# define ftrace_vprintk(fmt, ap) __ftrace_printk(_THIS_IP_, fmt, ap)
extern int
__ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);
extern void ftrace_dump(void); extern void ftrace_dump(void);
#else #else
static inline void static inline void
...@@ -317,6 +320,11 @@ ftrace_printk(const char *fmt, ...) ...@@ -317,6 +320,11 @@ ftrace_printk(const char *fmt, ...)
{ {
return 0; return 0;
} }
static inline int
ftrace_vprintk(const char *fmt, va_list ap)
{
return 0;
}
static inline void ftrace_dump(void) { } static inline void ftrace_dump(void) { }
#endif #endif
......
...@@ -2951,6 +2951,15 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...) ...@@ -2951,6 +2951,15 @@ int __ftrace_printk(unsigned long ip, const char *fmt, ...)
} }
EXPORT_SYMBOL_GPL(__ftrace_printk); EXPORT_SYMBOL_GPL(__ftrace_printk);
int __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap)
{
if (!(trace_flags & TRACE_ITER_PRINTK))
return 0;
return trace_vprintk(ip, task_curr_ret_stack(current), fmt, ap);
}
EXPORT_SYMBOL_GPL(__ftrace_vprintk);
static int trace_panic_handler(struct notifier_block *this, static int trace_panic_handler(struct notifier_block *this,
unsigned long event, void *unused) unsigned long event, void *unused)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册