tracing: Remove "ftrace" from TRACE_EVENT files
Subsystems (14)
Steven Rostedt
maintainercover tracing: Remove "ftrace" from TRACE_EVENT files
As nobody seemed to respond to the RFC, I'm posting this for real. Before uploading, I'll do one more test against the latest linux-next to make sure it doesn't break anything. I tested it against linux-next before but things could have changed since.
-- Steve
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: d0ee8f4a1f5f3df933cdc9a80f5dea13e2fb5022
Steven Rostedt (Red Hat) (19):
tracing: Rename trace/ftrace.h to trace/trace_events.h
tracing: Move the perf code out of trace_event.h
tracing: Rename ftrace_event.h to trace_events.h
tracing: Rename ftrace_print_*() functions ta trace_print_*()
tracing: Rename (un)register_ftrace_event() to (un)register_trace_event()
tracing: Rename ftrace_event_file to trace_event_file
tracing: Rename ftrace_event_{call,class} to trace_event_{call,class}
tracing: Rename ftrace_event_buffer to trace_event_buffer.
tracing: Rename ftrace_output functions to trace_output
tracing: Rename FTRACE_MAX_EVENT to TRACE_EVENT_TYPE_MAX
tracing: Rename ftrace_event_name() to trace_event_name()
tracing: Rename struct ftrace_subsystem_dir to trace_subsystem_dir
tracing: Rename FTRACE_EVENT_FL_* flags to EVENT_FILE_FL_*
tracing: Rename ftrace_trigger_soft_disabled() to trace_trigger_soft_disabled()
tracing: Rename ftrace_raw_##call event structures to trace_event_raw_##call
tracing: Rename ftrace_data_offset_##call to trace_event_data_offset_##call
tracing: Rename ftrace_event_type_funcs_##call to trace_event_type_funcs_##call
tracing: Rename ftrace_define_fields_##call() to trace_event_define_fields_##call()
tracing: Rename ftrace_get_offsets_##call() to trace_event_get_offsets_##call()
----
arch/x86/kvm/mmutrace.h | 2 +- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 2 +- include/linux/ftrace_event.h | 616 --------------- include/linux/module.h | 2 +- include/linux/perf_event.h | 2 +- include/linux/syscalls.h | 12 +- include/linux/trace_events.h | 616 +++++++++++++++ include/trace/define_trace.h | 3 +- include/trace/events/power.h | 2 +- include/trace/ftrace.h | 859 --------------------- include/trace/perf.h | 350 +++++++++ include/trace/syscall.h | 6 +- include/trace/trace_events.h | 508 ++++++++++++ kernel/events/core.c | 2 +- kernel/module.c | 2 +- kernel/rcu/tiny.c | 2 +- kernel/rcu/tree.c | 2 +- kernel/trace/blktrace.c | 4 +- kernel/trace/ring_buffer.c | 2 +- kernel/trace/trace.c | 22 +- kernel/trace/trace.h | 42 +- kernel/trace/trace_branch.c | 4 +- kernel/trace/trace_event_perf.c | 20 +- kernel/trace/trace_events.c | 304 ++++---- kernel/trace/trace_events_filter.c | 86 +-- kernel/trace/trace_events_trigger.c | 70 +- kernel/trace/trace_export.c | 10 +- kernel/trace/trace_functions_graph.c | 8 +- kernel/trace/trace_kprobe.c | 70 +- kernel/trace/trace_mmiotrace.c | 4 +- kernel/trace/trace_output.c | 78 +- kernel/trace/trace_output.h | 2 +- kernel/trace/trace_probe.h | 8 +- kernel/trace/trace_sched_wakeup.c | 4 +- kernel/trace/trace_syscalls.c | 72 +- kernel/trace/trace_uprobe.c | 46 +- mm/debug.c | 2 +- .../perf/util/scripting-engines/trace-event-perl.c | 4 +- .../util/scripting-engines/trace-event-python.c | 4 +- 40 files changed, 1928 insertions(+), 1928 deletions(-)
Steven Rostedt
maintainerPATCH 1/19 tracing: Rename trace/ftrace.h to trace/trace_events.h
From: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the TRACE_EVENT() macros. The file trace/ftrace.h was originally written to be mostly focused toward the "ftrace" code (that in kernel/trace/) but ended up being generic and used by perf and others.
Rename the file to be less confusing about what infrastructure it belongs to.
--- include/trace/define_trace.h | 2 +- include/trace/ftrace.h | 859 ------------------------------------------- include/trace/trace_events.h | 859 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 860 insertions(+), 860 deletions(-) delete mode 100644 include/trace/ftrace.h create mode 100644 include/trace/trace_events.h
include/trace/define_trace.h +1 -1
@@ -87,7 +87,7 @@#define DECLARE_TRACE (name, proto, args)#ifdef CONFIG_EVENT_TRACING -#include <trace/ftrace.h> +#include <trace/trace_events.h> #endif #undef TRACE_EVENT
include/trace/ftrace.h deleted +0 -859
859 lines not on this page · raw message
include/trace/trace_events.h new file +859 -0
859 lines not on this page · raw message
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 2/19 tracing: Move the perf code out of trace_event.h
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The trace_event.h file is for the generic trace event code. Move the perf related code into its own trace header file perf.h
--- include/trace/define_trace.h | 1 + include/trace/perf.h | 350 ++++++++++++++++++++++++++++++++++++++++++ include/trace/trace_events.h | 351 ------------------------------------------- 3 files changed, 351 insertions(+), 351 deletions(-) create mode 100644 include/trace/perf.h
include/trace/define_trace.h +1 -0
@@ -88,6 +88,7 @@#ifdef CONFIG_EVENT_TRACING #include <trace/trace_events.h> +#include <trace/perf.h> #endif #undef TRACE_EVENT
include/trace/perf.h new file +350 -0
350 lines not on this page · raw message
include/trace/trace_events.h +0 -351
354 lines not on this page · raw message
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 3/19 tracing: Rename ftrace_event.h to trace_events.h
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The term "ftrace" is really the infrastructure of the function hooks, and not the trace events. Rename ftrace_event.h to trace_events.h to represent the trace_event infrastructure and decouple the term ftrace from it.
--- arch/x86/kvm/mmutrace.h | 2 +- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 2 +- include/linux/ftrace_event.h | 616 ------------------------------------------- include/linux/trace_events.h | 616 +++++++++++++++++++++++++++++++++++++++++++ include/trace/events/power.h | 2 +- include/trace/syscall.h | 2 +- include/trace/trace_events.h | 2 +- kernel/events/core.c | 2 +- kernel/module.c | 2 +- kernel/rcu/tiny.c | 2 +- kernel/rcu/tree.c | 2 +- kernel/trace/ring_buffer.c | 2 +- kernel/trace/trace.h | 4 +- mm/debug.c | 2 +- 15 files changed, 630 insertions(+), 630 deletions(-) delete mode 100644 include/linux/ftrace_event.h create mode 100644 include/linux/trace_events.h
arch/x86/kvm/mmutrace.h +1 -1
@@ -2,7 +2,7 @@#define _TRACE_KVMMMU_H#include <linux/tracepoint.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #undef TRACE_SYSTEM#define TRACE_SYSTEM kvmmmu
arch/x86/kvm/svm.c +1 -1
@@ -28,7 +28,7 @@#include <linux/vmalloc.h> #include <linux/highmem.h> #include <linux/sched.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/slab.h> #include <asm/perf_event.h>
arch/x86/kvm/vmx.c +1 -1
@@ -28,7 +28,7 @@#include <linux/sched.h> #include <linux/moduleparam.h> #include <linux/mod_devicetable.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/slab.h> #include <linux/tboot.h> #include <linux/hrtimer.h>
include/linux/ftrace_event.h deleted +0 -616
616 lines not on this page · raw message
include/linux/trace_events.h new file +616 -0
616 lines not on this page · raw message
include/trace/events/power.h +1 -1
@@ -7,7 +7,7 @@#include <linux/ktime.h> #include <linux/pm_qos.h> #include <linux/tracepoint.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #define TPS (x) tracepoint_string(x)
include/trace/syscall.h +1 -1
@@ -3,7 +3,7 @@#include <linux/tracepoint.h> #include <linux/unistd.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/thread_info.h> #include <asm/ptrace.h>
include/trace/trace_events.h +1 -1
@@ -16,7 +16,7 @@* in the structure. */ -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #ifndef TRACE_SYSTEM_VAR #define TRACE_SYSTEM_VAR TRACE_SYSTEM
kernel/events/core.c +1 -1
@@ -36,7 +36,7 @@#include <linux/kernel_stat.h> #include <linux/cgroup.h> #include <linux/perf_event.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/hw_breakpoint.h> #include <linux/mm_types.h> #include <linux/module.h>
kernel/module.c +1 -1
@@ -18,7 +18,7 @@*/ #include <linux/export.h> #include <linux/moduleloader.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/init.h> #include <linux/kallsyms.h> #include <linux/file.h>
kernel/rcu/tiny.c +1 -1
@@ -35,7 +35,7 @@#include <linux/time.h> #include <linux/cpu.h> #include <linux/prefetch.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include "rcu.h"
kernel/rcu/tree.c +1 -1
@@ -54,7 +54,7 @@#include <linux/delay.h> #include <linux/stop_machine.h> #include <linux/random.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/suspend.h> #include "tree.h"
kernel/trace/ring_buffer.c +1 -1
@@ -3,7 +3,7 @@* * Copyright (C) 2008 Steven Rostedt <[email protected]> */ -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/ring_buffer.h> #include <linux/trace_clock.h> #include <linux/trace_seq.h>
kernel/trace/trace.h +2 -2
@@ -12,7 +12,7 @@#include <linux/ftrace.h> #include <linux/hw_breakpoint.h> #include <linux/trace_seq.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/compiler.h> #include <linux/trace_seq.h>
@@ -1180,7 +1180,7 @@ struct event_trigger_ops {* commands need to do this if they themselves log to the trace * buffer (see the @post_trigger() member below). @trigger_type * values are defined by adding new values to the trigger_type -* enum in include/linux/ftrace_event.h. +* enum in include/linux/trace_events.h. * * @post_trigger: A flag that says whether or not this command needs * to have its action delayed until after the current event has
mm/debug.c +1 -1
@@ -7,7 +7,7 @@#include <linux/kernel.h> #include <linux/mm.h> -#include <linux/ftrace_event.h> +#include <linux/trace_events.h> #include <linux/memcontrol.h> static const struct trace_print_flags pageflag_names[] = {
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 4/19 tracing: Rename ftrace_print_*() functions ta trace_print_*()
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
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_*().
--- include/linux/trace_events.h | 30 +++++++++++++++--------------- include/trace/trace_events.h | 12 ++++++------ kernel/trace/trace_output.c | 34 +++++++++++++++++----------------- 3 files changed, 38 insertions(+), 38 deletions(-)
include/linux/trace_events.h +15 -15
@@ -1,6 +1,6 @@ -#ifndef _LINUX_FTRACE_EVENT_H -#define _LINUX_FTRACE_EVENT_H +#ifndef _LINUX_TRACE_EVENT_H +#define _LINUX_TRACE_EVENT_H#include <linux/ring_buffer.h> #include <linux/trace_seq.h>
@@ -25,27 +25,27 @@ struct trace_print_flags_u64 {const char *name; }; -const char *ftrace_print_flags_seq (struct trace_seq *p,const char *delim, -unsigned long flags, -const struct trace_print_flags *flag_array); +const char *trace_print_flags_seq (struct trace_seq *p,const char *delim, +unsigned long flags, +const struct trace_print_flags *flag_array); -const char *ftrace_print_symbols_seq (struct trace_seq *p,unsigned long val, -const struct trace_print_flags *symbol_array); +const char *trace_print_symbols_seq (struct trace_seq *p,unsigned long val, +const struct trace_print_flags *symbol_array);#if BITS_PER_LONG ==32 -const char *ftrace_print_symbols_seq_u64 (struct trace_seq *p, -unsigned long long val, -const struct trace_print_flags_u64 +const char *trace_print_symbols_seq_u64 (struct trace_seq *p, +unsigned long long val, +const struct trace_print_flags_u64 *symbol_array);#endif -const char *ftrace_print_bitmask_seq (struct trace_seq *p,void *bitmask_ptr, -unsigned int bitmask_size); +const char *trace_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); +const char *trace_print_hex_seq (struct trace_seq *p, +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,size_t el_size);
include/trace/trace_events.h +6 -6
@@ -258,7 +258,7 @@ TRACE_MAKE_SYSTEM_STR();void *__bitmask =__get_dynamic_array (field); \unsigned int __bitmask_size; \ __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
@@ -266,7 +266,7 @@ TRACE_MAKE_SYSTEM_STR(); ({ \static const struct trace_print_flags __flags[] = \ { flag_array, {-1 ,NULL }}; \ -ftrace_print_flags_seq (p, delim, flag, __flags); \ +trace_print_flags_seq (p, delim, flag, __flags); \ })#undef __print_symbolic
@@ -274,7 +274,7 @@ TRACE_MAKE_SYSTEM_STR(); ({ \static const struct trace_print_flags symbols[] = \ { symbol_array, {-1 ,NULL }}; \ -ftrace_print_symbols_seq (p, value, symbols); \ +trace_print_symbols_seq (p, value, symbols); \ })#undef __print_symbolic_u64
@@ -283,7 +283,7 @@ TRACE_MAKE_SYSTEM_STR(); ({ \static const struct trace_print_flags_u64 symbols[] = \ { symbol_array, {-1 ,NULL } }; \ -ftrace_print_symbols_seq_u64 (p, value, symbols); \ +trace_print_symbols_seq_u64 (p, value, symbols); \ })#else #define __print_symbolic_u64(value, symbol_array...) \
@@ -291,14 +291,14 @@ TRACE_MAKE_SYSTEM_STR();#endif #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#define __print_array (array, count, el_size) \ ({ \ BUILD_BUG_ON(el_size != 1 && el_size != 2 && \ 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
kernel/trace/trace_output.c +17 -17
@@ -60,9 +60,9 @@ enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter) }const char * -ftrace_print_flags_seq (struct trace_seq *p,const char *delim, -unsigned long flags, -const struct trace_print_flags *flag_array) +trace_print_flags_seq (struct trace_seq *p,const char *delim, +unsigned long flags, +const struct trace_print_flags *flag_array) {unsigned long mask;const char *str;
@@ -95,11 +95,11 @@ ftrace_print_flags_seq(struct trace_seq *p, const char *delim,return ret; } -EXPORT_SYMBOL (ftrace_print_flags_seq); +EXPORT_SYMBOL (trace_print_flags_seq);const char * -ftrace_print_symbols_seq (struct trace_seq *p,unsigned long val, -const struct trace_print_flags *symbol_array) +trace_print_symbols_seq (struct trace_seq *p,unsigned long val, +const struct trace_print_flags *symbol_array) {int i;const char *ret =trace_seq_buffer_ptr (p);
@@ -120,11 +120,11 @@ ftrace_print_symbols_seq(struct trace_seq *p, unsigned long val,return ret; } -EXPORT_SYMBOL (ftrace_print_symbols_seq); +EXPORT_SYMBOL (trace_print_symbols_seq);#if BITS_PER_LONG ==32 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) {int i;
@@ -146,12 +146,12 @@ ftrace_print_symbols_seq_u64(struct trace_seq *p, unsigned long long val, return ret; } -EXPORT_SYMBOL (ftrace_print_symbols_seq_u64); +EXPORT_SYMBOL (trace_print_symbols_seq_u64);#endif const char * -ftrace_print_bitmask_seq (struct trace_seq *p,void *bitmask_ptr, -unsigned int bitmask_size) +trace_print_bitmask_seq (struct trace_seq *p,void *bitmask_ptr, +unsigned int bitmask_size) {const char *ret =trace_seq_buffer_ptr (p);
@@ -160,10 +160,10 @@ ftrace_print_bitmask_seq(struct trace_seq *p, void *bitmask_ptr,return ret; } -EXPORT_SYMBOL_GPL (ftrace_print_bitmask_seq); +EXPORT_SYMBOL_GPL (trace_print_bitmask_seq);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;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)return ret; } -EXPORT_SYMBOL (ftrace_print_hex_seq); +EXPORT_SYMBOL (trace_print_hex_seq);const char * -ftrace_print_array_seq (struct trace_seq *p,const void *buf,int count, -size_t el_size) +trace_print_array_seq (struct trace_seq *p,const void *buf,int count, +size_t el_size) {const char *ret =trace_seq_buffer_ptr (p);const char *prefix ="" ;
@@ -220,7 +220,7 @@ ftrace_print_array_seq(struct trace_seq *p, const void *buf, int count,return ret; } -EXPORT_SYMBOL (ftrace_print_array_seq); +EXPORT_SYMBOL (trace_print_array_seq);int ftrace_raw_output_prep (struct trace_iterator *iter,struct trace_event *trace_event)
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 5/19 tracing: Rename (un)register_ftrace_event() to (un)register_trace_event()
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The functions (un)register_ftrace_event() is really about trace_events, and the name should be register_trace_event() instead.
Also renamed ftrace_event_reg() to trace_event_reg() for the same reason.
--- include/linux/trace_events.h | 6 +++--- include/trace/perf.h | 4 ++-- kernel/trace/blktrace.c | 4 ++-- kernel/trace/trace_branch.c | 2 +- kernel/trace/trace_events.c | 10 +++++----- kernel/trace/trace_functions_graph.c | 4 ++-- kernel/trace/trace_kprobe.c | 4 ++-- kernel/trace/trace_output.c | 18 +++++++++--------- kernel/trace/trace_output.h | 2 +- kernel/trace/trace_uprobe.c | 4 ++-- 10 files changed, 29 insertions(+), 29 deletions(-)
include/linux/trace_events.h +3 -3
@@ -132,8 +132,8 @@ struct trace_event {struct trace_event_functions *funcs; }; -extern int register_ftrace_event (struct trace_event *event); -extern int unregister_ftrace_event (struct trace_event *event); +extern int register_trace_event (struct trace_event *event); +extern int unregister_trace_event (struct trace_event *event);/* Return values for print_line callback */ enum print_line_t {
@@ -216,7 +216,7 @@ struct ftrace_event_class {int (*raw_init)(struct ftrace_event_call *); }; -extern int ftrace_event_reg (struct ftrace_event_call *event, +extern int trace_event_reg (struct ftrace_event_call *event,enum trace_reg type,void *data);struct ftrace_event_buffer {
include/trace/perf.h +2 -2
@@ -69,7 +69,7 @@* .fields = LIST_HEAD_INIT(event_class_##call.fields), * .raw_init = trace_event_raw_init, * .probe = ftrace_raw_event_##call, -* .reg = ftrace_event_reg, +* .reg = trace_event_reg, * }; * * static struct ftrace_event_call event_<call> = {
@@ -219,7 +219,7 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \ .fields = LIST_HEAD_INIT(event_class_##call.fields),\ .raw_init = trace_event_raw_init, \ .probe = ftrace_raw_event_##call, \ - .reg = ftrace_event_reg, \ + .reg = trace_event_reg, \ _TRACE_PERF_INIT(call) \ };
kernel/trace/blktrace.c +2 -2
@@ -1450,14 +1450,14 @@ static struct trace_event trace_blk_event = {static int __init init_blk_tracer (void ) { -if (!register_ftrace_event (&trace_blk_event)) { +if (!register_trace_event (&trace_blk_event)) {pr_warning ("Warning: could not register block events\n" );return 1 ; }if (register_tracer (&blk_tracer) !=0 ) {pr_warning ("Warning: could not register the block tracer\n" ); -unregister_ftrace_event (&trace_blk_event); +unregister_trace_event (&trace_blk_event);return 1 ; }
kernel/trace/trace_branch.c +1 -1
@@ -191,7 +191,7 @@ __init static int init_branch_tracer(void) {int ret; - ret =register_ftrace_event (&trace_branch_event); + ret =register_trace_event (&trace_branch_event);if (!ret) {printk (KERN_WARNING "Warning: could not register " "branch events\n" );
kernel/trace/trace_events.c +5 -5
@@ -182,7 +182,7 @@ int trace_event_raw_init(struct ftrace_event_call *call) {int id; - id =register_ftrace_event (&call->event); + id =register_trace_event (&call->event);if (!id)return -ENODEV ;
@@ -252,8 +252,8 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer) }EXPORT_SYMBOL_GPL (ftrace_event_buffer_commit); -int ftrace_event_reg (struct ftrace_event_call *call, -enum trace_reg type,void *data) +int trace_event_reg (struct ftrace_event_call *call, +enum trace_reg type,void *data) {struct ftrace_event_file *file = data;
@@ -288,7 +288,7 @@ int ftrace_event_reg(struct ftrace_event_call *call, }return 0 ; } -EXPORT_SYMBOL_GPL (ftrace_event_reg); +EXPORT_SYMBOL_GPL (trace_event_reg);void trace_event_enable_cmd_record (bool enable) {
@@ -1673,7 +1673,7 @@ static void event_remove(struct ftrace_event_call *call) }while_for_each_event_file ();if (call->event.funcs) -__unregister_ftrace_event (&call->event); +__unregister_trace_event (&call->event);remove_event_from_tracers (call);list_del (&call->list); }
kernel/trace/trace_functions_graph.c +2 -2
@@ -1454,12 +1454,12 @@ static __init int init_graph_trace(void) { max_bytes_for_cpu =snprintf (NULL ,0 ,"%d" , nr_cpu_ids -1 ); -if (!register_ftrace_event (&graph_trace_entry_event)) { +if (!register_trace_event (&graph_trace_entry_event)) {pr_warning ("Warning: could not register graph trace events\n" );return 1 ; } -if (!register_ftrace_event (&graph_trace_ret_event)) { +if (!register_trace_event (&graph_trace_ret_event)) {pr_warning ("Warning: could not register graph trace events\n" );return 1 ; }
kernel/trace/trace_kprobe.c +2 -2
@@ -1290,7 +1290,7 @@ static int register_kprobe_event(struct trace_kprobe *tk) }if (set_print_fmt (&tk->tp,trace_kprobe_is_return (tk)) <0 )return -ENOMEM ; - ret =register_ftrace_event (&call->event); + ret =register_trace_event (&call->event);if (!ret) {kfree (call->print_fmt);return -ENODEV ;
@@ -1303,7 +1303,7 @@ static int register_kprobe_event(struct trace_kprobe *tk)pr_info ("Failed to register kprobe event: %s\n" ,ftrace_event_name (call));kfree (call->print_fmt); -unregister_ftrace_event (&call->event); +unregister_trace_event (&call->event); }return ret; }
kernel/trace/trace_output.c +9 -9
@@ -693,7 +693,7 @@ void trace_event_read_unlock(void) }/** -* register_ftrace_event - register output for an event type +* register_trace_event - register output for an event type * @event: the event type to register * * Event types are stored in a hash and this hash is used to
@@ -707,7 +707,7 @@ void trace_event_read_unlock(void)* * Returns the event type number or zero on error. */ -int register_ftrace_event (struct trace_event *event) +int register_trace_event (struct trace_event *event) {unsigned key;int ret =0 ;
@@ -771,12 +771,12 @@ int register_ftrace_event(struct trace_event *event)return ret; } -EXPORT_SYMBOL_GPL (register_ftrace_event); +EXPORT_SYMBOL_GPL (register_trace_event);/* * Used by module code with the trace_event_sem held for write. */ -int __unregister_ftrace_event (struct trace_event *event) +int __unregister_trace_event (struct trace_event *event) {hlist_del (&event->node);list_del (&event->list);
@@ -784,18 +784,18 @@ int __unregister_ftrace_event(struct trace_event *event) }/** -* unregister_ftrace_event - remove a no longer used event +* unregister_trace_event - remove a no longer used event * @event: the event to remove */ -int unregister_ftrace_event (struct trace_event *event) +int unregister_trace_event (struct trace_event *event) {down_write (&trace_event_sem); -__unregister_ftrace_event (event); +__unregister_trace_event (event);up_write (&trace_event_sem);return 0 ; } -EXPORT_SYMBOL_GPL (unregister_ftrace_event); +EXPORT_SYMBOL_GPL (unregister_trace_event);/* * Standard events
@@ -1243,7 +1243,7 @@ __init static int init_events(void)for (i =0 ; events[i]; i++) { event = events[i]; - ret =register_ftrace_event (event); + ret =register_trace_event (event);if (!ret) {printk (KERN_WARNING "event %d failed to register\n" , event->type);
kernel/trace/trace_output.h +1 -1
@@ -32,7 +32,7 @@ extern int trace_print_lat_fmt(struct trace_seq *s, struct trace_entry *entry);/* used by module unregistering */ -extern int __unregister_ftrace_event (struct trace_event *event); +extern int __unregister_trace_event (struct trace_event *event);extern struct rw_semaphore trace_event_sem;#define SEQ_PUT_FIELD (s, x) \
kernel/trace/trace_uprobe.c +2 -2
@@ -1283,7 +1283,7 @@ static int register_uprobe_event(struct trace_uprobe *tu)if (set_print_fmt (&tu->tp,is_ret_probe (tu)) <0 )return -ENOMEM ; - ret =register_ftrace_event (&call->event); + ret =register_trace_event (&call->event);if (!ret) {kfree (call->print_fmt);return -ENODEV ;
@@ -1297,7 +1297,7 @@ static int register_uprobe_event(struct trace_uprobe *tu)pr_info ("Failed to register uprobe event: %s\n" ,ftrace_event_name (call));kfree (call->print_fmt); -unregister_ftrace_event (&call->event); +unregister_trace_event (&call->event); }return ret;
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 6/19 tracing: Rename ftrace_event_file to trace_event_file
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The structure ftrace_event_file is really about trace events and not "ftrace". Rename it to trace_event_file.
--- include/linux/trace_events.h | 24 +++++----- include/trace/perf.h | 24 +++++----- kernel/trace/trace.c | 8 ++-- kernel/trace/trace.h | 24 +++++----- kernel/trace/trace_events.c | 92 ++++++++++++++++++------------------- kernel/trace/trace_events_filter.c | 30 ++++++------ kernel/trace/trace_events_trigger.c | 52 ++++++++++----------- kernel/trace/trace_kprobe.c | 32 ++++++------- kernel/trace/trace_probe.h | 4 +- kernel/trace/trace_syscalls.c | 32 ++++++------- kernel/trace/trace_uprobe.c | 16 +++---- 11 files changed, 169 insertions(+), 169 deletions(-)
include/linux/trace_events.h +12 -12
@@ -157,11 +157,11 @@ static inline enum print_line_t trace_handle_return(struct trace_seq *s)void tracing_generic_entry_update (struct trace_entry *entry,unsigned long flags,int pc); -struct ftrace_event_file ; +struct trace_event_file ;struct ring_buffer_event *trace_event_buffer_lock_reserve (struct ring_buffer **current_buffer, -struct ftrace_event_file *ftrace_file, +struct trace_event_file *trace_file,int type,unsigned long len,unsigned long flags,int pc); struct ring_buffer_event *
@@ -222,14 +222,14 @@ extern int trace_event_reg(struct ftrace_event_call *event,struct ftrace_event_buffer {struct ring_buffer *buffer;struct ring_buffer_event *event; -struct ftrace_event_file *ftrace_file; +struct trace_event_file *trace_file;void *entry;unsigned long flags;int pc; };void *ftrace_event_buffer_reserve (struct ftrace_event_buffer *fbuffer, -struct ftrace_event_file *ftrace_file, +struct trace_event_file *trace_file,unsigned long len);void ftrace_event_buffer_commit (struct ftrace_event_buffer *fbuffer);
@@ -349,7 +349,7 @@ enum { FTRACE_EVENT_FL_TRIGGER_COND = (1 << FTRACE_EVENT_FL_TRIGGER_COND_BIT), }; -struct ftrace_event_file { +struct trace_event_file {struct list_head list;struct ftrace_event_call *event_call;struct event_filter *filter;
@@ -414,15 +414,15 @@ enum event_trigger_type {extern int filter_match_preds (struct event_filter *filter,void *rec); -extern int filter_check_discard (struct ftrace_event_file *file,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,struct ring_buffer *buffer,struct ring_buffer_event *event); -extern enum event_trigger_type event_triggers_call (struct ftrace_event_file *file, +extern enum event_trigger_type event_triggers_call (struct trace_event_file *file,void *rec); -extern void event_triggers_post_call (struct ftrace_event_file *file, +extern void event_triggers_post_call (struct trace_event_file *file,enum event_trigger_type tt);/**
@@ -435,7 +435,7 @@ extern void event_triggers_post_call(struct ftrace_event_file *file,* otherwise false. */ static inline bool -ftrace_trigger_soft_disabled (struct ftrace_event_file *file) +ftrace_trigger_soft_disabled (struct trace_event_file *file) {unsigned long eflags = file->flags;
@@ -462,7 +462,7 @@ ftrace_trigger_soft_disabled(struct ftrace_event_file *file)* Returns true if the event is discarded, false otherwise. */ static inline bool -__event_trigger_test_discard(struct ftrace_event_file *file, +__event_trigger_test_discard(struct trace_event_file *file, struct ring_buffer *buffer, struct ring_buffer_event *event, void *entry,
@@ -495,7 +495,7 @@ __event_trigger_test_discard(struct ftrace_event_file *file,* if the event is soft disabled and should be discarded. */ static inline void -event_trigger_unlock_commit (struct ftrace_event_file *file, +event_trigger_unlock_commit (struct trace_event_file *file,struct ring_buffer *buffer,struct ring_buffer_event *event,void *entry,unsigned long irq_flags,int pc)
@@ -526,7 +526,7 @@ event_trigger_unlock_commit(struct ftrace_event_file *file,* trace_buffer_unlock_commit_regs() instead of trace_buffer_unlock_commit(). */ static inline void -event_trigger_unlock_commit_regs(struct ftrace_event_file *file, +event_trigger_unlock_commit_regs(struct trace_event_file *file, struct ring_buffer *buffer, struct ring_buffer_event *event, void *entry, unsigned long irq_flags, int pc,
include/trace/perf.h +12 -12
@@ -9,10 +9,10 @@* * static void ftrace_raw_event_<call>(void *__data, proto) * { -* struct ftrace_event_file *ftrace_file = __data; -* struct ftrace_event_call *event_call = ftrace_file->event_call; +* struct trace_event_file *trace_file = __data; +* struct ftrace_event_call *event_call = trace_file->event_call; * struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; -* unsigned long eflags = ftrace_file->flags; +* unsigned long eflags = trace_file->flags; * enum event_trigger_type __tt = ETT_NONE; * struct ring_buffer_event *event; * struct ftrace_raw_<call> *entry; <-- defined in stage 1
@@ -23,7 +23,7 @@* * if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) { * if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE) -* event_triggers_call(ftrace_file, NULL); +* event_triggers_call(trace_file, NULL); * if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED) * return; * }
@@ -33,7 +33,7 @@* * __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); * -* event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, +* event = trace_event_buffer_lock_reserve(&buffer, trace_file, * event_<call>->event.type, * sizeof(*entry) + __data_size, * irq_flags, pc);
@@ -45,16 +45,16 @@* __array macros. * * if (eflags & FTRACE_EVENT_FL_TRIGGER_COND) -* __tt = event_triggers_call(ftrace_file, entry); +* __tt = event_triggers_call(trace_file, entry); * * if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, -* &ftrace_file->flags)) +* &trace_file->flags)) * ring_buffer_discard_commit(buffer, event); -* else if (!filter_check_discard(ftrace_file, entry, buffer, event)) +* else if (!filter_check_discard(trace_file, entry, buffer, event)) * trace_buffer_unlock_commit(buffer, event, irq_flags, pc); * * if (__tt) -* event_triggers_post_call(ftrace_file, __tt); +* event_triggers_post_call(trace_file, __tt); * } * * static struct trace_event ftrace_event_type_<call> = {
@@ -153,18 +153,18 @@ static notrace void \ ftrace_raw_event_##call(void *__data, proto) \ { \ - struct ftrace_event_file *ftrace_file = __data; \ + struct trace_event_file *trace_file = __data; \ struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ struct ftrace_event_buffer fbuffer; \ struct ftrace_raw_##call *entry; \ int __data_size; \ \ - if (ftrace_trigger_soft_disabled(ftrace_file)) \ + if (ftrace_trigger_soft_disabled(trace_file)) \ return; \ \ __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ \ - entry = ftrace_event_buffer_reserve(&fbuffer, ftrace_file, \ + entry = ftrace_event_buffer_reserve(&fbuffer, trace_file, \ sizeof(*entry) + __data_size); \ \ if (!entry) \
kernel/trace/trace.c +4 -4
@@ -297,7 +297,7 @@ void trace_array_put(struct trace_array *this_tr)mutex_unlock (&trace_types_lock); } -int filter_check_discard (struct ftrace_event_file *file,void *rec, +int filter_check_discard (struct trace_event_file *file,void *rec,struct ring_buffer *buffer,struct ring_buffer_event *event) {
@@ -1694,13 +1694,13 @@ static struct ring_buffer *temp_buffer;struct ring_buffer_event *trace_event_buffer_lock_reserve (struct ring_buffer **current_rb, -struct ftrace_event_file *ftrace_file, +struct trace_event_file *trace_file,int type,unsigned long len,unsigned long flags,int pc) {struct ring_buffer_event *entry; - *current_rb = ftrace_file->tr->trace_buffer.buffer; + *current_rb = trace_file->tr->trace_buffer.buffer; entry =trace_buffer_lock_reserve (*current_rb, type, len, flags, pc);/*
@@ -1709,7 +1709,7 @@ trace_event_buffer_lock_reserve(struct ring_buffer **current_rb,* to store the trace event for the tigger to use. It's recusive * safe and will not be recorded anywhere. */ -if (!entry && ftrace_file->flags &FTRACE_EVENT_FL_TRIGGER_COND ) { +if (!entry && trace_file->flags &FTRACE_EVENT_FL_TRIGGER_COND ) { *current_rb = temp_buffer; entry =trace_buffer_lock_reserve (*current_rb, type, len, flags, pc);
kernel/trace/trace.h +12 -12
@@ -211,8 +211,8 @@ struct trace_array {#ifdef CONFIG_FTRACE_SYSCALLS int sys_refcount_enter;int sys_refcount_exit; -struct ftrace_event_file __rcu *enter_syscall_files[NR_syscalls]; -struct ftrace_event_file __rcu *exit_syscall_files[NR_syscalls]; +struct trace_event_file __rcu *enter_syscall_files[NR_syscalls]; +struct trace_event_file __rcu *exit_syscall_files[NR_syscalls];#endif int stop_count;int clock_id;
@@ -1052,9 +1052,9 @@ struct filter_pred {extern enum regex_type filter_parse_regex (char *buff,int len,char **search,int *not); -extern void print_event_filter (struct ftrace_event_file *file, +extern void print_event_filter (struct trace_event_file *file,struct trace_seq *s); -extern int apply_event_filter (struct ftrace_event_file *file, +extern int apply_event_filter (struct trace_event_file *file,char *filter_string);extern int apply_subsystem_event_filter (struct ftrace_subsystem_dir *dir,char *filter_string);
@@ -1073,9 +1073,9 @@ extern void trace_event_enable_cmd_record(bool enable);extern int event_trace_add_tracer (struct dentry *parent,struct trace_array *tr);extern int event_trace_del_tracer (struct trace_array *tr); -extern struct ftrace_event_file *find_event_file (struct trace_array *tr, -const char *system, -const char *event); +extern struct trace_event_file *find_event_file (struct trace_array *tr, +const char *system, +const char *event);static inline void *event_file_data (struct file *filp) {
@@ -1242,23 +1242,23 @@ struct event_command {enum event_trigger_type trigger_type;bool post_trigger;int (*func)(struct event_command *cmd_ops, -struct ftrace_event_file *file, +struct trace_event_file *file,char *glob,char *cmd,char *params);int (*reg)(char *glob,struct event_trigger_ops *ops,struct event_trigger_data *data, -struct ftrace_event_file *file); +struct trace_event_file *file);void (*unreg)(char *glob,struct event_trigger_ops *ops,struct event_trigger_data *data, -struct ftrace_event_file *file); +struct trace_event_file *file);int (*set_filter)(char *filter_str,struct event_trigger_data *data, -struct ftrace_event_file *file); +struct trace_event_file *file);struct event_trigger_ops *(*get_trigger_ops)(char *cmd,char *param); }; -extern int trace_event_enable_disable (struct ftrace_event_file *file, +extern int trace_event_enable_disable (struct trace_event_file *file,int enable,int soft_disable);extern int tracing_alloc_snapshot (void );
kernel/trace/trace_events.c +46 -46
345 lines not on this page · raw message
kernel/trace/trace_events_filter.c +15 -15
@@ -643,7 +643,7 @@ static void append_filter_err(struct filter_parse_state *ps,free_page ((unsigned long ) buf); } -static inline struct event_filter *event_filter (struct ftrace_event_file *file) +static inline struct event_filter *event_filter (struct trace_event_file *file) {if (file->event_call->flags &TRACE_EVENT_FL_USE_CALL_FILTER )return file->event_call->filter;
@@ -652,7 +652,7 @@ static inline struct event_filter *event_filter(struct ftrace_event_file *file) }/* caller must hold event_mutex */ -void print_event_filter (struct ftrace_event_file *file,struct trace_seq *s) +void print_event_filter (struct trace_event_file *file,struct trace_seq *s) {struct event_filter *filter =event_filter (file);
@@ -780,7 +780,7 @@ static void __free_preds(struct event_filter *filter) filter->n_preds =0 ; } -static void filter_disable (struct ftrace_event_file *file) +static void filter_disable (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -837,7 +837,7 @@ static int __alloc_preds(struct event_filter *filter, int n_preds)return 0 ; } -static inline void __remove_filter (struct ftrace_event_file *file) +static inline void __remove_filter (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -851,7 +851,7 @@ static inline void __remove_filter(struct ftrace_event_file *file)static void filter_free_subsystem_preds (struct ftrace_subsystem_dir *dir,struct trace_array *tr) { -struct ftrace_event_file *file; +struct trace_event_file *file;list_for_each_entry (file, &tr->events, list) {if (file->system != dir)
@@ -860,7 +860,7 @@ static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir, } } -static inline void __free_subsystem_filter (struct ftrace_event_file *file) +static inline void __free_subsystem_filter (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -876,7 +876,7 @@ static inline void __free_subsystem_filter(struct ftrace_event_file *file)static void filter_free_subsystem_filters (struct ftrace_subsystem_dir *dir,struct trace_array *tr) { -struct ftrace_event_file *file; +struct trace_event_file *file;list_for_each_entry (file, &tr->events, list) {if (file->system != dir)
@@ -1662,7 +1662,7 @@ fail:return err; } -static inline void event_set_filtered_flag (struct ftrace_event_file *file) +static inline void event_set_filtered_flag (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -1672,7 +1672,7 @@ static inline void event_set_filtered_flag(struct ftrace_event_file *file) file->flags |=FTRACE_EVENT_FL_FILTERED ; } -static inline void event_set_filter (struct ftrace_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;
@@ -1683,7 +1683,7 @@ static inline void event_set_filter(struct ftrace_event_file *file,rcu_assign_pointer (file->filter, filter); } -static inline void event_clear_filter (struct ftrace_event_file *file) +static inline void event_clear_filter (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -1694,7 +1694,7 @@ static inline void event_clear_filter(struct ftrace_event_file *file) }static inline void -event_set_no_set_filter_flag (struct ftrace_event_file *file) +event_set_no_set_filter_flag (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -1705,7 +1705,7 @@ event_set_no_set_filter_flag(struct ftrace_event_file *file) }static inline void -event_clear_no_set_filter_flag (struct ftrace_event_file *file) +event_clear_no_set_filter_flag (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -1716,7 +1716,7 @@ event_clear_no_set_filter_flag(struct ftrace_event_file *file) }static inline bool -event_no_set_filter_flag (struct ftrace_event_file *file) +event_no_set_filter_flag (struct trace_event_file *file) {struct ftrace_event_call *call = file->event_call;
@@ -1740,7 +1740,7 @@ static int replace_system_preds(struct ftrace_subsystem_dir *dir,struct filter_parse_state *ps, char *filter_string) { - struct ftrace_event_file *file; + struct trace_event_file *file;struct filter_list *filter_item;struct filter_list *tmp;LIST_HEAD (filter_list);
@@ -1961,7 +1961,7 @@ static int create_system_filter(struct ftrace_subsystem_dir *dir, }/* caller must hold event_mutex */ -int apply_event_filter (struct ftrace_event_file *file,char *filter_string) +int apply_event_filter (struct trace_event_file *file,char *filter_string) {struct ftrace_event_call *call = file->event_call;struct event_filter *filter;
kernel/trace/trace_events_trigger.c +26 -26
204 lines not on this page · raw message
kernel/trace/trace_kprobe.c +16 -16
@@ -359,7 +359,7 @@ static struct trace_kprobe *find_trace_kprobe(const char *event,* if the file is NULL, enable "perf" handler, or enable "trace" handler. */ static int -enable_trace_kprobe (struct trace_kprobe *tk,struct ftrace_event_file *file) +enable_trace_kprobe (struct trace_kprobe *tk,struct trace_event_file *file) {int ret =0 ;
@@ -394,7 +394,7 @@ enable_trace_kprobe(struct trace_kprobe *tk, struct ftrace_event_file *file)* if the file is NULL, disable "perf" handler, or disable "trace" handler. */ static int -disable_trace_kprobe (struct trace_kprobe *tk,struct ftrace_event_file *file) +disable_trace_kprobe (struct trace_kprobe *tk,struct trace_event_file *file) {struct event_file_link *link =NULL ;int wait =0 ;
@@ -917,7 +917,7 @@ static const struct file_operations kprobe_profile_ops = {/* Kprobe handler */ static nokprobe_inline void__kprobe_trace_func (struct trace_kprobe *tk,struct pt_regs *regs, -struct ftrace_event_file *ftrace_file) +struct trace_event_file *trace_file) {struct kprobe_trace_entry_head *entry;struct ring_buffer_event *event;
@@ -926,9 +926,9 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,unsigned long irq_flags;struct ftrace_event_call *call = &tk->tp.call; -WARN_ON (call != ftrace_file->event_call); +WARN_ON (call != trace_file->event_call); -if (ftrace_trigger_soft_disabled (ftrace_file)) +if (ftrace_trigger_soft_disabled (trace_file))return ;local_save_flags (irq_flags);
@@ -937,7 +937,7 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs, dsize =__get_data_size (&tk->tp, regs); size =sizeof (*entry) + tk->tp.size + dsize; - event =trace_event_buffer_lock_reserve (&buffer, ftrace_file, + event =trace_event_buffer_lock_reserve (&buffer, trace_file, call->event.type, size, irq_flags, pc);if (!event)
@@ -947,7 +947,7 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs, entry->ip = (unsigned long )tk->rp.kp.addr;store_trace_args (sizeof (*entry), &tk->tp, regs, (u8 *)&entry[1 ], dsize); -event_trigger_unlock_commit_regs (ftrace_file, buffer, event, +event_trigger_unlock_commit_regs (trace_file, buffer, event, entry, irq_flags, pc, regs); }
@@ -965,7 +965,7 @@ NOKPROBE_SYMBOL(kprobe_trace_func); static nokprobe_inline void__kretprobe_trace_func (struct trace_kprobe *tk,struct kretprobe_instance *ri,struct pt_regs *regs, -struct ftrace_event_file *ftrace_file) +struct trace_event_file *trace_file) {struct kretprobe_trace_entry_head *entry;struct ring_buffer_event *event;
@@ -974,9 +974,9 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,unsigned long irq_flags;struct ftrace_event_call *call = &tk->tp.call; -WARN_ON (call != ftrace_file->event_call); +WARN_ON (call != trace_file->event_call); -if (ftrace_trigger_soft_disabled (ftrace_file)) +if (ftrace_trigger_soft_disabled (trace_file))return ;local_save_flags (irq_flags);
@@ -985,7 +985,7 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri, dsize =__get_data_size (&tk->tp, regs); size =sizeof (*entry) + tk->tp.size + dsize; - event =trace_event_buffer_lock_reserve (&buffer, ftrace_file, + event =trace_event_buffer_lock_reserve (&buffer, trace_file, call->event.type, size, irq_flags, pc);if (!event)
@@ -996,7 +996,7 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri, entry->ret_ip = (unsigned long )ri->ret_addr;store_trace_args (sizeof (*entry), &tk->tp, regs, (u8 *)&entry[1 ], dsize); -event_trigger_unlock_commit_regs (ftrace_file, buffer, event, +event_trigger_unlock_commit_regs (trace_file, buffer, event, entry, irq_flags, pc, regs); }
@@ -1210,7 +1210,7 @@ static int kprobe_register(struct ftrace_event_call *event, enum trace_reg type, void *data) { struct trace_kprobe *tk = (struct trace_kprobe *)event->data; -struct ftrace_event_file *file = data; +struct trace_event_file *file = data;switch (type) {case TRACE_REG_REGISTER :
@@ -1364,10 +1364,10 @@ static __used int kprobe_trace_selftest_target(int a1, int a2, int a3,return a1 + a2 + a3 + a4 + a5 + a6; } -static struct ftrace_event_file * +static struct trace_event_file *find_trace_probe_file (struct trace_kprobe *tk,struct trace_array *tr) { -struct ftrace_event_file *file; +struct trace_event_file *file;list_for_each_entry (file, &tr->events, list)if (file->event_call == &tk->tp.call)
@@ -1385,7 +1385,7 @@ static __init int kprobe_trace_self_tests_init(void)int ret, warn =0 ;int (*target)(int ,int ,int ,int ,int ,int );struct trace_kprobe *tk; -struct ftrace_event_file *file; +struct trace_event_file *file;if (tracing_is_disabled ())return -ENODEV ;
kernel/trace/trace_probe.h +2 -2
@@ -281,7 +281,7 @@ struct trace_probe { };struct event_file_link { -struct ftrace_event_file *file; +struct trace_event_file *file;struct list_head list; };
@@ -314,7 +314,7 @@ static inline int is_good_name(const char *name) }static inline struct event_file_link * -find_event_file_link (struct trace_probe *tp,struct ftrace_event_file *file) +find_event_file_link (struct trace_probe *tp,struct trace_event_file *file) {struct event_file_link *link;
kernel/trace/trace_syscalls.c +16 -16
@@ -293,7 +293,7 @@ static int __init syscall_exit_define_fields(struct ftrace_event_call *call)static void ftrace_syscall_enter (void *data,struct pt_regs *regs,long id) {struct trace_array *tr = data; -struct ftrace_event_file *ftrace_file; +struct trace_event_file *trace_file;struct syscall_trace_enter *entry;struct syscall_metadata *sys_data;struct ring_buffer_event *event;
@@ -308,11 +308,11 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)return ;/* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE) */ - ftrace_file =rcu_dereference_sched (tr->enter_syscall_files[syscall_nr]); -if (!ftrace_file) + trace_file =rcu_dereference_sched (tr->enter_syscall_files[syscall_nr]); +if (!trace_file)return ; -if (ftrace_trigger_soft_disabled (ftrace_file)) +if (ftrace_trigger_soft_disabled (trace_file))return ; sys_data =syscall_nr_to_meta (syscall_nr);
@@ -334,14 +334,14 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id) entry->nr = syscall_nr;syscall_get_arguments (current, regs,0 , sys_data->nb_args, entry->args); -event_trigger_unlock_commit (ftrace_file, buffer, event, entry, +event_trigger_unlock_commit (trace_file, buffer, event, entry, irq_flags, pc); }static void ftrace_syscall_exit (void *data,struct pt_regs *regs,long ret) {struct trace_array *tr = data; -struct ftrace_event_file *ftrace_file; +struct trace_event_file *trace_file;struct syscall_trace_exit *entry;struct syscall_metadata *sys_data;struct ring_buffer_event *event;
@@ -355,11 +355,11 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)return ;/* Here we're inside tp handler's rcu_read_lock_sched (__DO_TRACE()) */ - ftrace_file =rcu_dereference_sched (tr->exit_syscall_files[syscall_nr]); -if (!ftrace_file) + trace_file =rcu_dereference_sched (tr->exit_syscall_files[syscall_nr]); +if (!trace_file)return ; -if (ftrace_trigger_soft_disabled (ftrace_file)) +if (ftrace_trigger_soft_disabled (trace_file))return ; sys_data =syscall_nr_to_meta (syscall_nr);
@@ -380,11 +380,11 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret) entry->nr = syscall_nr; entry->ret =syscall_get_return_value (current, regs); -event_trigger_unlock_commit (ftrace_file, buffer, event, entry, +event_trigger_unlock_commit (trace_file, buffer, event, entry, irq_flags, pc); } -static int reg_event_syscall_enter (struct ftrace_event_file *file, +static int reg_event_syscall_enter (struct trace_event_file *file,struct ftrace_event_call *call) {struct trace_array *tr = file->tr;
@@ -405,7 +405,7 @@ static int reg_event_syscall_enter(struct ftrace_event_file *file,return ret; } -static void unreg_event_syscall_enter (struct ftrace_event_file *file, +static void unreg_event_syscall_enter (struct trace_event_file *file,struct ftrace_event_call *call) {struct trace_array *tr = file->tr;
@@ -422,7 +422,7 @@ static void unreg_event_syscall_enter(struct ftrace_event_file *file,mutex_unlock (&syscall_trace_lock); } -static int reg_event_syscall_exit (struct ftrace_event_file *file, +static int reg_event_syscall_exit (struct trace_event_file *file,struct ftrace_event_call *call) {struct trace_array *tr = file->tr;
@@ -443,7 +443,7 @@ static int reg_event_syscall_exit(struct ftrace_event_file *file,return ret; } -static void unreg_event_syscall_exit (struct ftrace_event_file *file, +static void unreg_event_syscall_exit (struct trace_event_file *file,struct ftrace_event_call *call) {struct trace_array *tr = file->tr;
@@ -696,7 +696,7 @@ static void perf_sysexit_disable(struct ftrace_event_call *call)static int syscall_enter_register (struct ftrace_event_call *event,enum trace_reg type,void *data) { -struct ftrace_event_file *file = data; +struct trace_event_file *file = data;switch (type) {case TRACE_REG_REGISTER :
@@ -724,7 +724,7 @@ static int syscall_enter_register(struct ftrace_event_call *event,static int syscall_exit_register (struct ftrace_event_call *event,enum trace_reg type,void *data) { -struct ftrace_event_file *file = data; +struct trace_event_file *file = data;switch (type) {case TRACE_REG_REGISTER :
kernel/trace/trace_uprobe.c +8 -8
@@ -770,7 +770,7 @@ static void uprobe_buffer_put(struct uprobe_cpu_buffer *ucb)static void __uprobe_trace_func (struct trace_uprobe *tu,unsigned long func,struct pt_regs *regs,struct uprobe_cpu_buffer *ucb,int dsize, -struct ftrace_event_file *ftrace_file) +struct trace_event_file *trace_file) {struct uprobe_trace_entry_head *entry;struct ring_buffer_event *event;
@@ -779,17 +779,17 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,int size, esize;struct ftrace_event_call *call = &tu->tp.call; -WARN_ON (call != ftrace_file->event_call); +WARN_ON (call != trace_file->event_call);if (WARN_ON_ONCE (tu->tp.size + dsize >PAGE_SIZE ))return ; -if (ftrace_trigger_soft_disabled (ftrace_file)) +if (ftrace_trigger_soft_disabled (trace_file))return ; esize =SIZEOF_TRACE_ENTRY (is_ret_probe (tu)); size = esize + tu->tp.size + dsize; - event =trace_event_buffer_lock_reserve (&buffer, ftrace_file, + event =trace_event_buffer_lock_reserve (&buffer, trace_file, call->event.type, size,0 ,0 );if (!event)return ;
@@ -806,7 +806,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,memcpy (data, ucb->buf, tu->tp.size + dsize); -event_trigger_unlock_commit (ftrace_file, buffer, event, entry,0 ,0 ); +event_trigger_unlock_commit (trace_file, buffer, event, entry,0 ,0 ); }/* uprobe handler */
@@ -881,7 +881,7 @@ typedef bool (*filter_func_t)(struct uprobe_consumer *self, struct mm_struct *mm);static int -probe_event_enable (struct trace_uprobe *tu,struct ftrace_event_file *file, +probe_event_enable (struct trace_uprobe *tu,struct trace_event_file *file,filter_func_t filter) {bool enabled =trace_probe_is_enabled (&tu->tp);
@@ -938,7 +938,7 @@ probe_event_enable(struct trace_uprobe *tu, struct ftrace_event_file *file, }static void -probe_event_disable (struct trace_uprobe *tu,struct ftrace_event_file *file) +probe_event_disable (struct trace_uprobe *tu,struct trace_event_file *file) {if (!trace_probe_is_enabled (&tu->tp))return ;
@@ -1163,7 +1163,7 @@ trace_uprobe_register(struct ftrace_event_call *event, enum trace_reg type, void *data) {struct trace_uprobe *tu = event->data; -struct ftrace_event_file *file = data; +struct trace_event_file *file = data;switch (type) {case TRACE_REG_REGISTER :
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 7/19 tracing: Rename ftrace_event_{call,class} to trace_event_{call,class}
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
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_*.
--- include/linux/module.h | 2 +- include/linux/perf_event.h | 2 +- include/linux/syscalls.h | 12 +++--- include/linux/trace_events.h | 38 ++++++++--------- include/trace/perf.h | 22 +++++----- include/trace/syscall.h | 4 +- include/trace/trace_events.h | 6 +-- kernel/trace/trace.c | 12 +++--- kernel/trace/trace.h | 10 ++--- kernel/trace/trace_branch.c | 2 +- kernel/trace/trace_event_perf.c | 20 ++++----- kernel/trace/trace_events.c | 80 ++++++++++++++++++------------------ kernel/trace/trace_events_filter.c | 34 +++++++-------- kernel/trace/trace_export.c | 10 ++--- kernel/trace/trace_functions_graph.c | 4 +- kernel/trace/trace_kprobe.c | 18 ++++---- kernel/trace/trace_mmiotrace.c | 4 +- kernel/trace/trace_output.c | 4 +- kernel/trace/trace_probe.h | 4 +- kernel/trace/trace_sched_wakeup.c | 4 +- kernel/trace/trace_syscalls.c | 40 +++++++++--------- kernel/trace/trace_uprobe.c | 12 +++--- 22 files changed, 172 insertions(+), 172 deletions(-)
include/linux/module.h +1 -1
@@ -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;
include/linux/perf_event.h +1 -1
@@ -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;
include/linux/syscalls.h +6 -6
@@ -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;
include/linux/trace_events.h +19 -19
@@ -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 */
include/trace/perf.h +11 -11
@@ -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; \
include/trace/syscall.h +2 -2
@@ -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 )
include/trace/trace_events.h +3 -3
@@ -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; \
kernel/trace/trace.c +6 -6
@@ -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;
kernel/trace/trace.h +5 -5
@@ -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
kernel/trace/trace_branch.c +1 -1
@@ -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;
kernel/trace/trace_event_perf.c +10 -10
@@ -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 @@ fail: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 @@ out: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) {
kernel/trace/trace_events.c +40 -40
310 lines not on this page · raw message
kernel/trace/trace_events_filter.c +17 -17
@@ -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 @@ parse_operand: }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 @@ fail: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);
kernel/trace/trace_export.c +5 -5
@@ -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; }
kernel/trace/trace_functions_graph.c +2 -2
@@ -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;
kernel/trace/trace_kprobe.c +9 -9
@@ -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;
kernel/trace/trace_mmiotrace.c +2 -2
@@ -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;
kernel/trace/trace_output.c +2 -2
@@ -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) {
kernel/trace/trace_probe.h +2 -2
@@ -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;
kernel/trace/trace_sched_wakeup.c +2 -2
@@ -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;
kernel/trace/trace_syscalls.c +20 -20
@@ -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;
kernel/trace/trace_uprobe.c +6 -6
@@ -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;
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 8/19 tracing: Rename ftrace_event_buffer to trace_event_buffer.
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The ftrace_event_buffer functions and data structures are for trace_events and not for function hooks. Rename them to trace_event_buffer*.
--- include/linux/trace_events.h | 6 +++--- include/trace/perf.h | 6 +++--- kernel/trace/trace_events.c | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-)
include/linux/trace_events.h +3 -3
@@ -219,7 +219,7 @@ struct trace_event_class {extern int trace_event_reg (struct trace_event_call *event,enum trace_reg type,void *data); -struct ftrace_event_buffer { +struct trace_event_buffer {struct ring_buffer *buffer;struct ring_buffer_event *event;struct trace_event_file *trace_file;
@@ -228,11 +228,11 @@ struct ftrace_event_buffer {int pc; }; -void *ftrace_event_buffer_reserve (struct ftrace_event_buffer *fbuffer, +void *trace_event_buffer_reserve (struct trace_event_buffer *fbuffer,struct trace_event_file *trace_file,unsigned long len); -void ftrace_event_buffer_commit (struct ftrace_event_buffer *fbuffer); +void trace_event_buffer_commit (struct trace_event_buffer *fbuffer);enum {TRACE_EVENT_FL_FILTERED_BIT ,
include/trace/perf.h +3 -3
@@ -155,7 +155,7 @@ ftrace_raw_event_##call(void *__data, proto) \ { \struct trace_event_file *trace_file = __data; \ struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ - struct ftrace_event_buffer fbuffer; \ + struct trace_event_buffer fbuffer; \ struct ftrace_raw_##call *entry; \ int __data_size; \ \
@@ -164,7 +164,7 @@ ftrace_raw_event_##call(void *__data, proto) \ \ __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ \ - entry = ftrace_event_buffer_reserve(&fbuffer, trace_file, \ + entry = trace_event_buffer_reserve(&fbuffer, trace_file, \ sizeof(*entry) + __data_size); \ \ if (!entry) \
@@ -174,7 +174,7 @@ ftrace_raw_event_##call(void *__data, proto) \ \ { assign; } \ \ -ftrace_event_buffer_commit (&fbuffer); \ +trace_event_buffer_commit (&fbuffer); \ }/* * The ftrace_test_probe is compiled out, it is only here as a build time check
kernel/trace/trace_events.c +7 -7
@@ -190,9 +190,9 @@ int trace_event_raw_init(struct trace_event_call *call) }EXPORT_SYMBOL_GPL (trace_event_raw_init); -void *ftrace_event_buffer_reserve (struct ftrace_event_buffer *fbuffer, -struct trace_event_file *trace_file, -unsigned long len) +void *trace_event_buffer_reserve (struct trace_event_buffer *fbuffer, +struct trace_event_file *trace_file, +unsigned long len) {struct trace_event_call *event_call = trace_file->event_call;
@@ -210,11 +210,11 @@ void *ftrace_event_buffer_reserve(struct ftrace_event_buffer *fbuffer, fbuffer->entry =ring_buffer_event_data (fbuffer->event);return fbuffer->entry; } -EXPORT_SYMBOL_GPL (ftrace_event_buffer_reserve); +EXPORT_SYMBOL_GPL (trace_event_buffer_reserve);static DEFINE_SPINLOCK (tracepoint_iter_lock); -static void output_printk (struct ftrace_event_buffer *fbuffer) +static void output_printk (struct trace_event_buffer *fbuffer) {struct trace_event_call *event_call;struct trace_event *event;
@@ -241,7 +241,7 @@ static void output_printk(struct ftrace_event_buffer *fbuffer)spin_unlock_irqrestore (&tracepoint_iter_lock, flags); } -void ftrace_event_buffer_commit (struct ftrace_event_buffer *fbuffer) +void trace_event_buffer_commit (struct trace_event_buffer *fbuffer) {if (tracepoint_printk)output_printk (fbuffer);
@@ -250,7 +250,7 @@ void ftrace_event_buffer_commit(struct ftrace_event_buffer *fbuffer) fbuffer->event, fbuffer->entry, fbuffer->flags, fbuffer->pc); } -EXPORT_SYMBOL_GPL (ftrace_event_buffer_commit); +EXPORT_SYMBOL_GPL (trace_event_buffer_commit);int trace_event_reg (struct trace_event_call *call,enum trace_reg type,void *data)
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 9/19 tracing: Rename ftrace_output functions to trace_output
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The ftrace_output_*() and ftrace_raw_output_*() functions represent the trace_event code. Rename them to just trace_output or trace_raw_output.
--- include/linux/trace_events.h | 6 +++--- include/trace/perf.h | 2 +- include/trace/trace_events.h | 16 ++++++++-------- kernel/trace/trace_output.c | 16 ++++++++-------- 4 files changed, 20 insertions(+), 20 deletions(-)
include/linux/trace_events.h +3 -3
@@ -52,8 +52,8 @@ const char *trace_print_array_seq(struct trace_seq *p,struct trace_iterator ;struct trace_event ; -int ftrace_raw_output_prep (struct trace_iterator *iter, -struct trace_event *event); +int trace_raw_output_prep (struct trace_iterator *iter, +struct trace_event *event);/* * The trace entry - the most basic unit of tracing. This is what
@@ -183,7 +183,7 @@ void trace_current_buffer_discard_commit(struct ring_buffer *buffer,void tracing_record_cmdline (struct task_struct *tsk); -int ftrace_output_call (struct trace_iterator *iter,char *name,char *fmt, ...); +int trace_output_call (struct trace_iterator *iter,char *name,char *fmt, ...);struct event_filter ;
include/trace/perf.h +1 -1
@@ -58,7 +58,7 @@* } * * static struct trace_event ftrace_event_type_<call> = { -* .trace = ftrace_raw_output_<call>, <-- stage 2 +* .trace = trace_raw_output_<call>, <-- stage 2 * }; * * static char print_fmt_<call>[] = <TP_printk>;
include/trace/trace_events.h +8 -8
@@ -203,7 +203,7 @@ TRACE_MAKE_SYSTEM_STR();* Override the macros in <trace/trace_events.h> to include the following: * * enum print_line_t -* ftrace_raw_output_<call>(struct trace_iterator *iter, int flags) +* trace_raw_output_<call>(struct trace_iterator *iter, int flags) * { * struct trace_seq *s = &iter->seq; * struct ftrace_raw_<call> *field; <-- defined in stage 1
@@ -304,8 +304,8 @@ TRACE_MAKE_SYSTEM_STR();#undef DECLARE_EVENT_CLASS#define DECLARE_EVENT_CLASS (call, proto, args, tstruct, assign, print) \ static notrace enum print_line_t \ -ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ - struct trace_event *trace_event) \ +trace_raw_output_##call(struct trace_iterator *iter, int flags, \ + struct trace_event *trace_event) \ { \ struct trace_seq *s = &iter->seq; \ struct trace_seq __maybe_unused *p = &iter->tmp_seq; \
@@ -314,7 +314,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ \ field = (typeof (field ))iter->ent; \ \ - ret =ftrace_raw_output_prep (iter, trace_event); \ + ret =trace_raw_output_prep (iter, trace_event); \if (ret !=TRACE_TYPE_HANDLED ) \return ret; \ \
@@ -323,13 +323,13 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \return trace_handle_return (s); \ } \ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ - .trace = ftrace_raw_output_##call, \ + .trace = trace_raw_output_##call, \ };#undef DEFINE_EVENT_PRINT#define DEFINE_EVENT_PRINT (template, call, proto, args, print) \ static notrace enum print_line_t \ -ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ +trace_raw_output_##call(struct trace_iterator *iter, int flags, \ struct trace_event *event) \ { \ struct ftrace_raw_##template *field; \
@@ -346,10 +346,10 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ field = (typeof (field ))entry; \ \trace_seq_init (p); \ - return ftrace_output_call(iter, #call, print); \ + return trace_output_call(iter, #call, print); \ } \ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ - .trace = ftrace_raw_output_##call, \ + .trace = trace_raw_output_##call, \ };#include TRACE_INCLUDE (TRACE_INCLUDE_FILE )
kernel/trace/trace_output.c +8 -8
@@ -222,8 +222,8 @@ trace_print_array_seq(struct trace_seq *p, const void *buf, int count, }EXPORT_SYMBOL (trace_print_array_seq); -int ftrace_raw_output_prep (struct trace_iterator *iter, -struct trace_event *trace_event) +int trace_raw_output_prep (struct trace_iterator *iter, +struct trace_event *trace_event) {struct trace_event_call *event;struct trace_seq *s = &iter->seq;
@@ -243,10 +243,10 @@ int ftrace_raw_output_prep(struct trace_iterator *iter,return trace_handle_return (s); } -EXPORT_SYMBOL (ftrace_raw_output_prep); +EXPORT_SYMBOL (trace_raw_output_prep); -static int ftrace_output_raw (struct trace_iterator *iter,char *name, -char *fmt,va_list ap) +static int trace_output_raw (struct trace_iterator *iter,char *name, +char *fmt,va_list ap) {struct trace_seq *s = &iter->seq;
@@ -256,18 +256,18 @@ static int ftrace_output_raw(struct trace_iterator *iter, char *name,return trace_handle_return (s); } -int ftrace_output_call (struct trace_iterator *iter,char *name,char *fmt, ...) +int trace_output_call (struct trace_iterator *iter,char *name,char *fmt, ...) {va_list ap;int ret;va_start (ap, fmt); - ret =ftrace_output_raw (iter, name, fmt, ap); + ret =trace_output_raw (iter, name, fmt, ap);va_end (ap);return ret; } -EXPORT_SYMBOL_GPL (ftrace_output_call); +EXPORT_SYMBOL_GPL (trace_output_call);#ifdef CONFIG_KRETPROBES static inline const char *kretprobed (const char *name)
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 10/19 tracing: Rename FTRACE_MAX_EVENT to TRACE_EVENT_TYPE_MAX
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. Rename the max trace_event type size to something more descriptive and appropriate.
--- include/linux/trace_events.h | 2 +- kernel/trace/trace_output.c | 4 ++-- tools/perf/util/scripting-engines/trace-event-perl.c | 4 ++-- tools/perf/util/scripting-engines/trace-event-python.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
include/linux/trace_events.h +1 -1
@@ -68,7 +68,7 @@ struct trace_entry {int pid; }; -#define FTRACE_MAX_EVENT \ +#define TRACE_EVENT_TYPE_MAX \ ((1 << (sizeof(((struct trace_entry *)0)->type) * 8)) - 1)/*
kernel/trace/trace_output.c +2 -2
@@ -675,7 +675,7 @@ static int trace_search_list(struct list_head **list) }/* Did we used up all 65 thousand events??? */ -if ((last +1 ) >FTRACE_MAX_EVENT ) +if ((last +1 ) >TRACE_EVENT_TYPE_MAX )return 0 ; *list = &e->list;
@@ -725,7 +725,7 @@ int register_trace_event(struct trace_event *event)if (!event->type) {struct list_head *list =NULL ; -if (next_event_type >FTRACE_MAX_EVENT ) { +if (next_event_type >TRACE_EVENT_TYPE_MAX ) { event->type =trace_search_list (&list);if (!event->type)
tools/perf/util/scripting-engines/trace-event-perl.c +2 -2
@@ -55,10 +55,10 @@ void xs_init(pTHX)INTERP my_perl; -#define FTRACE_MAX_EVENT \ +#define TRACE_EVENT_TYPE_MAX \ ((1 << (sizeof(unsigned short) * 8)) - 1) -static DECLARE_BITMAP(events_defined, FTRACE_MAX_EVENT); +static DECLARE_BITMAP(events_defined, TRACE_EVENT_TYPE_MAX);extern struct scripting_context *scripting_context;
tools/perf/util/scripting-engines/trace-event-python.c +2 -2
@@ -44,10 +44,10 @@PyMODINIT_FUNC initperf_trace_context (void ); -#define FTRACE_MAX_EVENT \ +#define TRACE_EVENT_TYPE_MAX \ ((1 << (sizeof(unsigned short) * 8)) - 1) -static DECLARE_BITMAP(events_defined, FTRACE_MAX_EVENT); +static DECLARE_BITMAP(events_defined, TRACE_EVENT_TYPE_MAX);#define MAX_FIELDS 64#define N_COMMON_FIELDS 7
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 11/19 tracing: Rename ftrace_event_name() to trace_event_name()
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. ftrace_event_name() returns the name of an event tracepoint, has nothing to do with function tracing. Rename it to trace_event_name().
--- include/linux/trace_events.h | 2 +- kernel/trace/trace_events.c | 26 +++++++++++++------------- kernel/trace/trace_events_trigger.c | 2 +- kernel/trace/trace_kprobe.c | 16 ++++++++-------- kernel/trace/trace_output.c | 2 +- kernel/trace/trace_uprobe.c | 14 +++++++------- 6 files changed, 31 insertions(+), 31 deletions(-)
include/linux/trace_events.h +1 -1
@@ -304,7 +304,7 @@ struct trace_event_call { };static inline const char * -ftrace_event_name (struct trace_event_call *call) +trace_event_name (struct trace_event_call *call) {if (call->flags &TRACE_EVENT_FL_TRACEPOINT )return call->tp ? call->tp->name :NULL ;
kernel/trace/trace_events.c +13 -13
@@ -387,7 +387,7 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,if (ret) {tracing_stop_cmdline_record ();pr_info ("event trace: Could not enable event " -"%s\n" ,ftrace_event_name (call)); +"%s\n" ,trace_event_name (call));break ; }set_bit (FTRACE_EVENT_FL_ENABLED_BIT , &file->flags);
@@ -523,7 +523,7 @@ __ftrace_set_clr_event_nolock(struct trace_array *tr, const char *match,list_for_each_entry (file, &tr->events, list) { call = file->event_call; - name =ftrace_event_name (call); + name =trace_event_name (call);if (!name || !call->class || !call->class->reg)continue ;
@@ -747,7 +747,7 @@ static int t_show(struct seq_file *m, void *v)if (strcmp (call->class->system,TRACE_SYSTEM ) !=0 )seq_printf (m,"%s:" , call->class->system); -seq_printf (m,"%s\n" ,ftrace_event_name (call)); +seq_printf (m,"%s\n" ,trace_event_name (call));return 0 ; }
@@ -840,7 +840,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,mutex_lock (&event_mutex);list_for_each_entry (file, &tr->events, list) { call = file->event_call; -if (!ftrace_event_name (call) || !call->class || !call->class->reg) +if (!trace_event_name (call) || !call->class || !call->class->reg)continue ;if (system &&strcmp (call->class->system, system->name) !=0 )
@@ -955,7 +955,7 @@ static int f_show(struct seq_file *m, void *v)switch ((unsigned long )v) {case FORMAT_HEADER : -seq_printf (m,"name: %s\n" ,ftrace_event_name (call)); +seq_printf (m,"name: %s\n" ,trace_event_name (call));seq_printf (m,"ID: %d\n" , call->event.type);seq_puts (m,"format:\n" );return 0 ;
@@ -1591,7 +1591,7 @@ event_create_dir(struct dentry *parent, struct trace_event_file *file) }else d_events = parent; - name =ftrace_event_name (call); + name =trace_event_name (call); file->dir =tracefs_create_dir (name, d_events);if (!file->dir) {pr_warn ("Could not create tracefs '%s' directory\n" , name);
@@ -1683,7 +1683,7 @@ static int event_init(struct trace_event_call *call)int ret =0 ;const char *name; - name =ftrace_event_name (call); + name =trace_event_name (call);if (WARN_ON (!name))return -EINVAL ;
@@ -2062,7 +2062,7 @@ __trace_add_event_dirs(struct trace_array *tr) ret =__trace_add_new_event (call, tr);if (ret <0 )pr_warn ("Could not create directory for event %s\n" , -ftrace_event_name (call)); +trace_event_name (call)); } }
@@ -2076,7 +2076,7 @@ find_event_file(struct trace_array *tr, const char *system, const char *event)list_for_each_entry (file, &tr->events, list) { call = file->event_call; - name =ftrace_event_name (call); + name =trace_event_name (call);if (!name || !call->class || !call->class->reg)continue ;
@@ -2152,7 +2152,7 @@ event_enable_print(struct seq_file *m, unsigned long ip,seq_printf (m,"%s:%s:%s" , data->enable ?ENABLE_EVENT_STR :DISABLE_EVENT_STR , data->file->event_call->class->system, -ftrace_event_name (data->file->event_call)); +trace_event_name (data->file->event_call));if (data->count ==-1 )seq_puts (m,":unlimited\n" );
@@ -2375,7 +2375,7 @@ __trace_early_add_event_dirs(struct trace_array *tr) ret =event_create_dir (tr->event_dir, file);if (ret <0 )pr_warn ("Could not create directory for event %s\n" , -ftrace_event_name (file->event_call)); +trace_event_name (file->event_call)); } }
@@ -2399,7 +2399,7 @@ __trace_early_add_events(struct trace_array *tr) ret =__trace_early_add_new_event (call, tr);if (ret <0 )pr_warn ("Could not create early event %s\n" , -ftrace_event_name (call)); +trace_event_name (call)); } }
@@ -2787,7 +2787,7 @@ static __init void event_trace_self_tests(void)continue ;#endif -pr_info ("Testing event %s: " ,ftrace_event_name (call)); +pr_info ("Testing event %s: " ,trace_event_name (call));/* * If an event is already enabled, someone is using
kernel/trace/trace_events_trigger.c +1 -1
@@ -1095,7 +1095,7 @@ event_enable_trigger_print(struct seq_file *m, struct event_trigger_ops *ops,seq_printf (m,"%s:%s:%s" , enable_data->enable ?ENABLE_EVENT_STR :DISABLE_EVENT_STR , enable_data->file->event_call->class->system, -ftrace_event_name (enable_data->file->event_call)); +trace_event_name (enable_data->file->event_call));if (data->count ==-1 )seq_puts (m,":unlimited" );
kernel/trace/trace_kprobe.c +8 -8
@@ -348,7 +348,7 @@ static struct trace_kprobe *find_trace_kprobe(const char *event,struct trace_kprobe *tk;list_for_each_entry (tk, &probe_list, list) -if (strcmp (ftrace_event_name (&tk->tp.call), event) ==0 && +if (strcmp (trace_event_name (&tk->tp.call), event) ==0 &&strcmp (tk->tp.call.class->system, group) ==0 )return tk;return NULL ;
@@ -523,7 +523,7 @@ static int register_trace_kprobe(struct trace_kprobe *tk)mutex_lock (&probe_lock);/* Delete old (same name) event if exist */ - old_tk =find_trace_kprobe (ftrace_event_name (&tk->tp.call), + old_tk =find_trace_kprobe (trace_event_name (&tk->tp.call), tk->tp.call.class->system);if (old_tk) { ret =unregister_trace_kprobe (old_tk);
@@ -572,7 +572,7 @@ static int trace_kprobe_module_callback(struct notifier_block *nb,if (ret)pr_warning ("Failed to re-register probe %s on" "%s: %d\n" , -ftrace_event_name (&tk->tp.call), +trace_event_name (&tk->tp.call), mod->name, ret); } }
@@ -829,7 +829,7 @@ static int probes_seq_show(struct seq_file *m, void *v)seq_putc (m,trace_kprobe_is_return (tk) ?'r' :'p' );seq_printf (m,":%s/%s" , tk->tp.call.class->system, -ftrace_event_name (&tk->tp.call)); +trace_event_name (&tk->tp.call));if (!tk->symbol)seq_printf (m," 0x%p" , tk->rp.kp.addr);
@@ -888,7 +888,7 @@ static int probes_profile_seq_show(struct seq_file *m, void *v)struct trace_kprobe *tk = v;seq_printf (m," %-44s %15lu %15lu\n" , -ftrace_event_name (&tk->tp.call), tk->nhit, +trace_event_name (&tk->tp.call), tk->nhit, tk->rp.kp.nmissed);return 0 ;
@@ -1025,7 +1025,7 @@ print_kprobe_event(struct trace_iterator *iter, int flags, field = (struct kprobe_trace_entry_head *)iter->ent; tp = container_of(event, struct trace_probe, call.event); -trace_seq_printf (s,"%s: (" ,ftrace_event_name (&tp->call)); +trace_seq_printf (s,"%s: (" ,trace_event_name (&tp->call));if (!seq_print_ip_sym (s, field->ip, flags |TRACE_ITER_SYM_OFFSET )) goto out;
@@ -1056,7 +1056,7 @@ print_kretprobe_event(struct trace_iterator *iter, int flags, field = (struct kretprobe_trace_entry_head *)iter->ent; tp = container_of(event, struct trace_probe, call.event); -trace_seq_printf (s,"%s: (" ,ftrace_event_name (&tp->call)); +trace_seq_printf (s,"%s: (" ,trace_event_name (&tp->call));if (!seq_print_ip_sym (s, field->ret_ip, flags |TRACE_ITER_SYM_OFFSET )) goto out;
@@ -1301,7 +1301,7 @@ static int register_kprobe_event(struct trace_kprobe *tk) ret =trace_add_event_call (call);if (ret) {pr_info ("Failed to register kprobe event: %s\n" , -ftrace_event_name (call)); +trace_event_name (call));kfree (call->print_fmt);unregister_trace_event (&call->event); }
kernel/trace/trace_output.c +1 -1
@@ -239,7 +239,7 @@ int trace_raw_output_prep(struct trace_iterator *iter, }trace_seq_init (p); -trace_seq_printf (s,"%s: " ,ftrace_event_name (event)); +trace_seq_printf (s,"%s: " ,trace_event_name (event));return trace_handle_return (s); }
kernel/trace/trace_uprobe.c +7 -7
@@ -293,7 +293,7 @@ static struct trace_uprobe *find_probe_event(const char *event, const char *groustruct trace_uprobe *tu;list_for_each_entry (tu, &uprobe_list, list) -if (strcmp (ftrace_event_name (&tu->tp.call), event) ==0 && +if (strcmp (trace_event_name (&tu->tp.call), event) ==0 &&strcmp (tu->tp.call.class->system, group) ==0 )return tu;
@@ -323,7 +323,7 @@ static int register_trace_uprobe(struct trace_uprobe *tu)mutex_lock (&uprobe_lock);/* register as an event */ - old_tu =find_probe_event (ftrace_event_name (&tu->tp.call), + old_tu =find_probe_event (trace_event_name (&tu->tp.call), tu->tp.call.class->system);if (old_tu) {/* delete old event */
@@ -600,7 +600,7 @@ static int probes_seq_show(struct seq_file *m, void *v)int i;seq_printf (m,"%c:%s/%s" , c, tu->tp.call.class->system, -ftrace_event_name (&tu->tp.call)); +trace_event_name (&tu->tp.call));seq_printf (m," %s:0x%p" , tu->filename, (void *)tu->offset);for (i =0 ; i < tu->tp.nr_args; i++)
@@ -651,7 +651,7 @@ static int probes_profile_seq_show(struct seq_file *m, void *v)struct trace_uprobe *tu = v;seq_printf (m," %s %-44s %15lu\n" , tu->filename, -ftrace_event_name (&tu->tp.call), tu->nhit); +trace_event_name (&tu->tp.call), tu->nhit);return 0 ; }
@@ -853,12 +853,12 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *eif (is_ret_probe (tu)) {trace_seq_printf (s,"%s: (0x%lx <- 0x%lx)" , -ftrace_event_name (&tu->tp.call), +trace_event_name (&tu->tp.call), entry->vaddr[1 ], entry->vaddr[0 ]); data =DATAOF_TRACE_ENTRY (entry, true); }else {trace_seq_printf (s,"%s: (0x%lx)" , -ftrace_event_name (&tu->tp.call), +trace_event_name (&tu->tp.call), entry->vaddr[0 ]); data =DATAOF_TRACE_ENTRY (entry, false); }
@@ -1295,7 +1295,7 @@ static int register_uprobe_event(struct trace_uprobe *tu)if (ret) {pr_info ("Failed to register uprobe event: %s\n" , -ftrace_event_name (call)); +trace_event_name (call));kfree (call->print_fmt);unregister_trace_event (&call->event); }
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 12/19 tracing: Rename struct ftrace_subsystem_dir to trace_subsystem_dir
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The structure ftrace_subsystem_dir holds the information about trace event subsystems. It should not be named ftrace, rename it to trace_subsystem_dir.
--- include/linux/trace_events.h | 4 ++-- kernel/trace/trace.h | 4 ++-- kernel/trace/trace_events.c | 26 +++++++++++++------------- kernel/trace/trace_events_filter.c | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-)
include/linux/trace_events.h +2 -2
@@ -313,7 +313,7 @@ trace_event_name(struct trace_event_call *call) }struct trace_array ; -struct ftrace_subsystem_dir ; +struct trace_subsystem_dir ;enum {FTRACE_EVENT_FL_ENABLED_BIT ,
@@ -355,7 +355,7 @@ struct trace_event_file {struct event_filter *filter;struct dentry *dir;struct trace_array *tr; -struct ftrace_subsystem_dir *system; +struct trace_subsystem_dir *system;struct list_head triggers;/*
kernel/trace/trace.h +2 -2
@@ -992,7 +992,7 @@ struct event_subsystem {int ref_count; }; -struct ftrace_subsystem_dir { +struct trace_subsystem_dir {struct list_head list;struct event_subsystem *subsystem;struct trace_array *tr;
@@ -1056,7 +1056,7 @@ extern void print_event_filter(struct trace_event_file *file, struct trace_seq *s);extern int apply_event_filter (struct trace_event_file *file,char *filter_string); -extern int apply_subsystem_event_filter (struct ftrace_subsystem_dir *dir, +extern int apply_subsystem_event_filter (struct trace_subsystem_dir *dir,char *filter_string);extern void print_subsystem_event_filter (struct event_subsystem *system,struct trace_seq *s);
kernel/trace/trace_events.c +13 -13
@@ -449,14 +449,14 @@ static void __get_system(struct event_subsystem *system)system_refcount_inc (system); } -static void __get_system_dir (struct ftrace_subsystem_dir *dir) +static void __get_system_dir (struct trace_subsystem_dir *dir) {WARN_ON_ONCE (dir->ref_count ==0 ); dir->ref_count++;__get_system (dir->subsystem); } -static void __put_system_dir (struct ftrace_subsystem_dir *dir) +static void __put_system_dir (struct trace_subsystem_dir *dir) {WARN_ON_ONCE (dir->ref_count ==0 );/* If the subsystem is about to be freed, the dir must be too */
@@ -467,14 +467,14 @@ static void __put_system_dir(struct ftrace_subsystem_dir *dir)kfree (dir); } -static void put_system (struct ftrace_subsystem_dir *dir) +static void put_system (struct trace_subsystem_dir *dir) {mutex_lock (&event_mutex);__put_system_dir (dir);mutex_unlock (&event_mutex); } -static void remove_subsystem (struct ftrace_subsystem_dir *dir) +static void remove_subsystem (struct trace_subsystem_dir *dir) {if (!dir)return ;
@@ -828,7 +828,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) {const char set_to_char[4 ] = {'?' ,'0' ,'1' ,'X' }; -struct ftrace_subsystem_dir *dir = filp->private_data; +struct trace_subsystem_dir *dir = filp->private_data;struct event_subsystem *system = dir->subsystem;struct trace_event_call *call;struct trace_event_file *file;
@@ -873,7 +873,7 @@ static ssize_t system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) { - struct ftrace_subsystem_dir *dir = filp->private_data; + struct trace_subsystem_dir *dir = filp->private_data;struct event_subsystem *system = dir->subsystem;const char *name =NULL ;unsigned long val;
@@ -1132,7 +1132,7 @@ static LIST_HEAD(event_subsystems);static int subsystem_open (struct inode *inode,struct file *filp) {struct event_subsystem *system =NULL ; -struct ftrace_subsystem_dir *dir =NULL ;/* Initialize for gcc */ +struct trace_subsystem_dir *dir =NULL ;/* Initialize for gcc */ struct trace_array *tr;int ret;
@@ -1181,7 +1181,7 @@ static int subsystem_open(struct inode *inode, struct file *filp)static int system_tr_open (struct inode *inode,struct file *filp) { -struct ftrace_subsystem_dir *dir; +struct trace_subsystem_dir *dir;struct trace_array *tr = inode->i_private;int ret;
@@ -1214,7 +1214,7 @@ static int system_tr_open(struct inode *inode, struct file *filp)static int subsystem_release (struct inode *inode,struct file *file) { -struct ftrace_subsystem_dir *dir = file->private_data; +struct trace_subsystem_dir *dir = file->private_data;trace_array_put (dir->tr);
@@ -1235,7 +1235,7 @@ static ssize_t subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) { - struct ftrace_subsystem_dir *dir = filp->private_data; + struct trace_subsystem_dir *dir = filp->private_data;struct event_subsystem *system = dir->subsystem;struct trace_seq *s;int r;
@@ -1262,7 +1262,7 @@ static ssize_t subsystem_filter_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) { - struct ftrace_subsystem_dir *dir = filp->private_data; + struct trace_subsystem_dir *dir = filp->private_data;char *buf;int err;
@@ -1499,7 +1499,7 @@ static struct dentry * event_subsystem_dir(struct trace_array *tr, const char *name, struct trace_event_file *file, struct dentry *parent) { - struct ftrace_subsystem_dir *dir; + struct trace_subsystem_dir *dir;struct event_subsystem *system;struct dentry *entry;
@@ -2754,7 +2754,7 @@ static __init void event_test_stuff(void)*/ static __init void event_trace_self_tests (void ) { -struct ftrace_subsystem_dir *dir; +struct trace_subsystem_dir *dir;struct trace_event_file *file;struct trace_event_call *call;struct event_subsystem *system;
kernel/trace/trace_events_filter.c +5 -5
@@ -848,7 +848,7 @@ static inline void __remove_filter(struct trace_event_file *file)remove_filter_string (file->filter); } -static void filter_free_subsystem_preds (struct ftrace_subsystem_dir *dir, +static void filter_free_subsystem_preds (struct trace_subsystem_dir *dir,struct trace_array *tr) {struct trace_event_file *file;
@@ -873,7 +873,7 @@ static inline void __free_subsystem_filter(struct trace_event_file *file) } } -static void filter_free_subsystem_filters (struct ftrace_subsystem_dir *dir, +static void filter_free_subsystem_filters (struct trace_subsystem_dir *dir,struct trace_array *tr) {struct trace_event_file *file;
@@ -1735,7 +1735,7 @@ struct filter_list {struct event_filter *filter; }; -static int replace_system_preds (struct ftrace_subsystem_dir *dir, +static int replace_system_preds (struct trace_subsystem_dir *dir,struct trace_array *tr,struct filter_parse_state *ps,char *filter_string)
@@ -1935,7 +1935,7 @@ int create_event_filter(struct trace_event_call *call,* Identical to create_filter() except that it creates a subsystem filter * and always remembers @filter_str. */ -static int create_system_filter (struct ftrace_subsystem_dir *dir, +static int create_system_filter (struct trace_subsystem_dir *dir,struct trace_array *tr,char *filter_str,struct event_filter **filterp) {
@@ -2012,7 +2012,7 @@ int apply_event_filter(struct trace_event_file *file, char *filter_string)return err; } -int apply_subsystem_event_filter (struct ftrace_subsystem_dir *dir, +int apply_subsystem_event_filter (struct trace_subsystem_dir *dir,char *filter_string) {struct event_subsystem *system = dir->subsystem;
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 13/19 tracing: Rename FTRACE_EVENT_FL_* flags to EVENT_FILE_FL_*
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The FTRACE_EVENT_FL_* flags are flags to do with the trace_event files in the tracefs directory. They are not related to function tracing. Rename them to a more descriptive name.
--- include/linux/trace_events.h | 50 +++++++++++++++--------------- include/trace/perf.h | 10 +++--- kernel/trace/trace.c | 4 +-- kernel/trace/trace_events.c | 62 ++++++++++++++++++------------------- kernel/trace/trace_events_filter.c | 10 +++--- kernel/trace/trace_events_trigger.c | 14 ++++----- 6 files changed, 75 insertions(+), 75 deletions(-)
include/linux/trace_events.h +25 -25
@@ -250,11 +250,11 @@ enum {* FILTERED - The event has a filter attached * CAP_ANY - Any user can enable for perf * NO_SET_FILTER - Set when filter has error and is to be ignored -* IGNORE_ENABLE - For ftrace internal events, do not enable with debugfs file +* IGNORE_ENABLE - For trace internal events, do not enable with debugfs file * WAS_ENABLED - Set and stays set when an event was ever enabled * (used for module unloading, if a module event is enabled, * it is best to clear the buffers that used it). -* USE_CALL_FILTER - For ftrace internal events, don't use file filter +* USE_CALL_FILTER - For trace internal events, don't use file filter * TRACEPOINT - Event is a tracepoint * KPROBE - Event is a kprobe */
@@ -286,7 +286,7 @@ struct trace_event_call {* bit 0: filter_active * bit 1: allow trace by non root (cap any) * bit 2: failed to apply filter -* bit 3: ftrace internal event (do not enable) +* bit 3: trace internal event (do not enable) * bit 4: Event was enabled by module * bit 5: use call filter rather than file filter * bit 6: Event is a tracepoint
@@ -316,18 +316,18 @@ struct trace_array;struct trace_subsystem_dir ;enum { -FTRACE_EVENT_FL_ENABLED_BIT , -FTRACE_EVENT_FL_RECORDED_CMD_BIT , -FTRACE_EVENT_FL_FILTERED_BIT , -FTRACE_EVENT_FL_NO_SET_FILTER_BIT , -FTRACE_EVENT_FL_SOFT_MODE_BIT , -FTRACE_EVENT_FL_SOFT_DISABLED_BIT , -FTRACE_EVENT_FL_TRIGGER_MODE_BIT , -FTRACE_EVENT_FL_TRIGGER_COND_BIT , +EVENT_FILE_FL_ENABLED_BIT , +EVENT_FILE_FL_RECORDED_CMD_BIT , +EVENT_FILE_FL_FILTERED_BIT , +EVENT_FILE_FL_NO_SET_FILTER_BIT , +EVENT_FILE_FL_SOFT_MODE_BIT , +EVENT_FILE_FL_SOFT_DISABLED_BIT , +EVENT_FILE_FL_TRIGGER_MODE_BIT , +EVENT_FILE_FL_TRIGGER_COND_BIT , };/* -* Ftrace event file flags: +* Event file flags: * ENABLED - The event is enabled * RECORDED_CMD - The comms should be recorded at sched_switch * FILTERED - The event has a filter attached
@@ -339,14 +339,14 @@ enum {* TRIGGER_COND - When set, one or more triggers has an associated filter */ enum { -FTRACE_EVENT_FL_ENABLED = (1 <<FTRACE_EVENT_FL_ENABLED_BIT ), -FTRACE_EVENT_FL_RECORDED_CMD = (1 <<FTRACE_EVENT_FL_RECORDED_CMD_BIT ), -FTRACE_EVENT_FL_FILTERED = (1 <<FTRACE_EVENT_FL_FILTERED_BIT ), -FTRACE_EVENT_FL_NO_SET_FILTER = (1 <<FTRACE_EVENT_FL_NO_SET_FILTER_BIT ), -FTRACE_EVENT_FL_SOFT_MODE = (1 <<FTRACE_EVENT_FL_SOFT_MODE_BIT ), -FTRACE_EVENT_FL_SOFT_DISABLED = (1 <<FTRACE_EVENT_FL_SOFT_DISABLED_BIT ), -FTRACE_EVENT_FL_TRIGGER_MODE = (1 <<FTRACE_EVENT_FL_TRIGGER_MODE_BIT ), -FTRACE_EVENT_FL_TRIGGER_COND = (1 <<FTRACE_EVENT_FL_TRIGGER_COND_BIT ), +EVENT_FILE_FL_ENABLED = (1 <<EVENT_FILE_FL_ENABLED_BIT ), +EVENT_FILE_FL_RECORDED_CMD = (1 <<EVENT_FILE_FL_RECORDED_CMD_BIT ), +EVENT_FILE_FL_FILTERED = (1 <<EVENT_FILE_FL_FILTERED_BIT ), +EVENT_FILE_FL_NO_SET_FILTER = (1 <<EVENT_FILE_FL_NO_SET_FILTER_BIT ), +EVENT_FILE_FL_SOFT_MODE = (1 <<EVENT_FILE_FL_SOFT_MODE_BIT ), +EVENT_FILE_FL_SOFT_DISABLED = (1 <<EVENT_FILE_FL_SOFT_DISABLED_BIT ), +EVENT_FILE_FL_TRIGGER_MODE = (1 <<EVENT_FILE_FL_TRIGGER_MODE_BIT ), +EVENT_FILE_FL_TRIGGER_COND = (1 <<EVENT_FILE_FL_TRIGGER_COND_BIT ), };struct trace_event_file {
@@ -439,10 +439,10 @@ ftrace_trigger_soft_disabled(struct trace_event_file *file) {unsigned long eflags = file->flags; -if (!(eflags &FTRACE_EVENT_FL_TRIGGER_COND )) { -if (eflags &FTRACE_EVENT_FL_TRIGGER_MODE ) +if (!(eflags &EVENT_FILE_FL_TRIGGER_COND )) { +if (eflags &EVENT_FILE_FL_TRIGGER_MODE )event_triggers_call (file,NULL ); -if (eflags &FTRACE_EVENT_FL_SOFT_DISABLED ) +if (eflags &EVENT_FILE_FL_SOFT_DISABLED )return true; }return false;
@@ -470,10 +470,10 @@ __event_trigger_test_discard(struct trace_event_file *file, {unsigned long eflags = file->flags; -if (eflags &FTRACE_EVENT_FL_TRIGGER_COND ) +if (eflags &EVENT_FILE_FL_TRIGGER_COND ) *tt =event_triggers_call (file, entry); -if (test_bit (FTRACE_EVENT_FL_SOFT_DISABLED_BIT , &file->flags)) +if (test_bit (EVENT_FILE_FL_SOFT_DISABLED_BIT , &file->flags))ring_buffer_discard_commit (buffer, event);else if (!filter_check_discard (file, entry, buffer, event))return false;
include/trace/perf.h +5 -5
@@ -21,10 +21,10 @@* int __data_size; * int pc; * -* if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) { -* if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE) +* if (!(eflags & EVENT_FILE_FL_TRIGGER_COND)) { +* if (eflags & EVENT_FILE_FL_TRIGGER_MODE) * event_triggers_call(trace_file, NULL); -* if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED) +* if (eflags & EVENT_FILE_FL_SOFT_DISABLED) * return; * } *
@@ -44,10 +44,10 @@* { <assign>; } <-- Here we assign the entries by the __field and * __array macros. * -* if (eflags & FTRACE_EVENT_FL_TRIGGER_COND) +* if (eflags & EVENT_FILE_FL_TRIGGER_COND) * __tt = event_triggers_call(trace_file, entry); * -* if (test_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, +* if (test_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, * &trace_file->flags)) * ring_buffer_discard_commit(buffer, event); * else if (!filter_check_discard(trace_file, entry, buffer, event))
kernel/trace/trace.c +2 -2
@@ -301,7 +301,7 @@ int filter_check_discard(struct trace_event_file *file, void *rec,struct ring_buffer *buffer, struct ring_buffer_event *event) { - if (unlikely(file->flags & FTRACE_EVENT_FL_FILTERED) && + if (unlikely(file->flags & EVENT_FILE_FL_FILTERED) && !filter_match_preds(file->filter, rec)) {ring_buffer_discard_commit (buffer ,event );return 1 ;
@@ -1709,7 +1709,7 @@ trace_event_buffer_lock_reserve(struct ring_buffer **current_rb,* to store the trace event for the tigger to use. It's recusive * safe and will not be recorded anywhere. */ -if (!entry && trace_file->flags &FTRACE_EVENT_FL_TRIGGER_COND ) { +if (!entry && trace_file->flags &EVENT_FILE_FL_TRIGGER_COND ) { *current_rb = temp_buffer; entry =trace_buffer_lock_reserve (*current_rb, type, len, flags, pc);
kernel/trace/trace_events.c +31 -31
158 lines not on this page · raw message
kernel/trace/trace_events_filter.c +5 -5
@@ -787,7 +787,7 @@ static void filter_disable(struct trace_event_file *file)if (call->flags &TRACE_EVENT_FL_USE_CALL_FILTER ) call->flags &= ~TRACE_EVENT_FL_FILTERED ;else - file->flags &= ~FTRACE_EVENT_FL_FILTERED ; + file->flags &= ~EVENT_FILE_FL_FILTERED ; }static void __free_filter (struct event_filter *filter)
@@ -1669,7 +1669,7 @@ static inline void event_set_filtered_flag(struct trace_event_file *file)if (call->flags &TRACE_EVENT_FL_USE_CALL_FILTER ) call->flags |=TRACE_EVENT_FL_FILTERED ;else - file->flags |=FTRACE_EVENT_FL_FILTERED ; + file->flags |=EVENT_FILE_FL_FILTERED ; } static inline void event_set_filter(struct trace_event_file *file,
@@ -1701,7 +1701,7 @@ event_set_no_set_filter_flag(struct trace_event_file *file)if (call->flags &TRACE_EVENT_FL_USE_CALL_FILTER ) call->flags |=TRACE_EVENT_FL_NO_SET_FILTER ;else - file->flags |=FTRACE_EVENT_FL_NO_SET_FILTER ; + file->flags |=EVENT_FILE_FL_NO_SET_FILTER ; } static inline void
@@ -1712,7 +1712,7 @@ event_clear_no_set_filter_flag(struct trace_event_file *file)if (call->flags &TRACE_EVENT_FL_USE_CALL_FILTER ) call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER ;else - file->flags &= ~FTRACE_EVENT_FL_NO_SET_FILTER ; + file->flags &= ~EVENT_FILE_FL_NO_SET_FILTER ; } static inline bool
@@ -1720,7 +1720,7 @@ event_no_set_filter_flag(struct trace_event_file *file) {struct trace_event_call *call = file->event_call; -if (file->flags &FTRACE_EVENT_FL_NO_SET_FILTER ) +if (file->flags &EVENT_FILE_FL_NO_SET_FILTER )return true; if ((call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) &&
kernel/trace/trace_events_trigger.c +7 -7
@@ -438,12 +438,12 @@ static int trace_event_trigger_enable_disable(struct trace_event_file *file,if (trigger_enable) {if (atomic_inc_return (&file->tm_ref) >1 )return ret; -set_bit (FTRACE_EVENT_FL_TRIGGER_MODE_BIT , &file->flags); +set_bit (EVENT_FILE_FL_TRIGGER_MODE_BIT , &file->flags); ret =trace_event_enable_disable (file,1 ,1 ); }else {if (atomic_dec_return (&file->tm_ref) >0 )return ret; -clear_bit (FTRACE_EVENT_FL_TRIGGER_MODE_BIT , &file->flags); +clear_bit (EVENT_FILE_FL_TRIGGER_MODE_BIT , &file->flags); ret =trace_event_enable_disable (file,0 ,1 ); }
@@ -501,9 +501,9 @@ static void update_cond_flag(struct trace_event_file *file) }if (set_cond) -set_bit (FTRACE_EVENT_FL_TRIGGER_COND_BIT , &file->flags); +set_bit (EVENT_FILE_FL_TRIGGER_COND_BIT , &file->flags);else -clear_bit (FTRACE_EVENT_FL_TRIGGER_COND_BIT , &file->flags); +clear_bit (EVENT_FILE_FL_TRIGGER_COND_BIT , &file->flags); }/**
@@ -1063,9 +1063,9 @@ event_enable_trigger(struct event_trigger_data *data)struct enable_trigger_data *enable_data = data->private_data;if (enable_data->enable) -clear_bit (FTRACE_EVENT_FL_SOFT_DISABLED_BIT , &enable_data->file->flags); +clear_bit (EVENT_FILE_FL_SOFT_DISABLED_BIT , &enable_data->file->flags);else -set_bit (FTRACE_EVENT_FL_SOFT_DISABLED_BIT , &enable_data->file->flags); +set_bit (EVENT_FILE_FL_SOFT_DISABLED_BIT , &enable_data->file->flags); } static void
@@ -1077,7 +1077,7 @@ event_enable_count_trigger(struct event_trigger_data *data)return ;/* Skip if the event is in a state we want to switch to */ -if (enable_data->enable == !(enable_data->file->flags &FTRACE_EVENT_FL_SOFT_DISABLED )) +if (enable_data->enable == !(enable_data->file->flags &EVENT_FILE_FL_SOFT_DISABLED ))return ;if (data->count !=-1 )
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 14/19 tracing: Rename ftrace_trigger_soft_disabled() to trace_trigger_soft_disabled()
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The ftrace_trigger_soft_disabled() tests if a trace_event is soft disabled (called but not traced), and returns true if it is. It has nothing to do with function tracing and should be renamed.
--- include/linux/trace_events.h | 4 ++-- include/trace/perf.h | 2 +- kernel/trace/trace_kprobe.c | 4 ++-- kernel/trace/trace_syscalls.c | 4 ++-- kernel/trace/trace_uprobe.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
include/linux/trace_events.h +2 -2
@@ -426,7 +426,7 @@ extern void event_triggers_post_call(struct trace_event_file *file, enum event_trigger_type tt);/** -* ftrace_trigger_soft_disabled - do triggers and test if soft disabled +* trace_trigger_soft_disabled - do triggers and test if soft disabled * @file: The file pointer of the event to test * * If any triggers without filters are attached to this event, they
@@ -435,7 +435,7 @@ extern void event_triggers_post_call(struct trace_event_file *file,* otherwise false. */ static inline bool -ftrace_trigger_soft_disabled (struct trace_event_file *file) +trace_trigger_soft_disabled (struct trace_event_file *file) {unsigned long eflags = file->flags;
include/trace/perf.h +1 -1
@@ -159,7 +159,7 @@ ftrace_raw_event_##call(void *__data, proto) \ struct ftrace_raw_##call *entry; \ int __data_size; \ \ - if (ftrace_trigger_soft_disabled(trace_file)) \ + if (trace_trigger_soft_disabled(trace_file)) \ return; \ \ __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
kernel/trace/trace_kprobe.c +2 -2
@@ -928,7 +928,7 @@ __kprobe_trace_func(struct trace_kprobe *tk, struct pt_regs *regs,WARN_ON (call != trace_file->event_call); -if (ftrace_trigger_soft_disabled (trace_file)) +if (trace_trigger_soft_disabled (trace_file))return ;local_save_flags (irq_flags);
@@ -976,7 +976,7 @@ __kretprobe_trace_func(struct trace_kprobe *tk, struct kretprobe_instance *ri,WARN_ON (call != trace_file->event_call); -if (ftrace_trigger_soft_disabled (trace_file)) +if (trace_trigger_soft_disabled (trace_file))return ;local_save_flags (irq_flags);
kernel/trace/trace_syscalls.c +2 -2
@@ -312,7 +312,7 @@ static void ftrace_syscall_enter(void *data, struct pt_regs *regs, long id)if (!trace_file)return ; -if (ftrace_trigger_soft_disabled (trace_file)) +if (trace_trigger_soft_disabled (trace_file))return ; sys_data =syscall_nr_to_meta (syscall_nr);
@@ -359,7 +359,7 @@ static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret)if (!trace_file)return ; -if (ftrace_trigger_soft_disabled (trace_file)) +if (trace_trigger_soft_disabled (trace_file))return ; sys_data =syscall_nr_to_meta (syscall_nr);
kernel/trace/trace_uprobe.c +1 -1
@@ -784,7 +784,7 @@ static void __uprobe_trace_func(struct trace_uprobe *tu,if (WARN_ON_ONCE (tu->tp.size + dsize >PAGE_SIZE ))return ; -if (ftrace_trigger_soft_disabled (trace_file)) +if (trace_trigger_soft_disabled (trace_file))return ; esize =SIZEOF_TRACE_ENTRY (is_ret_probe (tu));
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 15/19 tracing: Rename ftrace_raw_##call event structures to trace_event_raw_##call
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The ftrace_raw_##call structures are built by macros for trace events. They have nothing to do with function tracing. Rename them.
--- include/trace/perf.h | 16 ++++++++-------- include/trace/trace_events.h | 14 +++++++------- kernel/trace/trace_events_filter.c | 2 +- kernel/trace/trace_events_trigger.c | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-)
include/trace/perf.h +8 -8
@@ -7,7 +7,7 @@* * static struct trace_event_call event_<call>; * -* static void ftrace_raw_event_<call>(void *__data, proto) +* static void trace_event_raw_event_<call>(void *__data, proto) * { * struct trace_event_file *trace_file = __data; * struct trace_event_call *event_call = trace_file->event_call;
@@ -15,7 +15,7 @@* unsigned long eflags = trace_file->flags; * enum event_trigger_type __tt = ETT_NONE; * struct ring_buffer_event *event; -* struct ftrace_raw_<call> *entry; <-- defined in stage 1 +* struct trace_event_raw_<call> *entry; <-- defined in stage 1 * struct ring_buffer *buffer; * unsigned long irq_flags; * int __data_size;
@@ -68,7 +68,7 @@* .define_fields = ftrace_define_fields_<call>, * .fields = LIST_HEAD_INIT(event_class_##call.fields), * .raw_init = trace_event_raw_init, -* .probe = ftrace_raw_event_##call, +* .probe = trace_event_raw_event_##call, * .reg = trace_event_reg, * }; *
@@ -151,12 +151,12 @@#define DECLARE_EVENT_CLASS (call, proto, args, tstruct, assign, print) \ \ static notrace void \ -ftrace_raw_event_##call(void *__data, proto) \ +trace_event_raw_event_##call(void *__data, proto) \ { \ struct trace_event_file *trace_file = __data; \ struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ struct trace_event_buffer fbuffer; \ - struct ftrace_raw_##call *entry; \ + struct trace_event_raw_##call *entry; \ int __data_size; \ \ if (trace_trigger_soft_disabled(trace_file)) \
@@ -186,7 +186,7 @@ ftrace_raw_event_##call(void *__data, proto) \#define DEFINE_EVENT (template, call, proto, args) \ static inline void ftrace_test_probe_##call(void) \ { \ - check_trace_callback_type_##call(ftrace_raw_event_##template); \ + check_trace_callback_type_##call(trace_event_raw_event_##template); \ }#undef DEFINE_EVENT_PRINT
@@ -218,7 +218,7 @@ static struct trace_event_class __used __refdata event_class_##call = { \ .define_fields = ftrace_define_fields_##call, \ .fields = LIST_HEAD_INIT(event_class_##call.fields),\ .raw_init = trace_event_raw_init, \ - .probe = ftrace_raw_event_##call, \ + .probe = trace_event_raw_event_##call, \ .reg = trace_event_reg, \ _TRACE_PERF_INIT(call) \ };
@@ -294,7 +294,7 @@ perf_trace_##call(void *__data, proto) \ { \struct trace_event_call *event_call = __data; \ struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ - struct ftrace_raw_##call *entry; \ + struct trace_event_raw_##call *entry; \ struct pt_regs *__regs; \ u64 __addr = 0, __count = 1; \ struct task_struct *__task = NULL; \
include/trace/trace_events.h +7 -7
@@ -3,7 +3,7 @@* * Override the macros in <trace/trace_events.h> to include the following: * -* struct ftrace_raw_<call> { +* struct trace_event_raw_<call> { * struct trace_entry ent; * <type> <item>; * <type2> <item2>[<len>];
@@ -95,7 +95,7 @@ TRACE_MAKE_SYSTEM_STR();#undef DECLARE_EVENT_CLASS#define DECLARE_EVENT_CLASS (name, proto, args, tstruct, assign, print) \ - struct ftrace_raw_##name { \ + struct trace_event_raw_##name { \ struct trace_entry ent; \ tstruct \ char __data[0]; \
@@ -206,7 +206,7 @@ TRACE_MAKE_SYSTEM_STR();* trace_raw_output_<call>(struct trace_iterator *iter, int flags) * { * struct trace_seq *s = &iter->seq; -* struct ftrace_raw_<call> *field; <-- defined in stage 1 +* struct trace_event_raw_<call> *field; <-- defined in stage 1 * struct trace_entry *entry; * struct trace_seq *p = &iter->tmp_seq; * int ret;
@@ -309,7 +309,7 @@ trace_raw_output_##call(struct trace_iterator *iter, int flags, \ { \struct trace_seq *s = &iter->seq; \ struct trace_seq __maybe_unused *p = &iter->tmp_seq; \ - struct ftrace_raw_##call *field; \ + struct trace_event_raw_##call *field; \int ret; \ \ field = (typeof (field ))iter->ent; \
@@ -332,7 +332,7 @@ static notrace enum print_line_t \ trace_raw_output_##call(struct trace_iterator *iter, int flags, \ struct trace_event *event) \ { \ - struct ftrace_raw_##template *field; \ + struct trace_event_raw_##template *field; \ struct trace_entry *entry; \ struct trace_seq *p = &iter->tmp_seq; \ \
@@ -409,7 +409,7 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ static int notrace __init \ ftrace_define_fields_##call(struct trace_event_call *event_call) \ { \ - struct ftrace_raw_##call field; \ + struct trace_event_raw_##call field; \ int ret; \ \ tstruct; \
@@ -490,7 +490,7 @@ static inline notrace int ftrace_get_offsets_##call( \ { \int __data_size =0 ; \ int __maybe_unused __item_length; \ - struct ftrace_raw_##call __maybe_unused *entry; \ + struct trace_event_raw_##call __maybe_unused *entry; \ \ tstruct; \ \
kernel/trace/trace_events_filter.c +1 -1
@@ -2268,7 +2268,7 @@ out_unlock:static struct test_filter_data_t {char *filter; -struct ftrace_raw_ftrace_test_filter rec; +struct trace_event_raw_ftrace_test_filter rec;int match;char *not_visited; } test_filter_data[] = {
kernel/trace/trace_events_trigger.c +1 -1
@@ -968,7 +968,7 @@ static __init int register_trigger_snapshot_cmd(void) { return 0; }* Skip 3: * stacktrace_trigger() * event_triggers_post_call() -* ftrace_raw_event_xxx() +* trace_event_raw_event_xxx() */ #define STACK_SKIP 3
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 16/19 tracing: Rename ftrace_data_offset_##call to trace_event_data_offset_##call
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The structure ftrace_data_offset_##call is used to find the offsets of dynamically allocated fields in trace_events. It has nothing to do with function tracing. Rename it.
--- include/trace/perf.h | 6 +++--- include/trace/trace_events.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
include/trace/perf.h +3 -3
@@ -11,7 +11,7 @@* { * struct trace_event_file *trace_file = __data; * struct trace_event_call *event_call = trace_file->event_call; -* struct ftrace_data_offsets_<call> __maybe_unused __data_offsets; +* struct trace_event_data_offsets_<call> __maybe_unused __data_offsets; * unsigned long eflags = trace_file->flags; * enum event_trigger_type __tt = ETT_NONE; * struct ring_buffer_event *event;
@@ -154,7 +154,7 @@ static notrace void \ trace_event_raw_event_##call(void *__data, proto) \ { \ struct trace_event_file *trace_file = __data; \ - struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ + struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\ struct trace_event_buffer fbuffer; \ struct trace_event_raw_##call *entry; \ int __data_size; \
@@ -293,7 +293,7 @@ static notrace void \ perf_trace_##call(void *__data, proto) \ { \ struct trace_event_call *event_call = __data; \ - struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ + struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\ struct trace_event_raw_##call *entry; \ struct pt_regs *__regs; \ u64 __addr = 0, __count = 1; \
include/trace/trace_events.h +3 -3
@@ -138,7 +138,7 @@ TRACE_MAKE_SYSTEM_STR();* * Include the following: * -* struct ftrace_data_offsets_<call> { +* struct trace_event_data_offsets_<call> { * u32 <item1>; * u32 <item2>; * [...]
@@ -178,7 +178,7 @@ TRACE_MAKE_SYSTEM_STR();#undef DECLARE_EVENT_CLASS#define DECLARE_EVENT_CLASS (call, proto, args, tstruct, assign, print) \ - struct ftrace_data_offsets_##call { \ + struct trace_event_data_offsets_##call { \ tstruct; \ };
@@ -486,7 +486,7 @@ ftrace_define_fields_##call(struct trace_event_call *event_call) \#undef DECLARE_EVENT_CLASS#define DECLARE_EVENT_CLASS (call, proto, args, tstruct, assign, print) \ static inline notrace int ftrace_get_offsets_##call( \ - struct ftrace_data_offsets_##call *__data_offsets, proto) \ + struct trace_event_data_offsets_##call *__data_offsets, proto) \ { \ int __data_size = 0; \ int __maybe_unused __item_length; \
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 17/19 tracing: Rename ftrace_event_type_funcs_##call to trace_event_type_funcs_##call
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The structure ftrace_event_type_funcs_##call is used to define how the trace_events will be printed. It has nothing to do with function tracing. Rename it.
--- include/trace/perf.h | 4 ++-- include/trace/trace_events.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
include/trace/perf.h +2 -2
@@ -231,7 +231,7 @@ static struct trace_event_call __used event_##call = { \ { \ .tp = &__tracepoint_##call, \ }, \ - .event.funcs = &ftrace_event_type_funcs_##template, \ + .event.funcs = &trace_event_type_funcs_##template, \ .print_fmt = print_fmt_##template, \ .flags = TRACE_EVENT_FL_TRACEPOINT, \ }; \
@@ -248,7 +248,7 @@ static struct trace_event_call __used event_##call = { \ { \ .tp = &__tracepoint_##call, \ }, \ - .event.funcs = &ftrace_event_type_funcs_##call, \ + .event.funcs = &trace_event_type_funcs_##call, \ .print_fmt = print_fmt_##call, \ .flags = TRACE_EVENT_FL_TRACEPOINT, \ }; \
include/trace/trace_events.h +2 -2
@@ -322,7 +322,7 @@ trace_raw_output_##call(struct trace_iterator *iter, int flags, \ \return trace_handle_return (s); \ } \ -static struct trace_event_functions ftrace_event_type_funcs_##call = { \ +static struct trace_event_functions trace_event_type_funcs_##call = { \ .trace = trace_raw_output_##call, \ };
@@ -348,7 +348,7 @@ trace_raw_output_##call(struct trace_iterator *iter, int flags, \trace_seq_init (p); \ return trace_output_call(iter, #call, print); \ } \ -static struct trace_event_functions ftrace_event_type_funcs_##call = { \ +static struct trace_event_functions trace_event_type_funcs_##call = { \ .trace = trace_raw_output_##call, \ };
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 18/19 tracing: Rename ftrace_define_fields_##call() to trace_event_define_fields_##call()
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The function ftrace_define_fields_##call() is used to define how to process the trace_event fields. It has nothing to do with function tracing. Rename it.
--- include/trace/perf.h | 4 ++-- include/trace/trace_events.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
include/trace/perf.h +2 -2
@@ -65,7 +65,7 @@* * static struct trace_event_class __used event_class_<template> = { * .system = "<system>", -* .define_fields = ftrace_define_fields_<call>, +* .define_fields = trace_event_define_fields_<call>, * .fields = LIST_HEAD_INIT(event_class_##call.fields), * .raw_init = trace_event_raw_init, * .probe = trace_event_raw_event_##call,
@@ -215,7 +215,7 @@ _TRACE_PERF_PROTO(call, PARAMS(proto)); \ static char print_fmt_##call[] = print; \ static struct trace_event_class __used __refdata event_class_##call = { \ .system = TRACE_SYSTEM_STRING, \ - .define_fields = ftrace_define_fields_##call, \ + .define_fields = trace_event_define_fields_##call, \ .fields = LIST_HEAD_INIT(event_class_##call.fields),\ .raw_init = trace_event_raw_init, \ .probe = trace_event_raw_event_##call, \
include/trace/trace_events.h +1 -1
@@ -407,7 +407,7 @@ static struct trace_event_functions trace_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 trace_event_call *event_call) \ +trace_event_define_fields_##call(struct trace_event_call *event_call) \ { \ struct trace_event_raw_##call field; \ int ret; \
Signature · 1 line
2.1.4
Steven Rostedt
maintainerPATCH 19/19 tracing: Rename ftrace_get_offsets_##call() to trace_event_get_offsets_##call()
In reply to Steven RostedtFrom: "Steven Rostedt (Red Hat)" <[email protected]>
The name "ftrace" really refers to the function hook infrastructure. It is not about the trace_events. The function ftrace_get_offsets_##call() is used to find the offset into dynamically allocated trace event fields for printing. It has nothing to do with function tracing. Rename it.
--- include/trace/perf.h | 6 +++--- include/trace/trace_events.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
include/trace/perf.h +3 -3
@@ -31,7 +31,7 @@* local_save_flags(irq_flags); * pc = preempt_count(); * -* __data_size = ftrace_get_offsets_<call>(&__data_offsets, args); +* __data_size = trace_event_get_offsets_<call>(&__data_offsets, args); * * event = trace_event_buffer_lock_reserve(&buffer, trace_file, * event_<call>->event.type,
@@ -162,7 +162,7 @@ trace_event_raw_event_##call(void *__data, proto) \if (trace_trigger_soft_disabled (trace_file)) \return ; \ \ - __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ + __data_size = trace_event_get_offsets_##call(&__data_offsets, args); \ \ entry = trace_event_buffer_reserve(&fbuffer, trace_file, \ sizeof(*entry) + __data_size); \
@@ -303,7 +303,7 @@ perf_trace_##call(void *__data, proto) \int __data_size; \int rctx; \ \ - __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ + __data_size = trace_event_get_offsets_##call(&__data_offsets, args); \ \ head = this_cpu_ptr(event_call->perf_events); \ if (__builtin_constant_p(!__task) && !__task && \
include/trace/trace_events.h +1 -1
@@ -485,7 +485,7 @@ trace_event_define_fields_##call(struct trace_event_call *event_call) \#undef DECLARE_EVENT_CLASS#define DECLARE_EVENT_CLASS (call, proto, args, tstruct, assign, print) \ -static inline notrace int ftrace_get_offsets_##call( \ +static inline notrace int trace_event_get_offsets_##call( \ struct trace_event_data_offsets_##call *__data_offsets, proto) \ { \ int __data_size = 0; \
Signature · 1 line
2.1.4
Steven Rostedt
maintainerQuoted 4 lines · On Thu, 21 May 2015 09:33:33 -0400 Steven Rostedt <[email protected]> wrote:
As nobody seemed to respond to the RFC, I'm posting this for real. Before uploading, I'll do one more test against the latest linux-next to make sure it doesn't break anything. I tested it against linux-next before but things could have changed since.
Builds fine and doesn't add any new warnings against today's linux-next.
-- Steve