diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-08-22 08:45:46 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-08-22 08:45:46 +0200 |
commit | 0e53909a1cf0153736fb52c216558a65530d8c40 (patch) | |
tree | 3073fe02fc1398d6a60bbba4399df84d57cc9741 /tools/lib/traceevent/event-parse.c | |
parent | 82819ffb42fb45197bacf3223191deca31d3eb91 (diff) | |
parent | 1c0bd0e891aaed0219010bfe79b32e1b0b82d662 (diff) | |
download | linux-0e53909a1cf0153736fb52c216558a65530d8c40.tar.gz linux-0e53909a1cf0153736fb52c216558a65530d8c40.tar.xz |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Fix segfault using 'perf script --show-mmap-events', affects
only current perf/core. (Adrian Hunter)
- /proc/kcore requires CAP_SYS_RAWIO message too noisy, make it
debug only. (Adrian Hunter)
- Fix Intel PT timestamp handling. (Adrian Hunter)
- Add Intel BTS support, with a call-graph script to show it and
PT in use in a GUI using 'perf script' python scripting with
postgresql and Qt. (Adrian Hunter)
- Add checks for returned EVENT_ERROR type in libtraceevent, fixing
a bug that surfaced on arm64 systems. (Dean Nelson)
- Fallback to using kallsyms when libdw fails to handle a vmlinux file,
that can happen, for instance, when perf is statically linked and
then libdw fails to load libebl_{arch}.so. (Wang Nan)
Infrastructure changes:
- Initialize reference counts in map__clone(). (Arnaldo Carvalho de Melo)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index fcd8a9e3d2e1..5c1867a13ef2 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -1745,6 +1745,9 @@ process_cond(struct event_format *event, struct print_arg *top, char **tok) type = process_arg(event, left, &token); again: + if (type == EVENT_ERROR) + goto out_free; + /* Handle other operations in the arguments */ if (type == EVENT_OP && strcmp(token, ":") != 0) { type = process_op(event, left, &token); @@ -2004,6 +2007,12 @@ process_op(struct event_format *event, struct print_arg *arg, char **tok) goto out_warn_free; type = process_arg_token(event, right, tok, type); + if (type == EVENT_ERROR) { + free_arg(right); + /* token was freed in process_arg_token() via *tok */ + token = NULL; + goto out_free; + } if (right->type == PRINT_OP && get_op_prio(arg->op.op) < get_op_prio(right->op.op)) { |