perf evlist: Renane set_filters method to apply_filters
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Sep 2012 17:43:13 +0000 (14:43 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Sep 2012 17:45:16 +0000 (14:45 -0300)
Because that is what it really does, i.e. it applies the filters that
were parsed from the command line and stashed into the evsels they refer
to.

We'll need the set_filter method name to actually apply a filter to all
the evsels in an evlist, for instance, to ask that a syswide tracer
doesn't trace itself.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c
tools/perf/builtin-stat.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h

index 2cb74343de3e29e876a2698e8d29271ab7b7c3c1..f14cb5fdb91fb0b3a9c0894367c98570b15f85e6 100644 (file)
@@ -320,7 +320,7 @@ try_again:
                }
        }
 
-       if (perf_evlist__set_filters(evlist)) {
+       if (perf_evlist__apply_filters(evlist)) {
                error("failed to set filter with %d (%s)\n", errno,
                        strerror(errno));
                rc = -1;
index e0f65fe65944cb5717ed015450df50991e8f2078..e8cd4d81b06e583a4e73f02a3bf92e8a60e411eb 100644 (file)
@@ -478,7 +478,7 @@ static int run_perf_stat(int argc __maybe_unused, const char **argv)
                counter->supported = true;
        }
 
-       if (perf_evlist__set_filters(evsel_list)) {
+       if (perf_evlist__apply_filters(evsel_list)) {
                error("failed to set filter with %d (%s)\n", errno,
                        strerror(errno));
                return -1;
index 704bd91ce05dc5fd9c6fd7403bb88ae47ca10213..c3ec7878985baa9cf84058a39bb9a7d375afded5 100644 (file)
@@ -666,7 +666,7 @@ void perf_evlist__delete_maps(struct perf_evlist *evlist)
        evlist->threads = NULL;
 }
 
-int perf_evlist__set_filters(struct perf_evlist *evlist)
+int perf_evlist__apply_filters(struct perf_evlist *evlist)
 {
        const struct thread_map *threads = evlist->threads;
        const struct cpu_map *cpus = evlist->cpus;
index 008a95702bf7105ae81e41e5684f266e8d5c54a2..25e49e02810a1f8a0ecc95eac366ed8db2ae9efa 100644 (file)
@@ -115,7 +115,7 @@ static inline void perf_evlist__set_maps(struct perf_evlist *evlist,
 int perf_evlist__create_maps(struct perf_evlist *evlist,
                             struct perf_target *target);
 void perf_evlist__delete_maps(struct perf_evlist *evlist);
-int perf_evlist__set_filters(struct perf_evlist *evlist);
+int perf_evlist__apply_filters(struct perf_evlist *evlist);
 
 void __perf_evlist__set_leader(struct list_head *list);
 void perf_evlist__set_leader(struct perf_evlist *evlist);