mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge branch 'tracing/core-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into tracing/urgent
This commit is contained in:
commit
be4bdbfbae
5 changed files with 234 additions and 87 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <linux/ring_buffer.h>
|
||||
#include <linux/trace_seq.h>
|
||||
#include <linux/percpu.h>
|
||||
#include <linux/hardirq.h>
|
||||
|
||||
struct trace_array;
|
||||
struct tracer;
|
||||
|
|
@ -130,10 +131,15 @@ struct ftrace_event_call {
|
|||
void *data;
|
||||
|
||||
atomic_t profile_count;
|
||||
int (*profile_enable)(struct ftrace_event_call *);
|
||||
void (*profile_disable)(struct ftrace_event_call *);
|
||||
int (*profile_enable)(void);
|
||||
void (*profile_disable)(void);
|
||||
};
|
||||
|
||||
#define FTRACE_MAX_PROFILE_SIZE 2048
|
||||
|
||||
extern char *trace_profile_buf;
|
||||
extern char *trace_profile_buf_nmi;
|
||||
|
||||
#define MAX_FILTER_PRED 32
|
||||
#define MAX_FILTER_STR_VAL 256 /* Should handle KSYM_SYMBOL_LEN */
|
||||
|
||||
|
|
|
|||
|
|
@ -100,33 +100,25 @@ struct perf_counter_attr;
|
|||
|
||||
#ifdef CONFIG_EVENT_PROFILE
|
||||
#define TRACE_SYS_ENTER_PROFILE(sname) \
|
||||
static int prof_sysenter_enable_##sname(struct ftrace_event_call *event_call) \
|
||||
static int prof_sysenter_enable_##sname(void) \
|
||||
{ \
|
||||
int ret = 0; \
|
||||
if (!atomic_inc_return(&event_enter_##sname.profile_count)) \
|
||||
ret = reg_prof_syscall_enter("sys"#sname); \
|
||||
return ret; \
|
||||
return reg_prof_syscall_enter("sys"#sname); \
|
||||
} \
|
||||
\
|
||||
static void prof_sysenter_disable_##sname(struct ftrace_event_call *event_call)\
|
||||
static void prof_sysenter_disable_##sname(void) \
|
||||
{ \
|
||||
if (atomic_add_negative(-1, &event_enter_##sname.profile_count)) \
|
||||
unreg_prof_syscall_enter("sys"#sname); \
|
||||
unreg_prof_syscall_enter("sys"#sname); \
|
||||
}
|
||||
|
||||
#define TRACE_SYS_EXIT_PROFILE(sname) \
|
||||
static int prof_sysexit_enable_##sname(struct ftrace_event_call *event_call) \
|
||||
static int prof_sysexit_enable_##sname(void) \
|
||||
{ \
|
||||
int ret = 0; \
|
||||
if (!atomic_inc_return(&event_exit_##sname.profile_count)) \
|
||||
ret = reg_prof_syscall_exit("sys"#sname); \
|
||||
return ret; \
|
||||
return reg_prof_syscall_exit("sys"#sname); \
|
||||
} \
|
||||
\
|
||||
static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
|
||||
static void prof_sysexit_disable_##sname(void) \
|
||||
{ \
|
||||
if (atomic_add_negative(-1, &event_exit_##sname.profile_count)) \
|
||||
unreg_prof_syscall_exit("sys"#sname); \
|
||||
unreg_prof_syscall_exit("sys"#sname); \
|
||||
}
|
||||
|
||||
#define TRACE_SYS_ENTER_PROFILE_INIT(sname) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue