diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-11-11 11:03:59 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-11-11 11:03:59 +0300 |
commit | 529b3ca8323e282485b7c880e4cd26eaba15934f (patch) | |
tree | 8575044e2ff66eb976c6629ea3e705893d857ff9 /tools | |
parent | ca91659962303d4fd5211a5e4e13df5cbb11e744 (diff) | |
parent | 33974a414ce2324554f75dbd204ff0868f499e32 (diff) | |
download | linux-529b3ca8323e282485b7c880e4cd26eaba15934f.tar.xz |
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf tooling fixes from Arnaldo Carvalho de Melo.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-trace.c | 10 | ||||
-rw-r--r-- | tools/perf/util/parse-events.l | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 771ddab94bb0..d5d7fff1c211 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1138,6 +1138,14 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist) return err; } +static void trace__symbols__exit(struct trace *trace) +{ + machine__exit(trace->host); + trace->host = NULL; + + symbol__exit(); +} + static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args) { int idx; @@ -2481,6 +2489,8 @@ out_disable: } out_delete_evlist: + trace__symbols__exit(trace); + perf_evlist__delete(evlist); trace->evlist = NULL; trace->live = false; diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 6680e4fb7967..025729510525 100644 --- a/tools/perf/util/parse-events.l +++ b/tools/perf/util/parse-events.l @@ -5,6 +5,7 @@ %option stack %option bison-locations %option yylineno +%option reject %{ #include <errno.h> @@ -339,8 +340,8 @@ r{num_raw_hex} { return raw(yyscanner); } {num_hex} { return value(yyscanner, 16); } {modifier_event} { return str(yyscanner, PE_MODIFIER_EVENT); } -{bpf_object} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_OBJECT); } -{bpf_source} { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); } +{bpf_object} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_OBJECT); } +{bpf_source} { if (!isbpf(yyscanner)) { USER_REJECT }; return str(yyscanner, PE_BPF_SOURCE); } {name} { return pmu_str_check(yyscanner); } "/" { BEGIN(config); return '/'; } - { return '-'; } |