Merge tag 'trace-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "Lots of tweaks, small fixes, optimizations, and some helper functions to help out the rest of the kernel to ease their use of trace events. The big change for this release is the allowing of other tracers, such as the latency tracers, to be used in the trace instances and allow for function or function graph tracing to be in the top level simultaneously" * tag 'trace-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (44 commits) tracing: Fix memory leak on instance deletion tracing: Fix leak of ring buffer data when new instances creation fails tracing/kprobes: Avoid self tests if tracing is disabled on boot up tracing: Return error if ftrace_trace_arrays list is empty tracing: Only calculate stats of tracepoint benchmarks for 2^32 times tracing: Convert stddev into u64 in tracepoint benchmark tracing: Introduce saved_cmdlines_size file tracing: Add __get_dynamic_array_len() macro for trace events tracing: Remove unused variable in trace_benchmark tracing: Eliminate double free on failure of allocation on boot up ftrace/x86: Call text_ip_addr() instead of the duplicated code tracing: Print max callstack on stacktrace bug tracing: Move locking of trace_cmdline_lock into start/stop seq calls tracing: Try again for saved cmdline if failed due to locking tracing: Have saved_cmdlines use the seq_read infrastructure tracing: Add tracepoint benchmark tracepoint tracing: Print nasty banner when trace_printk() is in use tracing: Add funcgraph_tail option to print function name after closing braces tracing: Eliminate duplicate TRACE_GRAPH_PRINT_xx defines tracing: Add __bitmask() macro to trace events to cpumasks and other bitmasks ...
This commit is contained in:
@@ -62,9 +62,6 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
|
||||
* set in the flags member.
|
||||
*
|
||||
* ENABLED - set/unset when ftrace_ops is registered/unregistered
|
||||
* GLOBAL - set manualy by ftrace_ops user to denote the ftrace_ops
|
||||
* is part of the global tracers sharing the same filter
|
||||
* via set_ftrace_* debugfs files.
|
||||
* DYNAMIC - set when ftrace_ops is registered to denote dynamically
|
||||
* allocated ftrace_ops which need special care
|
||||
* CONTROL - set manualy by ftrace_ops user to denote the ftrace_ops
|
||||
@@ -96,15 +93,14 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
|
||||
*/
|
||||
enum {
|
||||
FTRACE_OPS_FL_ENABLED = 1 << 0,
|
||||
FTRACE_OPS_FL_GLOBAL = 1 << 1,
|
||||
FTRACE_OPS_FL_DYNAMIC = 1 << 2,
|
||||
FTRACE_OPS_FL_CONTROL = 1 << 3,
|
||||
FTRACE_OPS_FL_SAVE_REGS = 1 << 4,
|
||||
FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 5,
|
||||
FTRACE_OPS_FL_RECURSION_SAFE = 1 << 6,
|
||||
FTRACE_OPS_FL_STUB = 1 << 7,
|
||||
FTRACE_OPS_FL_INITIALIZED = 1 << 8,
|
||||
FTRACE_OPS_FL_DELETED = 1 << 9,
|
||||
FTRACE_OPS_FL_DYNAMIC = 1 << 1,
|
||||
FTRACE_OPS_FL_CONTROL = 1 << 2,
|
||||
FTRACE_OPS_FL_SAVE_REGS = 1 << 3,
|
||||
FTRACE_OPS_FL_SAVE_REGS_IF_SUPPORTED = 1 << 4,
|
||||
FTRACE_OPS_FL_RECURSION_SAFE = 1 << 5,
|
||||
FTRACE_OPS_FL_STUB = 1 << 6,
|
||||
FTRACE_OPS_FL_INITIALIZED = 1 << 7,
|
||||
FTRACE_OPS_FL_DELETED = 1 << 8,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -366,14 +362,12 @@ enum {
|
||||
* IGNORE - The function is already what we want it to be
|
||||
* MAKE_CALL - Start tracing the function
|
||||
* MODIFY_CALL - Stop saving regs for the function
|
||||
* MODIFY_CALL_REGS - Start saving regs for the function
|
||||
* MAKE_NOP - Stop tracing the function
|
||||
*/
|
||||
enum {
|
||||
FTRACE_UPDATE_IGNORE,
|
||||
FTRACE_UPDATE_MAKE_CALL,
|
||||
FTRACE_UPDATE_MODIFY_CALL,
|
||||
FTRACE_UPDATE_MODIFY_CALL_REGS,
|
||||
FTRACE_UPDATE_MAKE_NOP,
|
||||
};
|
||||
|
||||
@@ -404,6 +398,8 @@ int ftrace_update_record(struct dyn_ftrace *rec, int enable);
|
||||
int ftrace_test_record(struct dyn_ftrace *rec, int enable);
|
||||
void ftrace_run_stop_machine(int command);
|
||||
unsigned long ftrace_location(unsigned long ip);
|
||||
unsigned long ftrace_get_addr_new(struct dyn_ftrace *rec);
|
||||
unsigned long ftrace_get_addr_curr(struct dyn_ftrace *rec);
|
||||
|
||||
extern ftrace_func_t ftrace_trace_function;
|
||||
|
||||
|
@@ -38,6 +38,9 @@ const char *ftrace_print_symbols_seq_u64(struct trace_seq *p,
|
||||
*symbol_array);
|
||||
#endif
|
||||
|
||||
const char *ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr,
|
||||
unsigned int bitmask_size);
|
||||
|
||||
const char *ftrace_print_hex_seq(struct trace_seq *p,
|
||||
const unsigned char *buf, int len);
|
||||
|
||||
|
@@ -355,7 +355,7 @@ static inline void reset_current_kprobe(void)
|
||||
|
||||
static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)
|
||||
{
|
||||
return (&__get_cpu_var(kprobe_ctlblk));
|
||||
return this_cpu_ptr(&kprobe_ctlblk);
|
||||
}
|
||||
|
||||
int register_kprobe(struct kprobe *p);
|
||||
|
@@ -46,6 +46,9 @@ extern int trace_seq_putmem_hex(struct trace_seq *s, const void *mem,
|
||||
extern void *trace_seq_reserve(struct trace_seq *s, size_t len);
|
||||
extern int trace_seq_path(struct trace_seq *s, const struct path *path);
|
||||
|
||||
extern int trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
|
||||
int nmaskbits);
|
||||
|
||||
#else /* CONFIG_TRACING */
|
||||
static inline int trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
|
||||
{
|
||||
@@ -57,6 +60,13 @@ trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
trace_seq_bitmask(struct trace_seq *s, const unsigned long *maskp,
|
||||
int nmaskbits)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int trace_print_seq(struct seq_file *m, struct trace_seq *s)
|
||||
{
|
||||
return 0;
|
||||
|
@@ -185,6 +185,11 @@ extern void syscall_unregfunc(void);
|
||||
static inline void \
|
||||
check_trace_callback_type_##name(void (*cb)(data_proto)) \
|
||||
{ \
|
||||
} \
|
||||
static inline bool \
|
||||
trace_##name##_enabled(void) \
|
||||
{ \
|
||||
return static_key_false(&__tracepoint_##name.key); \
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -230,6 +235,11 @@ extern void syscall_unregfunc(void);
|
||||
} \
|
||||
static inline void check_trace_callback_type_##name(void (*cb)(data_proto)) \
|
||||
{ \
|
||||
} \
|
||||
static inline bool \
|
||||
trace_##name##_enabled(void) \
|
||||
{ \
|
||||
return false; \
|
||||
}
|
||||
|
||||
#define DEFINE_TRACE_FN(name, reg, unreg)
|
||||
|
Reference in New Issue
Block a user