mirror of https://gitee.com/openkylin/linux.git
tracing: Rename ftrace_event_{call,class} to trace_event_{call,class}
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The structures ftrace_event_call and ftrace_event_class have nothing to do with the function hooks, and are really trace_event structures. Rename ftrace_event_* to trace_event_*. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
7f1d2f8210
commit
2425bcb924
|
@ -336,7 +336,7 @@ struct module {
|
|||
const char **trace_bprintk_fmt_start;
|
||||
#endif
|
||||
#ifdef CONFIG_EVENT_TRACING
|
||||
struct ftrace_event_call **trace_events;
|
||||
struct trace_event_call **trace_events;
|
||||
unsigned int num_trace_events;
|
||||
struct trace_enum_map **trace_enums;
|
||||
unsigned int num_trace_enums;
|
||||
|
|
|
@ -483,7 +483,7 @@ struct perf_event {
|
|||
void *overflow_handler_context;
|
||||
|
||||
#ifdef CONFIG_EVENT_TRACING
|
||||
struct ftrace_event_call *tp_event;
|
||||
struct trace_event_call *tp_event;
|
||||
struct event_filter *filter;
|
||||
#ifdef CONFIG_FUNCTION_TRACER
|
||||
struct ftrace_ops ftrace_ops;
|
||||
|
|
|
@ -111,14 +111,14 @@ union bpf_attr;
|
|||
#define __SC_STR_ADECL(t, a) #a
|
||||
#define __SC_STR_TDECL(t, a) #t
|
||||
|
||||
extern struct ftrace_event_class event_class_syscall_enter;
|
||||
extern struct ftrace_event_class event_class_syscall_exit;
|
||||
extern struct trace_event_class event_class_syscall_enter;
|
||||
extern struct trace_event_class event_class_syscall_exit;
|
||||
extern struct trace_event_functions enter_syscall_print_funcs;
|
||||
extern struct trace_event_functions exit_syscall_print_funcs;
|
||||
|
||||
#define SYSCALL_TRACE_ENTER_EVENT(sname) \
|
||||
static struct syscall_metadata __syscall_meta_##sname; \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
event_enter_##sname = { \
|
||||
.class = &event_class_syscall_enter, \
|
||||
{ \
|
||||
|
@ -128,13 +128,13 @@ extern struct trace_event_functions exit_syscall_print_funcs;
|
|||
.data = (void *)&__syscall_meta_##sname,\
|
||||
.flags = TRACE_EVENT_FL_CAP_ANY, \
|
||||
}; \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) \
|
||||
*__event_enter_##sname = &event_enter_##sname;
|
||||
|
||||
#define SYSCALL_TRACE_EXIT_EVENT(sname) \
|
||||
static struct syscall_metadata __syscall_meta_##sname; \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
event_exit_##sname = { \
|
||||
.class = &event_class_syscall_exit, \
|
||||
{ \
|
||||
|
@ -144,7 +144,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
|
|||
.data = (void *)&__syscall_meta_##sname,\
|
||||
.flags = TRACE_EVENT_FL_CAP_ANY, \
|
||||
}; \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) \
|
||||
*__event_exit_##sname = &event_exit_##sname;
|
||||
|
||||
|
|
|
@ -200,23 +200,23 @@ enum trace_reg {
|
|||
#endif
|
||||
};
|
||||
|
||||
struct ftrace_event_call;
|
||||
struct trace_event_call;
|
||||
|
||||
struct ftrace_event_class {
|
||||
struct trace_event_class {
|
||||
const char *system;
|
||||
void *probe;
|
||||
#ifdef CONFIG_PERF_EVENTS
|
||||
void *perf_probe;
|
||||
#endif
|
||||
int (*reg)(struct ftrace_event_call *event,
|
||||
int (*reg)(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data);
|
||||
int (*define_fields)(struct ftrace_event_call *);
|
||||
struct list_head *(*get_fields)(struct ftrace_event_call *);
|
||||
int (*define_fields)(struct trace_event_call *);
|
||||
struct list_head *(*get_fields)(struct trace_event_call *);
|
||||
struct list_head fields;
|
||||
int (*raw_init)(struct ftrace_event_call *);
|
||||
int (*raw_init)(struct trace_event_call *);
|
||||
};
|
||||
|
||||
extern int trace_event_reg(struct ftrace_event_call *event,
|
||||
extern int trace_event_reg(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data);
|
||||
|
||||
struct ftrace_event_buffer {
|
||||
|
@ -269,9 +269,9 @@ enum {
|
|||
TRACE_EVENT_FL_KPROBE = (1 << TRACE_EVENT_FL_KPROBE_BIT),
|
||||
};
|
||||
|
||||
struct ftrace_event_call {
|
||||
struct trace_event_call {
|
||||
struct list_head list;
|
||||
struct ftrace_event_class *class;
|
||||
struct trace_event_class *class;
|
||||
union {
|
||||
char *name;
|
||||
/* Set TRACE_EVENT_FL_TRACEPOINT flag when using "tp" */
|
||||
|
@ -298,13 +298,13 @@ struct ftrace_event_call {
|
|||
struct hlist_head __percpu *perf_events;
|
||||
struct bpf_prog *prog;
|
||||
|
||||
int (*perf_perm)(struct ftrace_event_call *,
|
||||
int (*perf_perm)(struct trace_event_call *,
|
||||
struct perf_event *);
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline const char *
|
||||
ftrace_event_name(struct ftrace_event_call *call)
|
||||
ftrace_event_name(struct trace_event_call *call)
|
||||
{
|
||||
if (call->flags & TRACE_EVENT_FL_TRACEPOINT)
|
||||
return call->tp ? call->tp->name : NULL;
|
||||
|
@ -351,7 +351,7 @@ enum {
|
|||
|
||||
struct trace_event_file {
|
||||
struct list_head list;
|
||||
struct ftrace_event_call *event_call;
|
||||
struct trace_event_call *event_call;
|
||||
struct event_filter *filter;
|
||||
struct dentry *dir;
|
||||
struct trace_array *tr;
|
||||
|
@ -388,7 +388,7 @@ struct trace_event_file {
|
|||
early_initcall(trace_init_flags_##name);
|
||||
|
||||
#define __TRACE_EVENT_PERF_PERM(name, expr...) \
|
||||
static int perf_perm_##name(struct ftrace_event_call *tp_event, \
|
||||
static int perf_perm_##name(struct trace_event_call *tp_event, \
|
||||
struct perf_event *p_event) \
|
||||
{ \
|
||||
return ({ expr; }); \
|
||||
|
@ -417,7 +417,7 @@ extern int filter_match_preds(struct event_filter *filter, void *rec);
|
|||
extern int filter_check_discard(struct trace_event_file *file, void *rec,
|
||||
struct ring_buffer *buffer,
|
||||
struct ring_buffer_event *event);
|
||||
extern int call_filter_check_discard(struct ftrace_event_call *call, void *rec,
|
||||
extern int call_filter_check_discard(struct trace_event_call *call, void *rec,
|
||||
struct ring_buffer *buffer,
|
||||
struct ring_buffer_event *event);
|
||||
extern enum event_trigger_type event_triggers_call(struct trace_event_file *file,
|
||||
|
@ -559,12 +559,12 @@ enum {
|
|||
FILTER_TRACE_FN,
|
||||
};
|
||||
|
||||
extern int trace_event_raw_init(struct ftrace_event_call *call);
|
||||
extern int trace_define_field(struct ftrace_event_call *call, const char *type,
|
||||
extern int trace_event_raw_init(struct trace_event_call *call);
|
||||
extern int trace_define_field(struct trace_event_call *call, const char *type,
|
||||
const char *name, int offset, int size,
|
||||
int is_signed, int filter_type);
|
||||
extern int trace_add_event_call(struct ftrace_event_call *call);
|
||||
extern int trace_remove_event_call(struct ftrace_event_call *call);
|
||||
extern int trace_add_event_call(struct trace_event_call *call);
|
||||
extern int trace_remove_event_call(struct trace_event_call *call);
|
||||
|
||||
#define is_signed_type(type) (((type)(-1)) < (type)1)
|
||||
|
||||
|
@ -613,4 +613,4 @@ perf_trace_buf_submit(void *raw_data, int size, int rctx, u64 addr,
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_FTRACE_EVENT_H */
|
||||
#endif /* _LINUX_TRACE_EVENT_H */
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
*
|
||||
* For those macros defined with TRACE_EVENT:
|
||||
*
|
||||
* static struct ftrace_event_call event_<call>;
|
||||
* static struct trace_event_call event_<call>;
|
||||
*
|
||||
* static void ftrace_raw_event_<call>(void *__data, proto)
|
||||
* {
|
||||
* struct trace_event_file *trace_file = __data;
|
||||
* struct ftrace_event_call *event_call = trace_file->event_call;
|
||||
* struct trace_event_call *event_call = trace_file->event_call;
|
||||
* struct ftrace_data_offsets_<call> __maybe_unused __data_offsets;
|
||||
* unsigned long eflags = trace_file->flags;
|
||||
* enum event_trigger_type __tt = ETT_NONE;
|
||||
|
@ -63,7 +63,7 @@
|
|||
*
|
||||
* static char print_fmt_<call>[] = <TP_printk>;
|
||||
*
|
||||
* static struct ftrace_event_class __used event_class_<template> = {
|
||||
* static struct trace_event_class __used event_class_<template> = {
|
||||
* .system = "<system>",
|
||||
* .define_fields = ftrace_define_fields_<call>,
|
||||
* .fields = LIST_HEAD_INIT(event_class_##call.fields),
|
||||
|
@ -72,7 +72,7 @@
|
|||
* .reg = trace_event_reg,
|
||||
* };
|
||||
*
|
||||
* static struct ftrace_event_call event_<call> = {
|
||||
* static struct trace_event_call event_<call> = {
|
||||
* .class = event_class_<template>,
|
||||
* {
|
||||
* .tp = &__tracepoint_<call>,
|
||||
|
@ -83,7 +83,7 @@
|
|||
* };
|
||||
* // its only safe to use pointers when doing linker tricks to
|
||||
* // create an array.
|
||||
* static struct ftrace_event_call __used
|
||||
* static struct trace_event_call __used
|
||||
* __attribute__((section("_ftrace_events"))) *__event_<call> = &event_<call>;
|
||||
*
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ static inline void ftrace_test_probe_##call(void) \
|
|||
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
|
||||
_TRACE_PERF_PROTO(call, PARAMS(proto)); \
|
||||
static char print_fmt_##call[] = print; \
|
||||
static struct ftrace_event_class __used __refdata event_class_##call = { \
|
||||
static struct trace_event_class __used __refdata event_class_##call = { \
|
||||
.system = TRACE_SYSTEM_STRING, \
|
||||
.define_fields = ftrace_define_fields_##call, \
|
||||
.fields = LIST_HEAD_INIT(event_class_##call.fields),\
|
||||
|
@ -226,7 +226,7 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \
|
|||
#undef DEFINE_EVENT
|
||||
#define DEFINE_EVENT(template, call, proto, args) \
|
||||
\
|
||||
static struct ftrace_event_call __used event_##call = { \
|
||||
static struct trace_event_call __used event_##call = { \
|
||||
.class = &event_class_##template, \
|
||||
{ \
|
||||
.tp = &__tracepoint_##call, \
|
||||
|
@ -235,7 +235,7 @@ static struct ftrace_event_call __used event_##call = { \
|
|||
.print_fmt = print_fmt_##template, \
|
||||
.flags = TRACE_EVENT_FL_TRACEPOINT, \
|
||||
}; \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
|
||||
|
||||
#undef DEFINE_EVENT_PRINT
|
||||
|
@ -243,7 +243,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
|
|||
\
|
||||
static char print_fmt_##call[] = print; \
|
||||
\
|
||||
static struct ftrace_event_call __used event_##call = { \
|
||||
static struct trace_event_call __used event_##call = { \
|
||||
.class = &event_class_##template, \
|
||||
{ \
|
||||
.tp = &__tracepoint_##call, \
|
||||
|
@ -252,7 +252,7 @@ static struct ftrace_event_call __used event_##call = { \
|
|||
.print_fmt = print_fmt_##call, \
|
||||
.flags = TRACE_EVENT_FL_TRACEPOINT, \
|
||||
}; \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
|
||||
|
||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||
|
@ -292,7 +292,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
|
|||
static notrace void \
|
||||
perf_trace_##call(void *__data, proto) \
|
||||
{ \
|
||||
struct ftrace_event_call *event_call = __data; \
|
||||
struct trace_event_call *event_call = __data; \
|
||||
struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
|
||||
struct ftrace_raw_##call *entry; \
|
||||
struct pt_regs *__regs; \
|
||||
|
|
|
@ -29,8 +29,8 @@ struct syscall_metadata {
|
|||
const char **args;
|
||||
struct list_head enter_fields;
|
||||
|
||||
struct ftrace_event_call *enter_event;
|
||||
struct ftrace_event_call *exit_event;
|
||||
struct trace_event_call *enter_event;
|
||||
struct trace_event_call *exit_event;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
|
||||
|
|
|
@ -101,11 +101,11 @@ TRACE_MAKE_SYSTEM_STR();
|
|||
char __data[0]; \
|
||||
}; \
|
||||
\
|
||||
static struct ftrace_event_class event_class_##name;
|
||||
static struct trace_event_class event_class_##name;
|
||||
|
||||
#undef DEFINE_EVENT
|
||||
#define DEFINE_EVENT(template, name, proto, args) \
|
||||
static struct ftrace_event_call __used \
|
||||
static struct trace_event_call __used \
|
||||
__attribute__((__aligned__(4))) event_##name
|
||||
|
||||
#undef DEFINE_EVENT_FN
|
||||
|
@ -407,7 +407,7 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \
|
|||
#undef DECLARE_EVENT_CLASS
|
||||
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \
|
||||
static int notrace __init \
|
||||
ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
|
||||
ftrace_define_fields_##call(struct trace_event_call *event_call) \
|
||||
{ \
|
||||
struct ftrace_raw_##call field; \
|
||||
int ret; \
|
||||
|
|
|
@ -311,7 +311,7 @@ int filter_check_discard(struct trace_event_file *file, void *rec,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(filter_check_discard);
|
||||
|
||||
int call_filter_check_discard(struct ftrace_event_call *call, void *rec,
|
||||
int call_filter_check_discard(struct trace_event_call *call, void *rec,
|
||||
struct ring_buffer *buffer,
|
||||
struct ring_buffer_event *event)
|
||||
{
|
||||
|
@ -1761,7 +1761,7 @@ trace_function(struct trace_array *tr,
|
|||
unsigned long ip, unsigned long parent_ip, unsigned long flags,
|
||||
int pc)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_function;
|
||||
struct trace_event_call *call = &event_function;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
struct ring_buffer_event *event;
|
||||
struct ftrace_entry *entry;
|
||||
|
@ -1796,7 +1796,7 @@ static void __ftrace_trace_stack(struct ring_buffer *buffer,
|
|||
unsigned long flags,
|
||||
int skip, int pc, struct pt_regs *regs)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_kernel_stack;
|
||||
struct trace_event_call *call = &event_kernel_stack;
|
||||
struct ring_buffer_event *event;
|
||||
struct stack_entry *entry;
|
||||
struct stack_trace trace;
|
||||
|
@ -1924,7 +1924,7 @@ static DEFINE_PER_CPU(int, user_stack_count);
|
|||
void
|
||||
ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_user_stack;
|
||||
struct trace_event_call *call = &event_user_stack;
|
||||
struct ring_buffer_event *event;
|
||||
struct userstack_entry *entry;
|
||||
struct stack_trace trace;
|
||||
|
@ -2130,7 +2130,7 @@ static void trace_printk_start_stop_comm(int enabled)
|
|||
*/
|
||||
int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_bprint;
|
||||
struct trace_event_call *call = &event_bprint;
|
||||
struct ring_buffer_event *event;
|
||||
struct ring_buffer *buffer;
|
||||
struct trace_array *tr = &global_trace;
|
||||
|
@ -2188,7 +2188,7 @@ static int
|
|||
__trace_array_vprintk(struct ring_buffer *buffer,
|
||||
unsigned long ip, const char *fmt, va_list args)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_print;
|
||||
struct trace_event_call *call = &event_print;
|
||||
struct ring_buffer_event *event;
|
||||
int len = 0, size, pc;
|
||||
struct print_entry *entry;
|
||||
|
|
|
@ -858,7 +858,7 @@ void ftrace_destroy_filter_files(struct ftrace_ops *ops);
|
|||
#define ftrace_destroy_filter_files(ops) do { } while (0)
|
||||
#endif /* CONFIG_FUNCTION_TRACER && CONFIG_DYNAMIC_FTRACE */
|
||||
|
||||
int ftrace_event_is_function(struct ftrace_event_call *call);
|
||||
int ftrace_event_is_function(struct trace_event_call *call);
|
||||
|
||||
/*
|
||||
* struct trace_parser - servers for reading the user input separated by spaces
|
||||
|
@ -1061,13 +1061,13 @@ extern int apply_subsystem_event_filter(struct ftrace_subsystem_dir *dir,
|
|||
extern void print_subsystem_event_filter(struct event_subsystem *system,
|
||||
struct trace_seq *s);
|
||||
extern int filter_assign_type(const char *type);
|
||||
extern int create_event_filter(struct ftrace_event_call *call,
|
||||
extern int create_event_filter(struct trace_event_call *call,
|
||||
char *filter_str, bool set_str,
|
||||
struct event_filter **filterp);
|
||||
extern void free_event_filter(struct event_filter *filter);
|
||||
|
||||
struct ftrace_event_field *
|
||||
trace_find_event_field(struct ftrace_event_call *call, char *name);
|
||||
trace_find_event_field(struct trace_event_call *call, char *name);
|
||||
|
||||
extern void trace_event_enable_cmd_record(bool enable);
|
||||
extern int event_trace_add_tracer(struct dentry *parent, struct trace_array *tr);
|
||||
|
@ -1286,7 +1286,7 @@ int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled);
|
|||
|
||||
#undef FTRACE_ENTRY
|
||||
#define FTRACE_ENTRY(call, struct_name, id, tstruct, print, filter) \
|
||||
extern struct ftrace_event_call \
|
||||
extern struct trace_event_call \
|
||||
__aligned(4) event_##call;
|
||||
#undef FTRACE_ENTRY_DUP
|
||||
#define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print, filter) \
|
||||
|
@ -1295,7 +1295,7 @@ int set_tracer_flag(struct trace_array *tr, unsigned int mask, int enabled);
|
|||
#include "trace_entries.h"
|
||||
|
||||
#if defined(CONFIG_PERF_EVENTS) && defined(CONFIG_FUNCTION_TRACER)
|
||||
int perf_ftrace_event_register(struct ftrace_event_call *call,
|
||||
int perf_ftrace_event_register(struct trace_event_call *call,
|
||||
enum trace_reg type, void *data);
|
||||
#else
|
||||
#define perf_ftrace_event_register NULL
|
||||
|
|
|
@ -29,7 +29,7 @@ static struct trace_array *branch_tracer;
|
|||
static void
|
||||
probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_branch;
|
||||
struct trace_event_call *call = &event_branch;
|
||||
struct trace_array *tr = branch_tracer;
|
||||
struct trace_array_cpu *data;
|
||||
struct ring_buffer_event *event;
|
||||
|
|
|
@ -21,7 +21,7 @@ typedef typeof(unsigned long [PERF_MAX_TRACE_SIZE / sizeof(unsigned long)])
|
|||
/* Count the events in use (per event id, not per instance) */
|
||||
static int total_ref_count;
|
||||
|
||||
static int perf_trace_event_perm(struct ftrace_event_call *tp_event,
|
||||
static int perf_trace_event_perm(struct trace_event_call *tp_event,
|
||||
struct perf_event *p_event)
|
||||
{
|
||||
if (tp_event->perf_perm) {
|
||||
|
@ -83,7 +83,7 @@ static int perf_trace_event_perm(struct ftrace_event_call *tp_event,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int perf_trace_event_reg(struct ftrace_event_call *tp_event,
|
||||
static int perf_trace_event_reg(struct trace_event_call *tp_event,
|
||||
struct perf_event *p_event)
|
||||
{
|
||||
struct hlist_head __percpu *list;
|
||||
|
@ -143,7 +143,7 @@ static int perf_trace_event_reg(struct ftrace_event_call *tp_event,
|
|||
|
||||
static void perf_trace_event_unreg(struct perf_event *p_event)
|
||||
{
|
||||
struct ftrace_event_call *tp_event = p_event->tp_event;
|
||||
struct trace_event_call *tp_event = p_event->tp_event;
|
||||
int i;
|
||||
|
||||
if (--tp_event->perf_refcount > 0)
|
||||
|
@ -172,17 +172,17 @@ static void perf_trace_event_unreg(struct perf_event *p_event)
|
|||
|
||||
static int perf_trace_event_open(struct perf_event *p_event)
|
||||
{
|
||||
struct ftrace_event_call *tp_event = p_event->tp_event;
|
||||
struct trace_event_call *tp_event = p_event->tp_event;
|
||||
return tp_event->class->reg(tp_event, TRACE_REG_PERF_OPEN, p_event);
|
||||
}
|
||||
|
||||
static void perf_trace_event_close(struct perf_event *p_event)
|
||||
{
|
||||
struct ftrace_event_call *tp_event = p_event->tp_event;
|
||||
struct trace_event_call *tp_event = p_event->tp_event;
|
||||
tp_event->class->reg(tp_event, TRACE_REG_PERF_CLOSE, p_event);
|
||||
}
|
||||
|
||||
static int perf_trace_event_init(struct ftrace_event_call *tp_event,
|
||||
static int perf_trace_event_init(struct trace_event_call *tp_event,
|
||||
struct perf_event *p_event)
|
||||
{
|
||||
int ret;
|
||||
|
@ -206,7 +206,7 @@ static int perf_trace_event_init(struct ftrace_event_call *tp_event,
|
|||
|
||||
int perf_trace_init(struct perf_event *p_event)
|
||||
{
|
||||
struct ftrace_event_call *tp_event;
|
||||
struct trace_event_call *tp_event;
|
||||
u64 event_id = p_event->attr.config;
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -236,7 +236,7 @@ void perf_trace_destroy(struct perf_event *p_event)
|
|||
|
||||
int perf_trace_add(struct perf_event *p_event, int flags)
|
||||
{
|
||||
struct ftrace_event_call *tp_event = p_event->tp_event;
|
||||
struct trace_event_call *tp_event = p_event->tp_event;
|
||||
struct hlist_head __percpu *pcpu_list;
|
||||
struct hlist_head *list;
|
||||
|
||||
|
@ -255,7 +255,7 @@ int perf_trace_add(struct perf_event *p_event, int flags)
|
|||
|
||||
void perf_trace_del(struct perf_event *p_event, int flags)
|
||||
{
|
||||
struct ftrace_event_call *tp_event = p_event->tp_event;
|
||||
struct trace_event_call *tp_event = p_event->tp_event;
|
||||
hlist_del_rcu(&p_event->hlist_entry);
|
||||
tp_event->class->reg(tp_event, TRACE_REG_PERF_DEL, p_event);
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ static void perf_ftrace_function_disable(struct perf_event *event)
|
|||
ftrace_function_local_disable(&event->ftrace_ops);
|
||||
}
|
||||
|
||||
int perf_ftrace_event_register(struct ftrace_event_call *call,
|
||||
int perf_ftrace_event_register(struct trace_event_call *call,
|
||||
enum trace_reg type, void *data)
|
||||
{
|
||||
switch (type) {
|
||||
|
|
|
@ -68,7 +68,7 @@ static int system_refcount_dec(struct event_subsystem *system)
|
|||
}
|
||||
|
||||
static struct list_head *
|
||||
trace_get_fields(struct ftrace_event_call *event_call)
|
||||
trace_get_fields(struct trace_event_call *event_call)
|
||||
{
|
||||
if (!event_call->class->get_fields)
|
||||
return &event_call->class->fields;
|
||||
|
@ -89,7 +89,7 @@ __find_event_field(struct list_head *head, char *name)
|
|||
}
|
||||
|
||||
struct ftrace_event_field *
|
||||
trace_find_event_field(struct ftrace_event_call *call, char *name)
|
||||
trace_find_event_field(struct trace_event_call *call, char *name)
|
||||
{
|
||||
struct ftrace_event_field *field;
|
||||
struct list_head *head;
|
||||
|
@ -129,7 +129,7 @@ static int __trace_define_field(struct list_head *head, const char *type,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int trace_define_field(struct ftrace_event_call *call, const char *type,
|
||||
int trace_define_field(struct trace_event_call *call, const char *type,
|
||||
const char *name, int offset, int size, int is_signed,
|
||||
int filter_type)
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ static int trace_define_common_fields(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void trace_destroy_fields(struct ftrace_event_call *call)
|
||||
static void trace_destroy_fields(struct trace_event_call *call)
|
||||
{
|
||||
struct ftrace_event_field *field, *next;
|
||||
struct list_head *head;
|
||||
|
@ -178,7 +178,7 @@ static void trace_destroy_fields(struct ftrace_event_call *call)
|
|||
}
|
||||
}
|
||||
|
||||
int trace_event_raw_init(struct ftrace_event_call *call)
|
||||
int trace_event_raw_init(struct trace_event_call *call)
|
||||
{
|
||||
int id;
|
||||
|
||||
|
@ -194,7 +194,7 @@ void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer,
|
|||
struct trace_event_file *trace_file,
|
||||
unsigned long len)
|
||||
{
|
||||
struct ftrace_event_call *event_call = trace_file->event_call;
|
||||
struct trace_event_call *event_call = trace_file->event_call;
|
||||
|
||||
local_save_flags(fbuffer->flags);
|
||||
fbuffer->pc = preempt_count();
|
||||
|
@ -216,7 +216,7 @@ static DEFINE_SPINLOCK(tracepoint_iter_lock);
|
|||
|
||||
static void output_printk(struct ftrace_event_buffer *fbuffer)
|
||||
{
|
||||
struct ftrace_event_call *event_call;
|
||||
struct trace_event_call *event_call;
|
||||
struct trace_event *event;
|
||||
unsigned long flags;
|
||||
struct trace_iterator *iter = tracepoint_print_iter;
|
||||
|
@ -252,7 +252,7 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(ftrace_event_buffer_commit);
|
||||
|
||||
int trace_event_reg(struct ftrace_event_call *call,
|
||||
int trace_event_reg(struct trace_event_call *call,
|
||||
enum trace_reg type, void *data)
|
||||
{
|
||||
struct trace_event_file *file = data;
|
||||
|
@ -315,7 +315,7 @@ void trace_event_enable_cmd_record(bool enable)
|
|||
static int __ftrace_event_enable_disable(struct trace_event_file *file,
|
||||
int enable, int soft_disable)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
int ret = 0;
|
||||
int disable;
|
||||
|
||||
|
@ -516,7 +516,7 @@ __ftrace_set_clr_event_nolock(struct trace_array *tr, const char *match,
|
|||
const char *sub, const char *event, int set)
|
||||
{
|
||||
struct trace_event_file *file;
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
const char *name;
|
||||
int ret = -EINVAL;
|
||||
|
||||
|
@ -672,7 +672,7 @@ static void *
|
|||
t_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
{
|
||||
struct trace_event_file *file = v;
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
struct trace_array *tr = m->private;
|
||||
|
||||
(*pos)++;
|
||||
|
@ -743,7 +743,7 @@ static void *s_start(struct seq_file *m, loff_t *pos)
|
|||
static int t_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct trace_event_file *file = v;
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
|
||||
seq_printf(m, "%s:", call->class->system);
|
||||
|
@ -830,7 +830,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
|
|||
const char set_to_char[4] = { '?', '0', '1', 'X' };
|
||||
struct ftrace_subsystem_dir *dir = filp->private_data;
|
||||
struct event_subsystem *system = dir->subsystem;
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
struct trace_event_file *file;
|
||||
struct trace_array *tr = dir->tr;
|
||||
char buf[2];
|
||||
|
@ -917,7 +917,7 @@ enum {
|
|||
|
||||
static void *f_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
{
|
||||
struct ftrace_event_call *call = event_file_data(m->private);
|
||||
struct trace_event_call *call = event_file_data(m->private);
|
||||
struct list_head *common_head = &ftrace_common_fields;
|
||||
struct list_head *head = trace_get_fields(call);
|
||||
struct list_head *node = v;
|
||||
|
@ -949,7 +949,7 @@ static void *f_next(struct seq_file *m, void *v, loff_t *pos)
|
|||
|
||||
static int f_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct ftrace_event_call *call = event_file_data(m->private);
|
||||
struct trace_event_call *call = event_file_data(m->private);
|
||||
struct ftrace_event_field *field;
|
||||
const char *array_descriptor;
|
||||
|
||||
|
@ -1573,7 +1573,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
|
|||
static int
|
||||
event_create_dir(struct dentry *parent, struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
struct trace_array *tr = file->tr;
|
||||
struct list_head *head;
|
||||
struct dentry *d_events;
|
||||
|
@ -1634,7 +1634,7 @@ event_create_dir(struct dentry *parent, struct trace_event_file *file)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void remove_event_from_tracers(struct ftrace_event_call *call)
|
||||
static void remove_event_from_tracers(struct trace_event_call *call)
|
||||
{
|
||||
struct trace_event_file *file;
|
||||
struct trace_array *tr;
|
||||
|
@ -1654,7 +1654,7 @@ static void remove_event_from_tracers(struct ftrace_event_call *call)
|
|||
} while_for_each_event_file();
|
||||
}
|
||||
|
||||
static void event_remove(struct ftrace_event_call *call)
|
||||
static void event_remove(struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr;
|
||||
struct trace_event_file *file;
|
||||
|
@ -1678,7 +1678,7 @@ static void event_remove(struct ftrace_event_call *call)
|
|||
list_del(&call->list);
|
||||
}
|
||||
|
||||
static int event_init(struct ftrace_event_call *call)
|
||||
static int event_init(struct trace_event_call *call)
|
||||
{
|
||||
int ret = 0;
|
||||
const char *name;
|
||||
|
@ -1697,7 +1697,7 @@ static int event_init(struct ftrace_event_call *call)
|
|||
}
|
||||
|
||||
static int
|
||||
__register_event(struct ftrace_event_call *call, struct module *mod)
|
||||
__register_event(struct trace_event_call *call, struct module *mod)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -1733,7 +1733,7 @@ static char *enum_replace(char *ptr, struct trace_enum_map *map, int len)
|
|||
return ptr + elen;
|
||||
}
|
||||
|
||||
static void update_event_printk(struct ftrace_event_call *call,
|
||||
static void update_event_printk(struct trace_event_call *call,
|
||||
struct trace_enum_map *map)
|
||||
{
|
||||
char *ptr;
|
||||
|
@ -1811,7 +1811,7 @@ static void update_event_printk(struct ftrace_event_call *call,
|
|||
|
||||
void trace_event_enum_update(struct trace_enum_map **map, int len)
|
||||
{
|
||||
struct ftrace_event_call *call, *p;
|
||||
struct trace_event_call *call, *p;
|
||||
const char *last_system = NULL;
|
||||
int last_i;
|
||||
int i;
|
||||
|
@ -1837,7 +1837,7 @@ void trace_event_enum_update(struct trace_enum_map **map, int len)
|
|||
}
|
||||
|
||||
static struct trace_event_file *
|
||||
trace_create_new_event(struct ftrace_event_call *call,
|
||||
trace_create_new_event(struct trace_event_call *call,
|
||||
struct trace_array *tr)
|
||||
{
|
||||
struct trace_event_file *file;
|
||||
|
@ -1858,7 +1858,7 @@ trace_create_new_event(struct ftrace_event_call *call,
|
|||
|
||||
/* Add an event to a trace directory */
|
||||
static int
|
||||
__trace_add_new_event(struct ftrace_event_call *call, struct trace_array *tr)
|
||||
__trace_add_new_event(struct trace_event_call *call, struct trace_array *tr)
|
||||
{
|
||||
struct trace_event_file *file;
|
||||
|
||||
|
@ -1875,7 +1875,7 @@ __trace_add_new_event(struct ftrace_event_call *call, struct trace_array *tr)
|
|||
* the filesystem is initialized.
|
||||
*/
|
||||
static __init int
|
||||
__trace_early_add_new_event(struct ftrace_event_call *call,
|
||||
__trace_early_add_new_event(struct trace_event_call *call,
|
||||
struct trace_array *tr)
|
||||
{
|
||||
struct trace_event_file *file;
|
||||
|
@ -1888,10 +1888,10 @@ __trace_early_add_new_event(struct ftrace_event_call *call,
|
|||
}
|
||||
|
||||
struct ftrace_module_file_ops;
|
||||
static void __add_event_to_tracers(struct ftrace_event_call *call);
|
||||
static void __add_event_to_tracers(struct trace_event_call *call);
|
||||
|
||||
/* Add an additional event_call dynamically */
|
||||
int trace_add_event_call(struct ftrace_event_call *call)
|
||||
int trace_add_event_call(struct trace_event_call *call)
|
||||
{
|
||||
int ret;
|
||||
mutex_lock(&trace_types_lock);
|
||||
|
@ -1910,7 +1910,7 @@ int trace_add_event_call(struct ftrace_event_call *call)
|
|||
* Must be called under locking of trace_types_lock, event_mutex and
|
||||
* trace_event_sem.
|
||||
*/
|
||||
static void __trace_remove_event_call(struct ftrace_event_call *call)
|
||||
static void __trace_remove_event_call(struct trace_event_call *call)
|
||||
{
|
||||
event_remove(call);
|
||||
trace_destroy_fields(call);
|
||||
|
@ -1918,7 +1918,7 @@ static void __trace_remove_event_call(struct ftrace_event_call *call)
|
|||
call->filter = NULL;
|
||||
}
|
||||
|
||||
static int probe_remove_event_call(struct ftrace_event_call *call)
|
||||
static int probe_remove_event_call(struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr;
|
||||
struct trace_event_file *file;
|
||||
|
@ -1952,7 +1952,7 @@ static int probe_remove_event_call(struct ftrace_event_call *call)
|
|||
}
|
||||
|
||||
/* Remove an event_call */
|
||||
int trace_remove_event_call(struct ftrace_event_call *call)
|
||||
int trace_remove_event_call(struct trace_event_call *call)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -1976,7 +1976,7 @@ int trace_remove_event_call(struct ftrace_event_call *call)
|
|||
|
||||
static void trace_module_add_events(struct module *mod)
|
||||
{
|
||||
struct ftrace_event_call **call, **start, **end;
|
||||
struct trace_event_call **call, **start, **end;
|
||||
|
||||
if (!mod->num_trace_events)
|
||||
return;
|
||||
|
@ -1999,7 +1999,7 @@ static void trace_module_add_events(struct module *mod)
|
|||
|
||||
static void trace_module_remove_events(struct module *mod)
|
||||
{
|
||||
struct ftrace_event_call *call, *p;
|
||||
struct trace_event_call *call, *p;
|
||||
bool clear_trace = false;
|
||||
|
||||
down_write(&trace_event_sem);
|
||||
|
@ -2055,7 +2055,7 @@ static struct notifier_block trace_module_nb = {
|
|||
static void
|
||||
__trace_add_event_dirs(struct trace_array *tr)
|
||||
{
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
int ret;
|
||||
|
||||
list_for_each_entry(call, &ftrace_events, list) {
|
||||
|
@ -2070,7 +2070,7 @@ struct trace_event_file *
|
|||
find_event_file(struct trace_array *tr, const char *system, const char *event)
|
||||
{
|
||||
struct trace_event_file *file;
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
const char *name;
|
||||
|
||||
list_for_each_entry(file, &tr->events, list) {
|
||||
|
@ -2388,7 +2388,7 @@ __trace_early_add_event_dirs(struct trace_array *tr)
|
|||
static __init void
|
||||
__trace_early_add_events(struct trace_array *tr)
|
||||
{
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
int ret;
|
||||
|
||||
list_for_each_entry(call, &ftrace_events, list) {
|
||||
|
@ -2413,7 +2413,7 @@ __trace_remove_event_dirs(struct trace_array *tr)
|
|||
remove_event_file_dir(file);
|
||||
}
|
||||
|
||||
static void __add_event_to_tracers(struct ftrace_event_call *call)
|
||||
static void __add_event_to_tracers(struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr;
|
||||
|
||||
|
@ -2421,8 +2421,8 @@ static void __add_event_to_tracers(struct ftrace_event_call *call)
|
|||
__trace_add_new_event(call, tr);
|
||||
}
|
||||
|
||||
extern struct ftrace_event_call *__start_ftrace_events[];
|
||||
extern struct ftrace_event_call *__stop_ftrace_events[];
|
||||
extern struct trace_event_call *__start_ftrace_events[];
|
||||
extern struct trace_event_call *__stop_ftrace_events[];
|
||||
|
||||
static char bootup_event_buf[COMMAND_LINE_SIZE] __initdata;
|
||||
|
||||
|
@ -2593,7 +2593,7 @@ early_enable_events(struct trace_array *tr, bool disable_first)
|
|||
static __init int event_trace_enable(void)
|
||||
{
|
||||
struct trace_array *tr = top_trace_array();
|
||||
struct ftrace_event_call **iter, *call;
|
||||
struct trace_event_call **iter, *call;
|
||||
int ret;
|
||||
|
||||
if (!tr)
|
||||
|
@ -2756,7 +2756,7 @@ static __init void event_trace_self_tests(void)
|
|||
{
|
||||
struct ftrace_subsystem_dir *dir;
|
||||
struct trace_event_file *file;
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
struct event_subsystem *system;
|
||||
struct trace_array *tr;
|
||||
int ret;
|
||||
|
|
|
@ -782,7 +782,7 @@ static void __free_preds(struct event_filter *filter)
|
|||
|
||||
static void filter_disable(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
call->flags &= ~TRACE_EVENT_FL_FILTERED;
|
||||
|
@ -839,7 +839,7 @@ static int __alloc_preds(struct event_filter *filter, int n_preds)
|
|||
|
||||
static inline void __remove_filter(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
filter_disable(file);
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
|
@ -862,7 +862,7 @@ static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir,
|
|||
|
||||
static inline void __free_subsystem_filter(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) {
|
||||
__free_filter(call->filter);
|
||||
|
@ -1336,7 +1336,7 @@ static int filter_parse(struct filter_parse_state *ps)
|
|||
}
|
||||
|
||||
static struct filter_pred *create_pred(struct filter_parse_state *ps,
|
||||
struct ftrace_event_call *call,
|
||||
struct trace_event_call *call,
|
||||
int op, char *operand1, char *operand2)
|
||||
{
|
||||
struct ftrace_event_field *field;
|
||||
|
@ -1549,7 +1549,7 @@ static int fold_pred_tree(struct event_filter *filter,
|
|||
filter->preds);
|
||||
}
|
||||
|
||||
static int replace_preds(struct ftrace_event_call *call,
|
||||
static int replace_preds(struct trace_event_call *call,
|
||||
struct event_filter *filter,
|
||||
struct filter_parse_state *ps,
|
||||
bool dry_run)
|
||||
|
@ -1664,7 +1664,7 @@ static int replace_preds(struct ftrace_event_call *call,
|
|||
|
||||
static inline void event_set_filtered_flag(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
call->flags |= TRACE_EVENT_FL_FILTERED;
|
||||
|
@ -1675,7 +1675,7 @@ static inline void event_set_filtered_flag(struct trace_event_file *file)
|
|||
static inline void event_set_filter(struct trace_event_file *file,
|
||||
struct event_filter *filter)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
rcu_assign_pointer(call->filter, filter);
|
||||
|
@ -1685,7 +1685,7 @@ static inline void event_set_filter(struct trace_event_file *file,
|
|||
|
||||
static inline void event_clear_filter(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
RCU_INIT_POINTER(call->filter, NULL);
|
||||
|
@ -1696,7 +1696,7 @@ static inline void event_clear_filter(struct trace_event_file *file)
|
|||
static inline void
|
||||
event_set_no_set_filter_flag(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
call->flags |= TRACE_EVENT_FL_NO_SET_FILTER;
|
||||
|
@ -1707,7 +1707,7 @@ event_set_no_set_filter_flag(struct trace_event_file *file)
|
|||
static inline void
|
||||
event_clear_no_set_filter_flag(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||
call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER;
|
||||
|
@ -1718,7 +1718,7 @@ event_clear_no_set_filter_flag(struct trace_event_file *file)
|
|||
static inline bool
|
||||
event_no_set_filter_flag(struct trace_event_file *file)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
|
||||
if (file->flags & FTRACE_EVENT_FL_NO_SET_FILTER)
|
||||
return true;
|
||||
|
@ -1884,8 +1884,8 @@ static void create_filter_finish(struct filter_parse_state *ps)
|
|||
}
|
||||
|
||||
/**
|
||||
* create_filter - create a filter for a ftrace_event_call
|
||||
* @call: ftrace_event_call to create a filter for
|
||||
* create_filter - create a filter for a trace_event_call
|
||||
* @call: trace_event_call to create a filter for
|
||||
* @filter_str: filter string
|
||||
* @set_str: remember @filter_str and enable detailed error in filter
|
||||
* @filterp: out param for created filter (always updated on return)
|
||||
|
@ -1899,7 +1899,7 @@ static void create_filter_finish(struct filter_parse_state *ps)
|
|||
* information if @set_str is %true and the caller is responsible for
|
||||
* freeing it.
|
||||
*/
|
||||
static int create_filter(struct ftrace_event_call *call,
|
||||
static int create_filter(struct trace_event_call *call,
|
||||
char *filter_str, bool set_str,
|
||||
struct event_filter **filterp)
|
||||
{
|
||||
|
@ -1919,7 +1919,7 @@ static int create_filter(struct ftrace_event_call *call,
|
|||
return err;
|
||||
}
|
||||
|
||||
int create_event_filter(struct ftrace_event_call *call,
|
||||
int create_event_filter(struct trace_event_call *call,
|
||||
char *filter_str, bool set_str,
|
||||
struct event_filter **filterp)
|
||||
{
|
||||
|
@ -1963,7 +1963,7 @@ static int create_system_filter(struct ftrace_subsystem_dir *dir,
|
|||
/* caller must hold event_mutex */
|
||||
int apply_event_filter(struct trace_event_file *file, char *filter_string)
|
||||
{
|
||||
struct ftrace_event_call *call = file->event_call;
|
||||
struct trace_event_call *call = file->event_call;
|
||||
struct event_filter *filter;
|
||||
int err;
|
||||
|
||||
|
@ -2212,7 +2212,7 @@ int ftrace_profile_set_filter(struct perf_event *event, int event_id,
|
|||
{
|
||||
int err;
|
||||
struct event_filter *filter;
|
||||
struct ftrace_event_call *call;
|
||||
struct trace_event_call *call;
|
||||
|
||||
mutex_lock(&event_mutex);
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ static void __always_unused ____ftrace_check_##name(void) \
|
|||
#undef FTRACE_ENTRY
|
||||
#define FTRACE_ENTRY(name, struct_name, id, tstruct, print, filter) \
|
||||
static int __init \
|
||||
ftrace_define_fields_##name(struct ftrace_event_call *event_call) \
|
||||
ftrace_define_fields_##name(struct trace_event_call *event_call) \
|
||||
{ \
|
||||
struct struct_name field; \
|
||||
int ret; \
|
||||
|
@ -163,14 +163,14 @@ ftrace_define_fields_##name(struct ftrace_event_call *event_call) \
|
|||
#define FTRACE_ENTRY_REG(call, struct_name, etype, tstruct, print, filter,\
|
||||
regfn) \
|
||||
\
|
||||
struct ftrace_event_class __refdata event_class_ftrace_##call = { \
|
||||
struct trace_event_class __refdata event_class_ftrace_##call = { \
|
||||
.system = __stringify(TRACE_SYSTEM), \
|
||||
.define_fields = ftrace_define_fields_##call, \
|
||||
.fields = LIST_HEAD_INIT(event_class_ftrace_##call.fields),\
|
||||
.reg = regfn, \
|
||||
}; \
|
||||
\
|
||||
struct ftrace_event_call __used event_##call = { \
|
||||
struct trace_event_call __used event_##call = { \
|
||||
.class = &event_class_ftrace_##call, \
|
||||
{ \
|
||||
.name = #call, \
|
||||
|
@ -179,7 +179,7 @@ struct ftrace_event_call __used event_##call = { \
|
|||
.print_fmt = print, \
|
||||
.flags = TRACE_EVENT_FL_IGNORE_ENABLE, \
|
||||
}; \
|
||||
struct ftrace_event_call __used \
|
||||
struct trace_event_call __used \
|
||||
__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;
|
||||
|
||||
#undef FTRACE_ENTRY
|
||||
|
@ -187,7 +187,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call;
|
|||
FTRACE_ENTRY_REG(call, struct_name, etype, \
|
||||
PARAMS(tstruct), PARAMS(print), filter, NULL)
|
||||
|
||||
int ftrace_event_is_function(struct ftrace_event_call *call)
|
||||
int ftrace_event_is_function(struct trace_event_call *call)
|
||||
{
|
||||
return call == &event_function;
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ int __trace_graph_entry(struct trace_array *tr,
|
|||
unsigned long flags,
|
||||
int pc)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_funcgraph_entry;
|
||||
struct trace_event_call *call = &event_funcgraph_entry;
|
||||
struct ring_buffer_event *event;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
struct ftrace_graph_ent_entry *entry;
|
||||
|
@ -393,7 +393,7 @@ void __trace_graph_return(struct trace_array *tr,
|
|||
unsigned long flags,
|
||||
int pc)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_funcgraph_exit;
|
||||
struct trace_event_call *call = &event_funcgraph_exit;
|
||||
struct ring_buffer_event *event;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
struct ftrace_graph_ret_entry *entry;
|
||||
|
|
|
@ -924,7 +924,7 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,
|
|||
struct ring_buffer *buffer;
|
||||
int size, dsize, pc;
|
||||
unsigned long irq_flags;
|
||||
struct ftrace_event_call *call = &tk->tp.call;
|
||||
struct trace_event_call *call = &tk->tp.call;
|
||||
|
||||
WARN_ON(call != trace_file->event_call);
|
||||
|
||||
|
@ -972,7 +972,7 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
|
|||
struct ring_buffer *buffer;
|
||||
int size, pc, dsize;
|
||||
unsigned long irq_flags;
|
||||
struct ftrace_event_call *call = &tk->tp.call;
|
||||
struct trace_event_call *call = &tk->tp.call;
|
||||
|
||||
WARN_ON(call != trace_file->event_call);
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ print_kretprobe_event(struct trace_iterator *iter, int flags,
|
|||
}
|
||||
|
||||
|
||||
static int kprobe_event_define_fields(struct ftrace_event_call *event_call)
|
||||
static int kprobe_event_define_fields(struct trace_event_call *event_call)
|
||||
{
|
||||
int ret, i;
|
||||
struct kprobe_trace_entry_head field;
|
||||
|
@ -1104,7 +1104,7 @@ static int kprobe_event_define_fields(struct ftrace_event_call *event_call)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int kretprobe_event_define_fields(struct ftrace_event_call *event_call)
|
||||
static int kretprobe_event_define_fields(struct trace_event_call *event_call)
|
||||
{
|
||||
int ret, i;
|
||||
struct kretprobe_trace_entry_head field;
|
||||
|
@ -1134,7 +1134,7 @@ static int kretprobe_event_define_fields(struct ftrace_event_call *event_call)
|
|||
static void
|
||||
kprobe_perf_func(struct trace_kprobe *tk, struct pt_regs *regs)
|
||||
{
|
||||
struct ftrace_event_call *call = &tk->tp.call;
|
||||
struct trace_event_call *call = &tk->tp.call;
|
||||
struct bpf_prog *prog = call->prog;
|
||||
struct kprobe_trace_entry_head *entry;
|
||||
struct hlist_head *head;
|
||||
|
@ -1169,7 +1169,7 @@ static void
|
|||
kretprobe_perf_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
struct ftrace_event_call *call = &tk->tp.call;
|
||||
struct trace_event_call *call = &tk->tp.call;
|
||||
struct bpf_prog *prog = call->prog;
|
||||
struct kretprobe_trace_entry_head *entry;
|
||||
struct hlist_head *head;
|
||||
|
@ -1206,7 +1206,7 @@ NOKPROBE_SYMBOL(kretprobe_perf_func);
|
|||
* kprobe_trace_self_tests_init() does enable_trace_probe/disable_trace_probe
|
||||
* lockless, but we can't race with this __init function.
|
||||
*/
|
||||
static int kprobe_register(struct ftrace_event_call *event,
|
||||
static int kprobe_register(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data)
|
||||
{
|
||||
struct trace_kprobe *tk = (struct trace_kprobe *)event->data;
|
||||
|
@ -1276,10 +1276,10 @@ static struct trace_event_functions kprobe_funcs = {
|
|||
|
||||
static int register_kprobe_event(struct trace_kprobe *tk)
|
||||
{
|
||||
struct ftrace_event_call *call = &tk->tp.call;
|
||||
struct trace_event_call *call = &tk->tp.call;
|
||||
int ret;
|
||||
|
||||
/* Initialize ftrace_event_call */
|
||||
/* Initialize trace_event_call */
|
||||
INIT_LIST_HEAD(&call->class->fields);
|
||||
if (trace_kprobe_is_return(tk)) {
|
||||
call->event.funcs = &kretprobe_funcs;
|
||||
|
|
|
@ -298,7 +298,7 @@ static void __trace_mmiotrace_rw(struct trace_array *tr,
|
|||
struct trace_array_cpu *data,
|
||||
struct mmiotrace_rw *rw)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_mmiotrace_rw;
|
||||
struct trace_event_call *call = &event_mmiotrace_rw;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
struct ring_buffer_event *event;
|
||||
struct trace_mmiotrace_rw *entry;
|
||||
|
@ -328,7 +328,7 @@ static void __trace_mmiotrace_map(struct trace_array *tr,
|
|||
struct trace_array_cpu *data,
|
||||
struct mmiotrace_map *map)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_mmiotrace_map;
|
||||
struct trace_event_call *call = &event_mmiotrace_map;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
struct ring_buffer_event *event;
|
||||
struct trace_mmiotrace_map *entry;
|
||||
|
|
|
@ -225,12 +225,12 @@ EXPORT_SYMBOL(trace_print_array_seq);
|
|||
int ftrace_raw_output_prep(struct trace_iterator *iter,
|
||||
struct trace_event *trace_event)
|
||||
{
|
||||
struct ftrace_event_call *event;
|
||||
struct trace_event_call *event;
|
||||
struct trace_seq *s = &iter->seq;
|
||||
struct trace_seq *p = &iter->tmp_seq;
|
||||
struct trace_entry *entry;
|
||||
|
||||
event = container_of(trace_event, struct ftrace_event_call, event);
|
||||
event = container_of(trace_event, struct trace_event_call, event);
|
||||
entry = iter->ent;
|
||||
|
||||
if (entry->type != event->event.type) {
|
||||
|
|
|
@ -272,8 +272,8 @@ struct probe_arg {
|
|||
|
||||
struct trace_probe {
|
||||
unsigned int flags; /* For TP_FLAG_* */
|
||||
struct ftrace_event_class class;
|
||||
struct ftrace_event_call call;
|
||||
struct trace_event_class class;
|
||||
struct trace_event_call call;
|
||||
struct list_head files;
|
||||
ssize_t size; /* trace entry size */
|
||||
unsigned int nr_args;
|
||||
|
|
|
@ -369,7 +369,7 @@ tracing_sched_switch_trace(struct trace_array *tr,
|
|||
struct task_struct *next,
|
||||
unsigned long flags, int pc)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_context_switch;
|
||||
struct trace_event_call *call = &event_context_switch;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
struct ring_buffer_event *event;
|
||||
struct ctx_switch_entry *entry;
|
||||
|
@ -397,7 +397,7 @@ tracing_sched_wakeup_trace(struct trace_array *tr,
|
|||
struct task_struct *curr,
|
||||
unsigned long flags, int pc)
|
||||
{
|
||||
struct ftrace_event_call *call = &event_wakeup;
|
||||
struct trace_event_call *call = &event_wakeup;
|
||||
struct ring_buffer_event *event;
|
||||
struct ctx_switch_entry *entry;
|
||||
struct ring_buffer *buffer = tr->trace_buffer.buffer;
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
static DEFINE_MUTEX(syscall_trace_lock);
|
||||
|
||||
static int syscall_enter_register(struct ftrace_event_call *event,
|
||||
static int syscall_enter_register(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data);
|
||||
static int syscall_exit_register(struct ftrace_event_call *event,
|
||||
static int syscall_exit_register(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data);
|
||||
|
||||
static struct list_head *
|
||||
syscall_get_enter_fields(struct ftrace_event_call *call)
|
||||
syscall_get_enter_fields(struct trace_event_call *call)
|
||||
{
|
||||
struct syscall_metadata *entry = call->data;
|
||||
|
||||
|
@ -219,7 +219,7 @@ __set_enter_print_fmt(struct syscall_metadata *entry, char *buf, int len)
|
|||
return pos;
|
||||
}
|
||||
|
||||
static int __init set_syscall_print_fmt(struct ftrace_event_call *call)
|
||||
static int __init set_syscall_print_fmt(struct trace_event_call *call)
|
||||
{
|
||||
char *print_fmt;
|
||||
int len;
|
||||
|
@ -244,7 +244,7 @@ static int __init set_syscall_print_fmt(struct ftrace_event_call *call)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __init free_syscall_print_fmt(struct ftrace_event_call *call)
|
||||
static void __init free_syscall_print_fmt(struct trace_event_call *call)
|
||||
{
|
||||
struct syscall_metadata *entry = call->data;
|
||||
|
||||
|
@ -252,7 +252,7 @@ static void __init free_syscall_print_fmt(struct ftrace_event_call *call)
|
|||
kfree(call->print_fmt);
|
||||
}
|
||||
|
||||
static int __init syscall_enter_define_fields(struct ftrace_event_call *call)
|
||||
static int __init syscall_enter_define_fields(struct trace_event_call *call)
|
||||
{
|
||||
struct syscall_trace_enter trace;
|
||||
struct syscall_metadata *meta = call->data;
|
||||
|
@ -275,7 +275,7 @@ static int __init syscall_enter_define_fields(struct ftrace_event_call *call)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int __init syscall_exit_define_fields(struct ftrace_event_call *call)
|
||||
static int __init syscall_exit_define_fields(struct trace_event_call *call)
|
||||
{
|
||||
struct syscall_trace_exit trace;
|
||||
int ret;
|
||||
|
@ -385,7 +385,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)
|
|||
}
|
||||
|
||||
static int reg_event_syscall_enter(struct trace_event_file *file,
|
||||
struct ftrace_event_call *call)
|
||||
struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr = file->tr;
|
||||
int ret = 0;
|
||||
|
@ -406,7 +406,7 @@ static int reg_event_syscall_enter(struct trace_event_file *file,
|
|||
}
|
||||
|
||||
static void unreg_event_syscall_enter(struct trace_event_file *file,
|
||||
struct ftrace_event_call *call)
|
||||
struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr = file->tr;
|
||||
int num;
|
||||
|
@ -423,7 +423,7 @@ static void unreg_event_syscall_enter(struct trace_event_file *file,
|
|||
}
|
||||
|
||||
static int reg_event_syscall_exit(struct trace_event_file *file,
|
||||
struct ftrace_event_call *call)
|
||||
struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr = file->tr;
|
||||
int ret = 0;
|
||||
|
@ -444,7 +444,7 @@ static int reg_event_syscall_exit(struct trace_event_file *file,
|
|||
}
|
||||
|
||||
static void unreg_event_syscall_exit(struct trace_event_file *file,
|
||||
struct ftrace_event_call *call)
|
||||
struct trace_event_call *call)
|
||||
{
|
||||
struct trace_array *tr = file->tr;
|
||||
int num;
|
||||
|
@ -460,7 +460,7 @@ static void unreg_event_syscall_exit(struct trace_event_file *file,
|
|||
mutex_unlock(&syscall_trace_lock);
|
||||
}
|
||||
|
||||
static int __init init_syscall_trace(struct ftrace_event_call *call)
|
||||
static int __init init_syscall_trace(struct trace_event_call *call)
|
||||
{
|
||||
int id;
|
||||
int num;
|
||||
|
@ -493,7 +493,7 @@ struct trace_event_functions exit_syscall_print_funcs = {
|
|||
.trace = print_syscall_exit,
|
||||
};
|
||||
|
||||
struct ftrace_event_class __refdata event_class_syscall_enter = {
|
||||
struct trace_event_class __refdata event_class_syscall_enter = {
|
||||
.system = "syscalls",
|
||||
.reg = syscall_enter_register,
|
||||
.define_fields = syscall_enter_define_fields,
|
||||
|
@ -501,7 +501,7 @@ struct ftrace_event_class __refdata event_class_syscall_enter = {
|
|||
.raw_init = init_syscall_trace,
|
||||
};
|
||||
|
||||
struct ftrace_event_class __refdata event_class_syscall_exit = {
|
||||
struct trace_event_class __refdata event_class_syscall_exit = {
|
||||
.system = "syscalls",
|
||||
.reg = syscall_exit_register,
|
||||
.define_fields = syscall_exit_define_fields,
|
||||
|
@ -584,7 +584,7 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
|
|||
perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head, NULL);
|
||||
}
|
||||
|
||||
static int perf_sysenter_enable(struct ftrace_event_call *call)
|
||||
static int perf_sysenter_enable(struct trace_event_call *call)
|
||||
{
|
||||
int ret = 0;
|
||||
int num;
|
||||
|
@ -605,7 +605,7 @@ static int perf_sysenter_enable(struct ftrace_event_call *call)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void perf_sysenter_disable(struct ftrace_event_call *call)
|
||||
static void perf_sysenter_disable(struct trace_event_call *call)
|
||||
{
|
||||
int num;
|
||||
|
||||
|
@ -656,7 +656,7 @@ static void perf_syscall_exit(void *ignore, struct pt_regs *regs, long ret)
|
|||
perf_trace_buf_submit(rec, size, rctx, 0, 1, regs, head, NULL);
|
||||
}
|
||||
|
||||
static int perf_sysexit_enable(struct ftrace_event_call *call)
|
||||
static int perf_sysexit_enable(struct trace_event_call *call)
|
||||
{
|
||||
int ret = 0;
|
||||
int num;
|
||||
|
@ -677,7 +677,7 @@ static int perf_sysexit_enable(struct ftrace_event_call *call)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void perf_sysexit_disable(struct ftrace_event_call *call)
|
||||
static void perf_sysexit_disable(struct trace_event_call *call)
|
||||
{
|
||||
int num;
|
||||
|
||||
|
@ -693,7 +693,7 @@ static void perf_sysexit_disable(struct ftrace_event_call *call)
|
|||
|
||||
#endif /* CONFIG_PERF_EVENTS */
|
||||
|
||||
static int syscall_enter_register(struct ftrace_event_call *event,
|
||||
static int syscall_enter_register(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data)
|
||||
{
|
||||
struct trace_event_file *file = data;
|
||||
|
@ -721,7 +721,7 @@ static int syscall_enter_register(struct ftrace_event_call *event,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int syscall_exit_register(struct ftrace_event_call *event,
|
||||
static int syscall_exit_register(struct trace_event_call *event,
|
||||
enum trace_reg type, void *data)
|
||||
{
|
||||
struct trace_event_file *file = data;
|
||||
|
|
|
@ -777,7 +777,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,
|
|||
struct ring_buffer *buffer;
|
||||
void *data;
|
||||
int size, esize;
|
||||
struct ftrace_event_call *call = &tu->tp.call;
|
||||
struct trace_event_call *call = &tu->tp.call;
|
||||
|
||||
WARN_ON(call != trace_file->event_call);
|
||||
|
||||
|
@ -967,7 +967,7 @@ probe_event_disable(struct trace_uprobe *tu, struct trace_event_file *file)
|
|||
uprobe_buffer_disable();
|
||||
}
|
||||
|
||||
static int uprobe_event_define_fields(struct ftrace_event_call *event_call)
|
||||
static int uprobe_event_define_fields(struct trace_event_call *event_call)
|
||||
{
|
||||
int ret, i, size;
|
||||
struct uprobe_trace_entry_head field;
|
||||
|
@ -1093,7 +1093,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu,
|
|||
unsigned long func, struct pt_regs *regs,
|
||||
struct uprobe_cpu_buffer *ucb, int dsize)
|
||||
{
|
||||
struct ftrace_event_call *call = &tu->tp.call;
|
||||
struct trace_event_call *call = &tu->tp.call;
|
||||
struct uprobe_trace_entry_head *entry;
|
||||
struct hlist_head *head;
|
||||
void *data;
|
||||
|
@ -1159,7 +1159,7 @@ static void uretprobe_perf_func(struct trace_uprobe *tu, unsigned long func,
|
|||
#endif /* CONFIG_PERF_EVENTS */
|
||||
|
||||
static int
|
||||
trace_uprobe_register(struct ftrace_event_call *event, enum trace_reg type,
|
||||
trace_uprobe_register(struct trace_event_call *event, enum trace_reg type,
|
||||
void *data)
|
||||
{
|
||||
struct trace_uprobe *tu = event->data;
|
||||
|
@ -1272,10 +1272,10 @@ static struct trace_event_functions uprobe_funcs = {
|
|||
|
||||
static int register_uprobe_event(struct trace_uprobe *tu)
|
||||
{
|
||||
struct ftrace_event_call *call = &tu->tp.call;
|
||||
struct trace_event_call *call = &tu->tp.call;
|
||||
int ret;
|
||||
|
||||
/* Initialize ftrace_event_call */
|
||||
/* Initialize trace_event_call */
|
||||
INIT_LIST_HEAD(&call->class->fields);
|
||||
call->event.funcs = &uprobe_funcs;
|
||||
call->class->define_fields = uprobe_event_define_fields;
|
||||
|
|
Loading…
Reference in New Issue