tracing updates
Ingo,
Please pull the perf/core branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
perf/core
Thanks,
Frederic
---
Frederic Weisbecker (2):
tracing: Remove sysprof ftrace plugin
tracing: Remove special traces
Arnd Bergmann (1):
tracing: Use generic_file_llseek for debugfs
include/linux/kernel.h | 5 - include/linux/sched.h | 12 -- kernel/trace/Kconfig | 9 - kernel/trace/Makefile | 1 - kernel/trace/trace.c | 73 ++------- kernel/trace/trace.h | 10 -- kernel/trace/trace_entries.h | 17 -- kernel/trace/trace_output.c | 66 -------- kernel/trace/trace_selftest.c | 33 ---- kernel/trace/trace_sysprof.c | 330 ----------------------------------------- 10 files changed, 15 insertions(+), 541 deletions(-)
PATCH 1/3 tracing: Remove sysprof ftrace plugin
The sysprof ftrace plugin doesn't seem to be seriously used somewhere. There is a branch in the sysprof tree that makes an interface to it, but the real sysprof tool uses either its own module or perf events.
Drop the sysprof ftrace plugin then, as it's mostly useless.
--- kernel/trace/Kconfig | 9 - kernel/trace/Makefile | 1 - kernel/trace/trace.c | 3 - kernel/trace/trace.h | 3 - kernel/trace/trace_selftest.c | 32 ---- kernel/trace/trace_sysprof.c | 330 ----------------------------------------- 6 files changed, 0 insertions(+), 378 deletions(-) delete mode 100644 kernel/trace/trace_sysprof.c
kernel/trace/Kconfig +0 -9
@@ -194,15 +194,6 @@ config PREEMPT_TRACER enabled. This option and the irqs-off timing option can be used together or separately.) -config SYSPROF_TRACER - bool "Sysprof Tracer" - depends on X86 - select GENERIC_TRACER - select CONTEXT_SWITCH_TRACER - help - This tracer provides the trace needed by the 'Sysprof' userspace - tool. - config SCHED_TRACER bool "Scheduling Latency Tracer" select GENERIC_TRACER
kernel/trace/Makefile +0 -1
@@ -30,7 +30,6 @@ obj-$(CONFIG_TRACING) += trace_output.o obj-$(CONFIG_TRACING) += trace_stat.o obj-$(CONFIG_TRACING) += trace_printk.o obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o -obj-$(CONFIG_SYSPROF_TRACER) += trace_sysprof.o obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o obj-$(CONFIG_IRQSOFF_TRACER) += trace_irqsoff.o obj-$(CONFIG_PREEMPT_TRACER) += trace_irqsoff.o
kernel/trace/trace.c +0 -3
@@ -4354,9 +4354,6 @@ static __init int tracer_init_debugfs(void)trace_create_file ("dyn_ftrace_total_info" ,0444 , d_tracer, &ftrace_update_tot_cnt, &tracing_dyn_info_fops);#endif -#ifdef CONFIG_SYSPROF_TRACER -init_tracer_sysprof_debugfs (d_tracer); -#endif create_trace_options_dir ();
kernel/trace/trace.h +0 -3
@@ -296,7 +296,6 @@ struct dentry *trace_create_file(const char *name, const struct file_operations *fops);struct dentry *tracing_init_dentry (void ); -void init_tracer_sysprof_debugfs (struct dentry *d_tracer);struct ring_buffer_event ;
@@ -428,8 +427,6 @@ extern int trace_selftest_startup_nop(struct tracer *trace, struct trace_array *tr);extern int trace_selftest_startup_sched_switch (struct tracer *trace,struct trace_array *tr); -extern int trace_selftest_startup_sysprof (struct tracer *trace, -struct trace_array *tr);extern int trace_selftest_startup_branch (struct tracer *trace,struct trace_array *tr);#endif /* CONFIG_FTRACE_STARTUP_TEST */
kernel/trace/trace_selftest.c +0 -32
@@ -690,38 +690,6 @@ trace_selftest_startup_sched_switch(struct tracer *trace, struct trace_array *tr }#endif /* CONFIG_CONTEXT_SWITCH_TRACER */ -#ifdef CONFIG_SYSPROF_TRACER -int -trace_selftest_startup_sysprof (struct tracer *trace,struct trace_array *tr) -{ -unsigned long count; -int ret; - -/* start the tracing */ - ret =tracer_init (trace, tr); -if (ret) { -warn_failed_init_tracer (trace, ret); -return ret; - } - -/* Sleep for a 1/10 of a second */ -msleep (100 ); -/* stop the tracing. */ -tracing_stop (); -/* check the trace buffer */ - ret =trace_test_buffer (tr, &count); - trace->reset (tr); -tracing_start (); - -if (!ret && !count) { -printk (KERN_CONT ".. no entries found .." ); - ret =-1 ; - } - -return ret; -} -#endif /* CONFIG_SYSPROF_TRACER */ -#ifdef CONFIG_BRANCH_TRACER int trace_selftest_startup_branch (struct tracer *trace,struct trace_array *tr)
kernel/trace/trace_sysprof.c deleted +0 -330
330 lines not on this page · raw message
Signature · 1 line
1.6.2.3
PATCH 2/3 tracing: Remove special traces
In reply to Frederic WeisbeckerSpecial traces type was only used by sysprof. Lets remove it now that sysprof ftrace plugin has been dropped.
--- include/linux/kernel.h | 5 --- include/linux/sched.h | 12 ------- kernel/trace/trace.c | 55 ---------------------------------- kernel/trace/trace.h | 7 ---- kernel/trace/trace_entries.h | 17 ---------- kernel/trace/trace_output.c | 66 ----------------------------------------- kernel/trace/trace_selftest.c | 1 - 7 files changed, 0 insertions(+), 163 deletions(-)
include/linux/kernel.h +0 -5
@@ -508,9 +508,6 @@ extern void tracing_start(void);extern void tracing_stop (void );extern void ftrace_off_permanent (void ); -extern void -ftrace_special (unsigned long arg1,unsigned long arg2,unsigned long arg3); -static inline void __attribute__ ((format (printf,1 ,2 )))____trace_printk_check_format (const char *fmt, ...) {
@@ -586,8 +583,6 @@ __ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap);extern void ftrace_dump (enum ftrace_dump_mode oops_dump_mode);#else -static inline void -ftrace_special (unsigned long arg1,unsigned long arg2,unsigned long arg3) { }static inline int trace_printk (const char *fmt, ...) __attribute__ ((format (printf,1 ,2 )));
include/linux/sched.h +0 -12
@@ -2434,18 +2434,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)#endif /* CONFIG_SMP */ -#ifdef CONFIG_TRACING -extern void -__trace_special (void *__tr,void *__data, -unsigned long arg1,unsigned long arg2,unsigned long arg3); -#else -static inline void -__trace_special (void *__tr,void *__data, -unsigned long arg1,unsigned long arg2,unsigned long arg3) -{ -} -#endif -extern long sched_setaffinity (pid_t pid,const struct cpumask *new_mask);extern long sched_getaffinity (pid_t pid,struct cpumask *mask);
kernel/trace/trace.c +0 -55
61 lines not on this page · raw message
kernel/trace/trace.h +0 -7
@@ -22,7 +22,6 @@ enum trace_type {TRACE_STACK ,TRACE_PRINT ,TRACE_BPRINT , -TRACE_SPECIAL ,TRACE_MMIO_RW ,TRACE_MMIO_MAP , TRACE_BRANCH,
@@ -189,7 +188,6 @@ extern void __ftrace_bad_type(void); IF_ASSIGN(var, ent, struct userstack_entry, TRACE_USER_STACK);\ IF_ASSIGN(var, ent, struct print_entry, TRACE_PRINT); \ IF_ASSIGN(var, ent, struct bprint_entry, TRACE_BPRINT); \ - IF_ASSIGN(var, ent, struct special_entry, 0); \ IF_ASSIGN(var, ent, struct trace_mmiotrace_rw, \TRACE_MMIO_RW ); \ IF_ASSIGN(var, ent, struct trace_mmiotrace_map, \
@@ -332,11 +330,6 @@ void tracing_sched_wakeup_trace(struct trace_array *tr,struct task_struct *wakee, struct task_struct *cur, unsigned long flags, int pc); -void trace_special (struct trace_array *tr, -struct trace_array_cpu *data, -unsigned long arg1, -unsigned long arg2, -unsigned long arg3,int pc); void trace_function(struct trace_array *tr, unsigned long ip, unsigned long parent_ip,
kernel/trace/trace_entries.h +0 -17
@@ -151,23 +151,6 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entry, );/* -* Special (free-form) trace entry: -*/ -FTRACE_ENTRY (special, special_entry, - -TRACE_SPECIAL , - -F_STRUCT ( - __field( unsigned long, arg1 ) - __field( unsigned long, arg2 ) - __field( unsigned long, arg3 ) - ), - -F_printk ("(%08lx) (%08lx) (%08lx)" , - __entry->arg1, __entry->arg2, __entry->arg3) -); - -/* * Stack-trace entry: */
kernel/trace/trace_output.c +0 -66
90 lines not on this page · raw message
kernel/trace/trace_selftest.c +0 -1
@@ -13,7 +13,6 @@ static inline int trace_valid_entry(struct trace_entry *entry)case TRACE_WAKE :case TRACE_STACK :case TRACE_PRINT : -case TRACE_SPECIAL :case TRACE_BRANCH :case TRACE_GRAPH_ENT :case TRACE_GRAPH_RET :
Signature · 1 line
1.6.2.3
PATCH 3/3 tracing: Use generic_file_llseek for debugfs
In reply to Frederic WeisbeckerFrom: Arnd Bergmann <[email protected]>
The default for llseek will change to no_llseek, so the tracing debugfs files need to add explicit .llseek assignments. Since we're dealing with regular files from a VFS perspective, use generic_file_llseek.
LKML-Reference: <[email protected]>
--- kernel/trace/trace.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)
kernel/trace/trace.c +15 -0
@@ -2338,6 +2338,7 @@ static const struct file_operations show_traces_fops = { .open = show_traces_open, .read = seq_read, .release = seq_release, + .llseek = seq_lseek, };/*
@@ -2431,6 +2432,7 @@ static const struct file_operations tracing_cpumask_fops = { .open = tracing_open_generic, .read = tracing_cpumask_read, .write = tracing_cpumask_write, + .llseek = generic_file_llseek, };static int tracing_trace_options_show (struct seq_file *m,void *v)
@@ -2597,6 +2599,7 @@ tracing_readme_read(struct file *filp, char __user *ubuf,static const struct file_operations tracing_readme_fops = { .open = tracing_open_generic, .read = tracing_readme_read, + .llseek = generic_file_llseek, }; static ssize_t
@@ -2647,6 +2650,7 @@ tracing_saved_cmdlines_read(struct file *file, char __user *ubuf,static const struct file_operations tracing_saved_cmdlines_fops = { .open = tracing_open_generic, .read = tracing_saved_cmdlines_read, + .llseek = generic_file_llseek, }; static ssize_t
@@ -2976,6 +2980,7 @@ static int tracing_open_pipe(struct inode *inode, struct file *filp)if (iter->trace->pipe_open) iter->trace->pipe_open (iter); +nonseekable_open (inode, filp); out:mutex_unlock (&trace_types_lock);return ret;
@@ -3534,18 +3539,21 @@ static const struct file_operations tracing_max_lat_fops = { .open = tracing_open_generic, .read = tracing_max_lat_read, .write = tracing_max_lat_write, + .llseek = generic_file_llseek, };static const struct file_operations tracing_ctrl_fops = { .open = tracing_open_generic, .read = tracing_ctrl_read, .write = tracing_ctrl_write, + .llseek = generic_file_llseek, };static const struct file_operations set_tracer_fops = { .open = tracing_open_generic, .read = tracing_set_trace_read, .write = tracing_set_trace_write, + .llseek = generic_file_llseek, };static const struct file_operations tracing_pipe_fops = {
@@ -3554,17 +3562,20 @@ static const struct file_operations tracing_pipe_fops = { .read = tracing_read_pipe, .splice_read = tracing_splice_read_pipe, .release = tracing_release_pipe, + .llseek = no_llseek, };static const struct file_operations tracing_entries_fops = { .open = tracing_open_generic, .read = tracing_entries_read, .write = tracing_entries_write, + .llseek = generic_file_llseek, };static const struct file_operations tracing_mark_fops = { .open = tracing_open_generic, .write = tracing_mark_write, + .llseek = generic_file_llseek, };static const struct file_operations trace_clock_fops = {
@@ -3870,6 +3881,7 @@ tracing_stats_read(struct file *filp, char __user *ubuf,static const struct file_operations tracing_stats_fops = { .open = tracing_open_generic, .read = tracing_stats_read, + .llseek = generic_file_llseek, };#ifdef CONFIG_DYNAMIC_FTRACE
@@ -3906,6 +3918,7 @@ tracing_read_dyn_info(struct file *filp, char __user *ubuf,static const struct file_operations tracing_dyn_info_fops = { .open = tracing_open_generic, .read = tracing_read_dyn_info, + .llseek = generic_file_llseek, };#endif
@@ -4059,6 +4072,7 @@ static const struct file_operations trace_options_fops = { .open = tracing_open_generic, .read = trace_options_read, .write = trace_options_write, + .llseek = generic_file_llseek, }; static ssize_t
@@ -4110,6 +4124,7 @@ static const struct file_operations trace_options_core_fops = { .open = tracing_open_generic, .read = trace_options_core_read, .write = trace_options_core_write, + .llseek = generic_file_llseek, }; struct dentry *trace_create_file(const char *name,
Signature · 1 line
1.6.2.3
Quoted 19 lines · Frederic Weisbecker
Ingo,
Please pull the perf/core branch that can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
perf/coreThanks,
Frederic
---Frederic Weisbecker (2):
tracing: Remove sysprof ftrace plugin
tracing: Remove special tracesArnd Bergmann (1):
tracing: Usegeneric_file_llseekfor debugfs
Quoted 11 lines
include/linux/kernel.h | 5 - include/linux/sched.h | 12 -- kernel/trace/Kconfig | 9 - kernel/trace/Makefile | 1 - kernel/trace/trace.c | 73 ++------- kernel/trace/trace.h | 10 -- kernel/trace/trace_entries.h | 17 -- kernel/trace/trace_output.c | 66 -------- kernel/trace/trace_selftest.c | 33 ---- kernel/trace/trace_sysprof.c | 330 ----------------------------------------- 10 files changed, 15 insertions(+), 541 deletions(-)
Pulled, thanks Frederic!
Ingo