tracing: Rename FTRACE_EVENT_FL_* flags to EVENT_FILE_FL_*
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. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
7967b3e0c4
commit
5d6ad960a7
|
@ -250,11 +250,11 @@ enum {
|
||||||
* FILTERED - The event has a filter attached
|
* FILTERED - The event has a filter attached
|
||||||
* CAP_ANY - Any user can enable for perf
|
* CAP_ANY - Any user can enable for perf
|
||||||
* NO_SET_FILTER - Set when filter has error and is to be ignored
|
* 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
|
* WAS_ENABLED - Set and stays set when an event was ever enabled
|
||||||
* (used for module unloading, if a module event is enabled,
|
* (used for module unloading, if a module event is enabled,
|
||||||
* it is best to clear the buffers that used it).
|
* 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
|
* TRACEPOINT - Event is a tracepoint
|
||||||
* KPROBE - Event is a kprobe
|
* KPROBE - Event is a kprobe
|
||||||
*/
|
*/
|
||||||
|
@ -286,7 +286,7 @@ struct trace_event_call {
|
||||||
* bit 0: filter_active
|
* bit 0: filter_active
|
||||||
* bit 1: allow trace by non root (cap any)
|
* bit 1: allow trace by non root (cap any)
|
||||||
* bit 2: failed to apply filter
|
* 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 4: Event was enabled by module
|
||||||
* bit 5: use call filter rather than file filter
|
* bit 5: use call filter rather than file filter
|
||||||
* bit 6: Event is a tracepoint
|
* bit 6: Event is a tracepoint
|
||||||
|
@ -316,18 +316,18 @@ struct trace_array;
|
||||||
struct trace_subsystem_dir;
|
struct trace_subsystem_dir;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FTRACE_EVENT_FL_ENABLED_BIT,
|
EVENT_FILE_FL_ENABLED_BIT,
|
||||||
FTRACE_EVENT_FL_RECORDED_CMD_BIT,
|
EVENT_FILE_FL_RECORDED_CMD_BIT,
|
||||||
FTRACE_EVENT_FL_FILTERED_BIT,
|
EVENT_FILE_FL_FILTERED_BIT,
|
||||||
FTRACE_EVENT_FL_NO_SET_FILTER_BIT,
|
EVENT_FILE_FL_NO_SET_FILTER_BIT,
|
||||||
FTRACE_EVENT_FL_SOFT_MODE_BIT,
|
EVENT_FILE_FL_SOFT_MODE_BIT,
|
||||||
FTRACE_EVENT_FL_SOFT_DISABLED_BIT,
|
EVENT_FILE_FL_SOFT_DISABLED_BIT,
|
||||||
FTRACE_EVENT_FL_TRIGGER_MODE_BIT,
|
EVENT_FILE_FL_TRIGGER_MODE_BIT,
|
||||||
FTRACE_EVENT_FL_TRIGGER_COND_BIT,
|
EVENT_FILE_FL_TRIGGER_COND_BIT,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ftrace event file flags:
|
* Event file flags:
|
||||||
* ENABLED - The event is enabled
|
* ENABLED - The event is enabled
|
||||||
* RECORDED_CMD - The comms should be recorded at sched_switch
|
* RECORDED_CMD - The comms should be recorded at sched_switch
|
||||||
* FILTERED - The event has a filter attached
|
* FILTERED - The event has a filter attached
|
||||||
|
@ -339,14 +339,14 @@ enum {
|
||||||
* TRIGGER_COND - When set, one or more triggers has an associated filter
|
* TRIGGER_COND - When set, one or more triggers has an associated filter
|
||||||
*/
|
*/
|
||||||
enum {
|
enum {
|
||||||
FTRACE_EVENT_FL_ENABLED = (1 << FTRACE_EVENT_FL_ENABLED_BIT),
|
EVENT_FILE_FL_ENABLED = (1 << EVENT_FILE_FL_ENABLED_BIT),
|
||||||
FTRACE_EVENT_FL_RECORDED_CMD = (1 << FTRACE_EVENT_FL_RECORDED_CMD_BIT),
|
EVENT_FILE_FL_RECORDED_CMD = (1 << EVENT_FILE_FL_RECORDED_CMD_BIT),
|
||||||
FTRACE_EVENT_FL_FILTERED = (1 << FTRACE_EVENT_FL_FILTERED_BIT),
|
EVENT_FILE_FL_FILTERED = (1 << EVENT_FILE_FL_FILTERED_BIT),
|
||||||
FTRACE_EVENT_FL_NO_SET_FILTER = (1 << FTRACE_EVENT_FL_NO_SET_FILTER_BIT),
|
EVENT_FILE_FL_NO_SET_FILTER = (1 << EVENT_FILE_FL_NO_SET_FILTER_BIT),
|
||||||
FTRACE_EVENT_FL_SOFT_MODE = (1 << FTRACE_EVENT_FL_SOFT_MODE_BIT),
|
EVENT_FILE_FL_SOFT_MODE = (1 << EVENT_FILE_FL_SOFT_MODE_BIT),
|
||||||
FTRACE_EVENT_FL_SOFT_DISABLED = (1 << FTRACE_EVENT_FL_SOFT_DISABLED_BIT),
|
EVENT_FILE_FL_SOFT_DISABLED = (1 << EVENT_FILE_FL_SOFT_DISABLED_BIT),
|
||||||
FTRACE_EVENT_FL_TRIGGER_MODE = (1 << FTRACE_EVENT_FL_TRIGGER_MODE_BIT),
|
EVENT_FILE_FL_TRIGGER_MODE = (1 << EVENT_FILE_FL_TRIGGER_MODE_BIT),
|
||||||
FTRACE_EVENT_FL_TRIGGER_COND = (1 << FTRACE_EVENT_FL_TRIGGER_COND_BIT),
|
EVENT_FILE_FL_TRIGGER_COND = (1 << EVENT_FILE_FL_TRIGGER_COND_BIT),
|
||||||
};
|
};
|
||||||
|
|
||||||
struct trace_event_file {
|
struct trace_event_file {
|
||||||
|
@ -439,10 +439,10 @@ ftrace_trigger_soft_disabled(struct trace_event_file *file)
|
||||||
{
|
{
|
||||||
unsigned long eflags = file->flags;
|
unsigned long eflags = file->flags;
|
||||||
|
|
||||||
if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
|
if (!(eflags & EVENT_FILE_FL_TRIGGER_COND)) {
|
||||||
if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
|
if (eflags & EVENT_FILE_FL_TRIGGER_MODE)
|
||||||
event_triggers_call(file, NULL);
|
event_triggers_call(file, NULL);
|
||||||
if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
|
if (eflags & EVENT_FILE_FL_SOFT_DISABLED)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -470,10 +470,10 @@ __event_trigger_test_discard(struct trace_event_file *file,
|
||||||
{
|
{
|
||||||
unsigned long eflags = file->flags;
|
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);
|
*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);
|
ring_buffer_discard_commit(buffer, event);
|
||||||
else if (!filter_check_discard(file, entry, buffer, event))
|
else if (!filter_check_discard(file, entry, buffer, event))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
* int __data_size;
|
* int __data_size;
|
||||||
* int pc;
|
* int pc;
|
||||||
*
|
*
|
||||||
* if (!(eflags & FTRACE_EVENT_FL_TRIGGER_COND)) {
|
* if (!(eflags & EVENT_FILE_FL_TRIGGER_COND)) {
|
||||||
* if (eflags & FTRACE_EVENT_FL_TRIGGER_MODE)
|
* if (eflags & EVENT_FILE_FL_TRIGGER_MODE)
|
||||||
* event_triggers_call(trace_file, NULL);
|
* event_triggers_call(trace_file, NULL);
|
||||||
* if (eflags & FTRACE_EVENT_FL_SOFT_DISABLED)
|
* if (eflags & EVENT_FILE_FL_SOFT_DISABLED)
|
||||||
* return;
|
* return;
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
* { <assign>; } <-- Here we assign the entries by the __field and
|
* { <assign>; } <-- Here we assign the entries by the __field and
|
||||||
* __array macros.
|
* __array macros.
|
||||||
*
|
*
|
||||||
* if (eflags & FTRACE_EVENT_FL_TRIGGER_COND)
|
* if (eflags & EVENT_FILE_FL_TRIGGER_COND)
|
||||||
* __tt = event_triggers_call(trace_file, entry);
|
* __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))
|
* &trace_file->flags))
|
||||||
* ring_buffer_discard_commit(buffer, event);
|
* ring_buffer_discard_commit(buffer, event);
|
||||||
* else if (!filter_check_discard(trace_file, entry, buffer, event))
|
* else if (!filter_check_discard(trace_file, entry, buffer, event))
|
||||||
|
|
|
@ -301,7 +301,7 @@ int filter_check_discard(struct trace_event_file *file, void *rec,
|
||||||
struct ring_buffer *buffer,
|
struct ring_buffer *buffer,
|
||||||
struct ring_buffer_event *event)
|
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)) {
|
!filter_match_preds(file->filter, rec)) {
|
||||||
ring_buffer_discard_commit(buffer, event);
|
ring_buffer_discard_commit(buffer, event);
|
||||||
return 1;
|
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
|
* to store the trace event for the tigger to use. It's recusive
|
||||||
* safe and will not be recorded anywhere.
|
* 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;
|
*current_rb = temp_buffer;
|
||||||
entry = trace_buffer_lock_reserve(*current_rb,
|
entry = trace_buffer_lock_reserve(*current_rb,
|
||||||
type, len, flags, pc);
|
type, len, flags, pc);
|
||||||
|
|
|
@ -298,15 +298,15 @@ void trace_event_enable_cmd_record(bool enable)
|
||||||
mutex_lock(&event_mutex);
|
mutex_lock(&event_mutex);
|
||||||
do_for_each_event_file(tr, file) {
|
do_for_each_event_file(tr, file) {
|
||||||
|
|
||||||
if (!(file->flags & FTRACE_EVENT_FL_ENABLED))
|
if (!(file->flags & EVENT_FILE_FL_ENABLED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (enable) {
|
if (enable) {
|
||||||
tracing_start_cmdline_record();
|
tracing_start_cmdline_record();
|
||||||
set_bit(FTRACE_EVENT_FL_RECORDED_CMD_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
|
||||||
} else {
|
} else {
|
||||||
tracing_stop_cmdline_record();
|
tracing_stop_cmdline_record();
|
||||||
clear_bit(FTRACE_EVENT_FL_RECORDED_CMD_BIT, &file->flags);
|
clear_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
|
||||||
}
|
}
|
||||||
} while_for_each_event_file();
|
} while_for_each_event_file();
|
||||||
mutex_unlock(&event_mutex);
|
mutex_unlock(&event_mutex);
|
||||||
|
@ -337,24 +337,24 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
|
||||||
if (soft_disable) {
|
if (soft_disable) {
|
||||||
if (atomic_dec_return(&file->sm_ref) > 0)
|
if (atomic_dec_return(&file->sm_ref) > 0)
|
||||||
break;
|
break;
|
||||||
disable = file->flags & FTRACE_EVENT_FL_SOFT_DISABLED;
|
disable = file->flags & EVENT_FILE_FL_SOFT_DISABLED;
|
||||||
clear_bit(FTRACE_EVENT_FL_SOFT_MODE_BIT, &file->flags);
|
clear_bit(EVENT_FILE_FL_SOFT_MODE_BIT, &file->flags);
|
||||||
} else
|
} else
|
||||||
disable = !(file->flags & FTRACE_EVENT_FL_SOFT_MODE);
|
disable = !(file->flags & EVENT_FILE_FL_SOFT_MODE);
|
||||||
|
|
||||||
if (disable && (file->flags & FTRACE_EVENT_FL_ENABLED)) {
|
if (disable && (file->flags & EVENT_FILE_FL_ENABLED)) {
|
||||||
clear_bit(FTRACE_EVENT_FL_ENABLED_BIT, &file->flags);
|
clear_bit(EVENT_FILE_FL_ENABLED_BIT, &file->flags);
|
||||||
if (file->flags & FTRACE_EVENT_FL_RECORDED_CMD) {
|
if (file->flags & EVENT_FILE_FL_RECORDED_CMD) {
|
||||||
tracing_stop_cmdline_record();
|
tracing_stop_cmdline_record();
|
||||||
clear_bit(FTRACE_EVENT_FL_RECORDED_CMD_BIT, &file->flags);
|
clear_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
|
||||||
}
|
}
|
||||||
call->class->reg(call, TRACE_REG_UNREGISTER, file);
|
call->class->reg(call, TRACE_REG_UNREGISTER, file);
|
||||||
}
|
}
|
||||||
/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT, else clear it */
|
/* If in SOFT_MODE, just set the SOFT_DISABLE_BIT, else clear it */
|
||||||
if (file->flags & FTRACE_EVENT_FL_SOFT_MODE)
|
if (file->flags & EVENT_FILE_FL_SOFT_MODE)
|
||||||
set_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
|
||||||
else
|
else
|
||||||
clear_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
|
clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
/*
|
/*
|
||||||
|
@ -366,22 +366,22 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
|
||||||
* it still seems to be disabled.
|
* it still seems to be disabled.
|
||||||
*/
|
*/
|
||||||
if (!soft_disable)
|
if (!soft_disable)
|
||||||
clear_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
|
clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
|
||||||
else {
|
else {
|
||||||
if (atomic_inc_return(&file->sm_ref) > 1)
|
if (atomic_inc_return(&file->sm_ref) > 1)
|
||||||
break;
|
break;
|
||||||
set_bit(FTRACE_EVENT_FL_SOFT_MODE_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_SOFT_MODE_BIT, &file->flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(file->flags & FTRACE_EVENT_FL_ENABLED)) {
|
if (!(file->flags & EVENT_FILE_FL_ENABLED)) {
|
||||||
|
|
||||||
/* Keep the event disabled, when going to SOFT_MODE. */
|
/* Keep the event disabled, when going to SOFT_MODE. */
|
||||||
if (soft_disable)
|
if (soft_disable)
|
||||||
set_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
|
||||||
|
|
||||||
if (trace_flags & TRACE_ITER_RECORD_CMD) {
|
if (trace_flags & TRACE_ITER_RECORD_CMD) {
|
||||||
tracing_start_cmdline_record();
|
tracing_start_cmdline_record();
|
||||||
set_bit(FTRACE_EVENT_FL_RECORDED_CMD_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_RECORDED_CMD_BIT, &file->flags);
|
||||||
}
|
}
|
||||||
ret = call->class->reg(call, TRACE_REG_REGISTER, file);
|
ret = call->class->reg(call, TRACE_REG_REGISTER, file);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
@ -390,7 +390,7 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
|
||||||
"%s\n", trace_event_name(call));
|
"%s\n", trace_event_name(call));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_bit(FTRACE_EVENT_FL_ENABLED_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_ENABLED_BIT, &file->flags);
|
||||||
|
|
||||||
/* WAS_ENABLED gets set but never cleared. */
|
/* WAS_ENABLED gets set but never cleared. */
|
||||||
call->flags |= TRACE_EVENT_FL_WAS_ENABLED;
|
call->flags |= TRACE_EVENT_FL_WAS_ENABLED;
|
||||||
|
@ -716,7 +716,7 @@ s_next(struct seq_file *m, void *v, loff_t *pos)
|
||||||
(*pos)++;
|
(*pos)++;
|
||||||
|
|
||||||
list_for_each_entry_continue(file, &tr->events, list) {
|
list_for_each_entry_continue(file, &tr->events, list) {
|
||||||
if (file->flags & FTRACE_EVENT_FL_ENABLED)
|
if (file->flags & EVENT_FILE_FL_ENABLED)
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -774,12 +774,12 @@ event_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
|
||||||
if (!file)
|
if (!file)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (flags & FTRACE_EVENT_FL_ENABLED &&
|
if (flags & EVENT_FILE_FL_ENABLED &&
|
||||||
!(flags & FTRACE_EVENT_FL_SOFT_DISABLED))
|
!(flags & EVENT_FILE_FL_SOFT_DISABLED))
|
||||||
strcpy(buf, "1");
|
strcpy(buf, "1");
|
||||||
|
|
||||||
if (flags & FTRACE_EVENT_FL_SOFT_DISABLED ||
|
if (flags & EVENT_FILE_FL_SOFT_DISABLED ||
|
||||||
flags & FTRACE_EVENT_FL_SOFT_MODE)
|
flags & EVENT_FILE_FL_SOFT_MODE)
|
||||||
strcat(buf, "*");
|
strcat(buf, "*");
|
||||||
|
|
||||||
strcat(buf, "\n");
|
strcat(buf, "\n");
|
||||||
|
@ -851,7 +851,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt,
|
||||||
* or if all events or cleared, or if we have
|
* or if all events or cleared, or if we have
|
||||||
* a mixture.
|
* a mixture.
|
||||||
*/
|
*/
|
||||||
set |= (1 << !!(file->flags & FTRACE_EVENT_FL_ENABLED));
|
set |= (1 << !!(file->flags & EVENT_FILE_FL_ENABLED));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we have a mixture, no need to look further.
|
* If we have a mixture, no need to look further.
|
||||||
|
@ -1932,10 +1932,10 @@ static int probe_remove_event_call(struct trace_event_call *call)
|
||||||
continue;
|
continue;
|
||||||
/*
|
/*
|
||||||
* We can't rely on ftrace_event_enable_disable(enable => 0)
|
* We can't rely on ftrace_event_enable_disable(enable => 0)
|
||||||
* we are going to do, FTRACE_EVENT_FL_SOFT_MODE can suppress
|
* we are going to do, EVENT_FILE_FL_SOFT_MODE can suppress
|
||||||
* TRACE_REG_UNREGISTER.
|
* TRACE_REG_UNREGISTER.
|
||||||
*/
|
*/
|
||||||
if (file->flags & FTRACE_EVENT_FL_ENABLED)
|
if (file->flags & EVENT_FILE_FL_ENABLED)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
/*
|
/*
|
||||||
* The do_for_each_event_file_safe() is
|
* The do_for_each_event_file_safe() is
|
||||||
|
@ -2114,9 +2114,9 @@ event_enable_probe(unsigned long ip, unsigned long parent_ip, void **_data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (data->enable)
|
if (data->enable)
|
||||||
clear_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &data->file->flags);
|
clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &data->file->flags);
|
||||||
else
|
else
|
||||||
set_bit(FTRACE_EVENT_FL_SOFT_DISABLED_BIT, &data->file->flags);
|
set_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &data->file->flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -2132,7 +2132,7 @@ event_enable_count_probe(unsigned long ip, unsigned long parent_ip, void **_data
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Skip if the event is in a state we want to switch to */
|
/* Skip if the event is in a state we want to switch to */
|
||||||
if (data->enable == !(data->file->flags & FTRACE_EVENT_FL_SOFT_DISABLED))
|
if (data->enable == !(data->file->flags & EVENT_FILE_FL_SOFT_DISABLED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (data->count != -1)
|
if (data->count != -1)
|
||||||
|
@ -2793,7 +2793,7 @@ static __init void event_trace_self_tests(void)
|
||||||
* If an event is already enabled, someone is using
|
* If an event is already enabled, someone is using
|
||||||
* it and the self test should not be on.
|
* it and the self test should not be on.
|
||||||
*/
|
*/
|
||||||
if (file->flags & FTRACE_EVENT_FL_ENABLED) {
|
if (file->flags & EVENT_FILE_FL_ENABLED) {
|
||||||
pr_warn("Enabled event during self test!\n");
|
pr_warn("Enabled event during self test!\n");
|
||||||
WARN_ON_ONCE(1);
|
WARN_ON_ONCE(1);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -787,7 +787,7 @@ static void filter_disable(struct trace_event_file *file)
|
||||||
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||||
call->flags &= ~TRACE_EVENT_FL_FILTERED;
|
call->flags &= ~TRACE_EVENT_FL_FILTERED;
|
||||||
else
|
else
|
||||||
file->flags &= ~FTRACE_EVENT_FL_FILTERED;
|
file->flags &= ~EVENT_FILE_FL_FILTERED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __free_filter(struct event_filter *filter)
|
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)
|
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||||
call->flags |= TRACE_EVENT_FL_FILTERED;
|
call->flags |= TRACE_EVENT_FL_FILTERED;
|
||||||
else
|
else
|
||||||
file->flags |= FTRACE_EVENT_FL_FILTERED;
|
file->flags |= EVENT_FILE_FL_FILTERED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void event_set_filter(struct trace_event_file *file,
|
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)
|
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||||
call->flags |= TRACE_EVENT_FL_NO_SET_FILTER;
|
call->flags |= TRACE_EVENT_FL_NO_SET_FILTER;
|
||||||
else
|
else
|
||||||
file->flags |= FTRACE_EVENT_FL_NO_SET_FILTER;
|
file->flags |= EVENT_FILE_FL_NO_SET_FILTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
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)
|
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
|
||||||
call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER;
|
call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER;
|
||||||
else
|
else
|
||||||
file->flags &= ~FTRACE_EVENT_FL_NO_SET_FILTER;
|
file->flags &= ~EVENT_FILE_FL_NO_SET_FILTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
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;
|
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;
|
return true;
|
||||||
|
|
||||||
if ((call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) &&
|
if ((call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) &&
|
||||||
|
|
|
@ -438,12 +438,12 @@ static int trace_event_trigger_enable_disable(struct trace_event_file *file,
|
||||||
if (trigger_enable) {
|
if (trigger_enable) {
|
||||||
if (atomic_inc_return(&file->tm_ref) > 1)
|
if (atomic_inc_return(&file->tm_ref) > 1)
|
||||||
return ret;
|
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);
|
ret = trace_event_enable_disable(file, 1, 1);
|
||||||
} else {
|
} else {
|
||||||
if (atomic_dec_return(&file->tm_ref) > 0)
|
if (atomic_dec_return(&file->tm_ref) > 0)
|
||||||
return ret;
|
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);
|
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)
|
if (set_cond)
|
||||||
set_bit(FTRACE_EVENT_FL_TRIGGER_COND_BIT, &file->flags);
|
set_bit(EVENT_FILE_FL_TRIGGER_COND_BIT, &file->flags);
|
||||||
else
|
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;
|
struct enable_trigger_data *enable_data = data->private_data;
|
||||||
|
|
||||||
if (enable_data->enable)
|
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
|
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
|
static void
|
||||||
|
@ -1077,7 +1077,7 @@ event_enable_count_trigger(struct event_trigger_data *data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Skip if the event is in a state we want to switch to */
|
/* 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;
|
return;
|
||||||
|
|
||||||
if (data->count != -1)
|
if (data->count != -1)
|
||||||
|
|
Loading…
Reference in New Issue