Skip to content

Commit dcb0b55

Browse files
committed
tracing: Remove TRACE_EVENT_FL_USE_CALL_FILTER logic
Nothing sets TRACE_EVENT_FL_USE_CALL_FILTER anymore. Remove it. Signed-off-by: Steven Rostedt <[email protected]>
1 parent 904d185 commit dcb0b55

File tree

2 files changed

+10
-64
lines changed

2 files changed

+10
-64
lines changed

include/linux/trace_events.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ enum {
214214
TRACE_EVENT_FL_NO_SET_FILTER_BIT,
215215
TRACE_EVENT_FL_IGNORE_ENABLE_BIT,
216216
TRACE_EVENT_FL_WAS_ENABLED_BIT,
217-
TRACE_EVENT_FL_USE_CALL_FILTER_BIT,
218217
TRACE_EVENT_FL_TRACEPOINT_BIT,
219218
TRACE_EVENT_FL_KPROBE_BIT,
220219
TRACE_EVENT_FL_UPROBE_BIT,
@@ -229,7 +228,6 @@ enum {
229228
* WAS_ENABLED - Set and stays set when an event was ever enabled
230229
* (used for module unloading, if a module event is enabled,
231230
* it is best to clear the buffers that used it).
232-
* USE_CALL_FILTER - For trace internal events, don't use file filter
233231
* TRACEPOINT - Event is a tracepoint
234232
* KPROBE - Event is a kprobe
235233
* UPROBE - Event is a uprobe
@@ -240,7 +238,6 @@ enum {
240238
TRACE_EVENT_FL_NO_SET_FILTER = (1 << TRACE_EVENT_FL_NO_SET_FILTER_BIT),
241239
TRACE_EVENT_FL_IGNORE_ENABLE = (1 << TRACE_EVENT_FL_IGNORE_ENABLE_BIT),
242240
TRACE_EVENT_FL_WAS_ENABLED = (1 << TRACE_EVENT_FL_WAS_ENABLED_BIT),
243-
TRACE_EVENT_FL_USE_CALL_FILTER = (1 << TRACE_EVENT_FL_USE_CALL_FILTER_BIT),
244241
TRACE_EVENT_FL_TRACEPOINT = (1 << TRACE_EVENT_FL_TRACEPOINT_BIT),
245242
TRACE_EVENT_FL_KPROBE = (1 << TRACE_EVENT_FL_KPROBE_BIT),
246243
TRACE_EVENT_FL_UPROBE = (1 << TRACE_EVENT_FL_UPROBE_BIT),

kernel/trace/trace_events_filter.c

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,7 @@ static void append_filter_err(struct filter_parse_state *ps,
689689

690690
static inline struct event_filter *event_filter(struct trace_event_file *file)
691691
{
692-
if (file->event_call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
693-
return file->event_call->filter;
694-
else
695-
return file->filter;
692+
return file->filter;
696693
}
697694

698695
/* caller must hold event_mutex */
@@ -826,12 +823,7 @@ static void __free_preds(struct event_filter *filter)
826823

827824
static void filter_disable(struct trace_event_file *file)
828825
{
829-
struct trace_event_call *call = file->event_call;
830-
831-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
832-
call->flags &= ~TRACE_EVENT_FL_FILTERED;
833-
else
834-
file->flags &= ~EVENT_FILE_FL_FILTERED;
826+
file->flags &= ~EVENT_FILE_FL_FILTERED;
835827
}
836828

837829
static void __free_filter(struct event_filter *filter)
@@ -883,13 +875,8 @@ static int __alloc_preds(struct event_filter *filter, int n_preds)
883875

884876
static inline void __remove_filter(struct trace_event_file *file)
885877
{
886-
struct trace_event_call *call = file->event_call;
887-
888878
filter_disable(file);
889-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
890-
remove_filter_string(call->filter);
891-
else
892-
remove_filter_string(file->filter);
879+
remove_filter_string(file->filter);
893880
}
894881

895882
static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir,
@@ -906,15 +893,8 @@ static void filter_free_subsystem_preds(struct trace_subsystem_dir *dir,
906893

907894
static inline void __free_subsystem_filter(struct trace_event_file *file)
908895
{
909-
struct trace_event_call *call = file->event_call;
910-
911-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) {
912-
__free_filter(call->filter);
913-
call->filter = NULL;
914-
} else {
915-
__free_filter(file->filter);
916-
file->filter = NULL;
917-
}
896+
__free_filter(file->filter);
897+
file->filter = NULL;
918898
}
919899

920900
static void filter_free_subsystem_filters(struct trace_subsystem_dir *dir,
@@ -1718,69 +1698,38 @@ static int replace_preds(struct trace_event_call *call,
17181698

17191699
static inline void event_set_filtered_flag(struct trace_event_file *file)
17201700
{
1721-
struct trace_event_call *call = file->event_call;
1722-
1723-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
1724-
call->flags |= TRACE_EVENT_FL_FILTERED;
1725-
else
1726-
file->flags |= EVENT_FILE_FL_FILTERED;
1701+
file->flags |= EVENT_FILE_FL_FILTERED;
17271702
}
17281703

17291704
static inline void event_set_filter(struct trace_event_file *file,
17301705
struct event_filter *filter)
17311706
{
1732-
struct trace_event_call *call = file->event_call;
1733-
1734-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
1735-
rcu_assign_pointer(call->filter, filter);
1736-
else
1737-
rcu_assign_pointer(file->filter, filter);
1707+
rcu_assign_pointer(file->filter, filter);
17381708
}
17391709

17401710
static inline void event_clear_filter(struct trace_event_file *file)
17411711
{
1742-
struct trace_event_call *call = file->event_call;
1743-
1744-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
1745-
RCU_INIT_POINTER(call->filter, NULL);
1746-
else
1747-
RCU_INIT_POINTER(file->filter, NULL);
1712+
RCU_INIT_POINTER(file->filter, NULL);
17481713
}
17491714

17501715
static inline void
17511716
event_set_no_set_filter_flag(struct trace_event_file *file)
17521717
{
1753-
struct trace_event_call *call = file->event_call;
1754-
1755-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
1756-
call->flags |= TRACE_EVENT_FL_NO_SET_FILTER;
1757-
else
1758-
file->flags |= EVENT_FILE_FL_NO_SET_FILTER;
1718+
file->flags |= EVENT_FILE_FL_NO_SET_FILTER;
17591719
}
17601720

17611721
static inline void
17621722
event_clear_no_set_filter_flag(struct trace_event_file *file)
17631723
{
1764-
struct trace_event_call *call = file->event_call;
1765-
1766-
if (call->flags & TRACE_EVENT_FL_USE_CALL_FILTER)
1767-
call->flags &= ~TRACE_EVENT_FL_NO_SET_FILTER;
1768-
else
1769-
file->flags &= ~EVENT_FILE_FL_NO_SET_FILTER;
1724+
file->flags &= ~EVENT_FILE_FL_NO_SET_FILTER;
17701725
}
17711726

17721727
static inline bool
17731728
event_no_set_filter_flag(struct trace_event_file *file)
17741729
{
1775-
struct trace_event_call *call = file->event_call;
1776-
17771730
if (file->flags & EVENT_FILE_FL_NO_SET_FILTER)
17781731
return true;
17791732

1780-
if ((call->flags & TRACE_EVENT_FL_USE_CALL_FILTER) &&
1781-
(call->flags & TRACE_EVENT_FL_NO_SET_FILTER))
1782-
return true;
1783-
17841733
return false;
17851734
}
17861735

0 commit comments

Comments
 (0)