diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-03 16:05:50 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-07-06 09:46:36 -0400 |
commit | 12467ae4e37aab5e263cc9ab6b6909ae0588844c (patch) | |
tree | 4d14657427613c61d34639c9c006ee2dcfbb54d2 /tools/perf/util/parse-events.c | |
parent | f47805a2af3ba83881ca52434bbbc6e9886b72fd (diff) |
perf evsel: Introduce set_filter method
Replaces existing filter string with the one provided.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-jst49z83li0yx3g18o54u51a@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 09f8d2357108..a71eeb279ed2 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -1177,8 +1177,7 @@ int parse_filter(const struct option *opt, const char *str, | |||
1177 | return -1; | 1177 | return -1; |
1178 | } | 1178 | } |
1179 | 1179 | ||
1180 | last->filter = strdup(str); | 1180 | if (perf_evsel__set_filter(last, str) < 0) { |
1181 | if (last->filter == NULL) { | ||
1182 | fprintf(stderr, "not enough memory to hold filter string\n"); | 1181 | fprintf(stderr, "not enough memory to hold filter string\n"); |
1183 | return -1; | 1182 | return -1; |
1184 | } | 1183 | } |