Commit 645df987 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

tracing: Rename ftrace_print_*() functions ta trace_print_*()

The name "ftrace" really refers to the function hook infrastructure. It
is not about the trace_events. The functions ftrace_print_*() are not part of
the function infrastructure, and the names can be confusing. Rename them
to be trace_print_*().
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent af658dca
#ifndef _LINUX_FTRACE_EVENT_H #ifndef _LINUX_TRACE_EVENT_H
#define _LINUX_FTRACE_EVENT_H #define _LINUX_TRACE_EVENT_H
#include <linux/ring_buffer.h> #include <linux/ring_buffer.h>
#include <linux/trace_seq.h> #include <linux/trace_seq.h>
...@@ -25,27 +25,27 @@ struct trace_print_flags_u64 { ...@@ -25,27 +25,27 @@ struct trace_print_flags_u64 {
const char *name; const char *name;
}; };
const char *ftrace_print_flags_seq(struct trace_seq *p, const char *delim, const char *trace_print_flags_seq(struct trace_seq *p, const char *delim,
unsigned long flags, unsigned long flags,
const struct trace_print_flags *flag_array); const struct trace_print_flags *flag_array);
const char *ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, const char *trace_print_symbols_seq(struct trace_seq *p, unsigned long val,
const struct trace_print_flags *symbol_array); const struct trace_print_flags *symbol_array);
#if BITS_PER_LONG == 32 #if BITS_PER_LONG == 32
const char *ftrace_print_symbols_seq_u64(struct trace_seq *p, const char *trace_print_symbols_seq_u64(struct trace_seq *p,
unsigned long long val, unsigned long long val,
const struct trace_print_flags_u64 const struct trace_print_flags_u64
*symbol_array); *symbol_array);
#endif #endif
const char *ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr, const char *trace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr,
unsigned int bitmask_size); unsigned int bitmask_size);
const char *ftrace_print_hex_seq(struct trace_seq *p, const char *trace_print_hex_seq(struct trace_seq *p,
const unsigned char *buf, int len); const unsigned char *buf, int len);
const char *ftrace_print_array_seq(struct trace_seq *p, const char *trace_print_array_seq(struct trace_seq *p,
const void *buf, int count, const void *buf, int count,
size_t el_size); size_t el_size);
......
...@@ -258,7 +258,7 @@ TRACE_MAKE_SYSTEM_STR(); ...@@ -258,7 +258,7 @@ TRACE_MAKE_SYSTEM_STR();
void *__bitmask = __get_dynamic_array(field); \ void *__bitmask = __get_dynamic_array(field); \
unsigned int __bitmask_size; \ unsigned int __bitmask_size; \
__bitmask_size = __get_dynamic_array_len(field); \ __bitmask_size = __get_dynamic_array_len(field); \
ftrace_print_bitmask_seq(p, __bitmask, __bitmask_size); \ trace_print_bitmask_seq(p, __bitmask, __bitmask_size); \
}) })
#undef __print_flags #undef __print_flags
...@@ -266,7 +266,7 @@ TRACE_MAKE_SYSTEM_STR(); ...@@ -266,7 +266,7 @@ TRACE_MAKE_SYSTEM_STR();
({ \ ({ \
static const struct trace_print_flags __flags[] = \ static const struct trace_print_flags __flags[] = \
{ flag_array, { -1, NULL }}; \ { flag_array, { -1, NULL }}; \
ftrace_print_flags_seq(p, delim, flag, __flags); \ trace_print_flags_seq(p, delim, flag, __flags); \
}) })
#undef __print_symbolic #undef __print_symbolic
...@@ -274,7 +274,7 @@ TRACE_MAKE_SYSTEM_STR(); ...@@ -274,7 +274,7 @@ TRACE_MAKE_SYSTEM_STR();
({ \ ({ \
static const struct trace_print_flags symbols[] = \ static const struct trace_print_flags symbols[] = \
{ symbol_array, { -1, NULL }}; \ { symbol_array, { -1, NULL }}; \
ftrace_print_symbols_seq(p, value, symbols); \ trace_print_symbols_seq(p, value, symbols); \
}) })
#undef __print_symbolic_u64 #undef __print_symbolic_u64
...@@ -283,7 +283,7 @@ TRACE_MAKE_SYSTEM_STR(); ...@@ -283,7 +283,7 @@ TRACE_MAKE_SYSTEM_STR();
({ \ ({ \
static const struct trace_print_flags_u64 symbols[] = \ static const struct trace_print_flags_u64 symbols[] = \
{ symbol_array, { -1, NULL } }; \ { symbol_array, { -1, NULL } }; \
ftrace_print_symbols_seq_u64(p, value, symbols); \ trace_print_symbols_seq_u64(p, value, symbols); \
}) })
#else #else
#define __print_symbolic_u64(value, symbol_array...) \ #define __print_symbolic_u64(value, symbol_array...) \
...@@ -291,14 +291,14 @@ TRACE_MAKE_SYSTEM_STR(); ...@@ -291,14 +291,14 @@ TRACE_MAKE_SYSTEM_STR();
#endif #endif
#undef __print_hex #undef __print_hex
#define __print_hex(buf, buf_len) ftrace_print_hex_seq(p, buf, buf_len) #define __print_hex(buf, buf_len) trace_print_hex_seq(p, buf, buf_len)
#undef __print_array #undef __print_array
#define __print_array(array, count, el_size) \ #define __print_array(array, count, el_size) \
({ \ ({ \
BUILD_BUG_ON(el_size != 1 && el_size != 2 && \ BUILD_BUG_ON(el_size != 1 && el_size != 2 && \
el_size != 4 && el_size != 8); \ el_size != 4 && el_size != 8); \
ftrace_print_array_seq(p, array, count, el_size); \ trace_print_array_seq(p, array, count, el_size); \
}) })
#undef DECLARE_EVENT_CLASS #undef DECLARE_EVENT_CLASS
......
...@@ -60,9 +60,9 @@ enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter) ...@@ -60,9 +60,9 @@ enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter)
} }
const char * const char *
ftrace_print_flags_seq(struct trace_seq *p, const char *delim, trace_print_flags_seq(struct trace_seq *p, const char *delim,
unsigned long flags, unsigned long flags,
const struct trace_print_flags *flag_array) const struct trace_print_flags *flag_array)
{ {
unsigned long mask; unsigned long mask;
const char *str; const char *str;
...@@ -95,11 +95,11 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim, ...@@ -95,11 +95,11 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim,
return ret; return ret;
} }
EXPORT_SYMBOL(ftrace_print_flags_seq); EXPORT_SYMBOL(trace_print_flags_seq);
const char * const char *
ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, trace_print_symbols_seq(struct trace_seq *p, unsigned long val,
const struct trace_print_flags *symbol_array) const struct trace_print_flags *symbol_array)
{ {
int i; int i;
const char *ret = trace_seq_buffer_ptr(p); const char *ret = trace_seq_buffer_ptr(p);
...@@ -120,11 +120,11 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val, ...@@ -120,11 +120,11 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,
return ret; return ret;
} }
EXPORT_SYMBOL(ftrace_print_symbols_seq); EXPORT_SYMBOL(trace_print_symbols_seq);
#if BITS_PER_LONG == 32 #if BITS_PER_LONG == 32
const char * const char *
ftrace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val, trace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val,
const struct trace_print_flags_u64 *symbol_array) const struct trace_print_flags_u64 *symbol_array)
{ {
int i; int i;
...@@ -146,12 +146,12 @@ ftrace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val, ...@@ -146,12 +146,12 @@ ftrace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val,
return ret; return ret;
} }
EXPORT_SYMBOL(ftrace_print_symbols_seq_u64); EXPORT_SYMBOL(trace_print_symbols_seq_u64);
#endif #endif
const char * const char *
ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr, trace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr,
unsigned int bitmask_size) unsigned int bitmask_size)
{ {
const char *ret = trace_seq_buffer_ptr(p); const char *ret = trace_seq_buffer_ptr(p);
...@@ -160,10 +160,10 @@ ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr, ...@@ -160,10 +160,10 @@ ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr,
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(ftrace_print_bitmask_seq); EXPORT_SYMBOL_GPL(trace_print_bitmask_seq);
const char * const char *
ftrace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len) trace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len)
{ {
int i; int i;
const char *ret = trace_seq_buffer_ptr(p); const char *ret = trace_seq_buffer_ptr(p);
...@@ -175,11 +175,11 @@ ftrace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len) ...@@ -175,11 +175,11 @@ ftrace_print_hex_seq(struct trace_seq *p, const unsigned char *buf, int buf_len)
return ret; return ret;
} }
EXPORT_SYMBOL(ftrace_print_hex_seq); EXPORT_SYMBOL(trace_print_hex_seq);
const char * const char *
ftrace_print_array_seq(struct trace_seq *p, const void *buf, int count, trace_print_array_seq(struct trace_seq *p, const void *buf, int count,
size_t el_size) size_t el_size)
{ {
const char *ret = trace_seq_buffer_ptr(p); const char *ret = trace_seq_buffer_ptr(p);
const char *prefix = ""; const char *prefix = "";
...@@ -220,7 +220,7 @@ ftrace_print_array_seq(struct trace_seq *p, const void *buf, int count, ...@@ -220,7 +220,7 @@ ftrace_print_array_seq(struct trace_seq *p, const void *buf, int count,
return ret; return ret;
} }
EXPORT_SYMBOL(ftrace_print_array_seq); EXPORT_SYMBOL(trace_print_array_seq);
int ftrace_raw_output_prep(struct trace_iterator *iter, int ftrace_raw_output_prep(struct trace_iterator *iter,
struct trace_event *trace_event) struct trace_event *trace_event)
......
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