Skip to content

tracing: ->filter cleanups

Oleg Nesterov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest7 patches 4 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7tracing: kill destroy_preds() and destroy_file_preds()include/linux/ftrace_event.h kernel/trace/trace_events.c kernel/trace/trace_events_filter.c+0 -220 replies
2/7tracing: kill destroy_call_preds()include/linux/ftrace_event.h kernel/trace/trace_events.c kernel/trace/trace_events_filter.c+2 -80 replies
3/7tracing: kill call_filter_disable()kernel/trace/trace_events_filter.c+1 -60 replies
4/7tracing/uprobes: kill the dead TRACE_EVENT_FL_USE_CALL_FILTER logickernel/trace/trace_uprobe.c+1 -20 replies
5/7tracing: kill ftrace_event_call->filesinclude/linux/ftrace_event.h+0 -10 replies
6/7tracing: change apply_subsystem_event_filter() paths to check file->system == dirkernel/trace/trace_events_filter.c+16 -233 replies
7/7tracing: kill "filter_string" arg of replace_preds()kernel/trace/trace_events_filter.c+3 -60 replies

Reviews trailers per patch

1 of 7 patches has a Reviewed-by or Acked-by.

PatchSrikar Dronamraju
1/7
2/7
3/7
4/7A-b
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/7] tracing: ->filter cleanups

Hello,

To avoid the confusion, let me resend everything (except the 1st patch you already applied) with v2 tag.

Changes:

4/7 - fix the typo in changelog, add the ack from Srikar

6/7 - by discussion with you and Namhyung: pass dir rather
then system, update replace_system_preds() as well.

7/7 - new, cosmetic/trivial.

I tried to play with "filter" files, everything seems to work with the additional debugging patch below.

Oleg.
---

kernel/trace/trace_events_filter.c +4 -0
index 7a8c152..4c16229 100644
@@ -848,6 +848,7 @@ static void filter_free_subsystem_preds(struct ftrace_subsystem_dir *dir,
 	struct ftrace_event_file *file;
 
 	list_for_each_entry(file, &tr->events, list) {
+BUG_ON((file->system != dir) != !!strcmp(file->event_call->class->system, dir->subsystem->name));
 		if (file->system != dir)
 			continue;
 		__remove_filter(file);
@@ -873,6 +874,7 @@ static void filter_free_subsystem_filters(struct ftrace_subsystem_dir *dir,
 	struct ftrace_event_file *file;
 
 	list_for_each_entry(file, &tr->events, list) {
+BUG_ON((file->system != dir) != !!strcmp(file->event_call->class->system, dir->subsystem->name));
 		if (file->system != dir)
 			continue;
 		__free_subsystem_filter(file);
@@ -1731,6 +1733,7 @@ static int replace_system_preds(struct ftrace_subsystem_dir *dir,
 	int err;
 
 	list_for_each_entry(file, &tr->events, list) {
+BUG_ON((file->system != dir) != !!strcmp(file->event_call->class->system, dir->subsystem->name));
 		if (file->system != dir)
 			continue;
 
@@ -1748,6 +1751,7 @@ static int replace_system_preds(struct ftrace_subsystem_dir *dir,
 	list_for_each_entry(file, &tr->events, list) {
 		struct event_filter *filter;
 
+BUG_ON((file->system != dir) != !!strcmp(file->event_call->class->system, dir->subsystem->name));
 		if (file->system != dir)
 			continue;