diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-06-22 08:27:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-06-22 08:27:05 +0200 |
commit | a3664a74a0aa0b11d8d4ade04984965b77d14d44 (patch) | |
tree | 38d4309390ad01026ff59c2c9bd6441a9bde1363 /tools/perf/builtin-trace.c | |
parent | 3ce5aceb5dee298b082adfa2baa0df5a447c1b0b (diff) | |
parent | 3469fa84c1631face938efc42b3f488a2c2504e0 (diff) |
Merge tag 'perf-core-for-mingo-5.3-20190621' 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:
perf trace:
Arnaldo Carvalho de Melo:
- Fix exclusion of not available syscall names from selector list.
- Fixup pointer arithmetic when consuming augmented syscall args.
Intel PT:
Adrian Hunter:
- Add support for decoding PEBS via PT packets. See:
https://software.intel.com/en-us/articles/intel-sdm
May 2019 version: Vol. 3B 18.5.5.2 PEBS output to IntelĀ® Processor Trace
for more details about it.
ARM64:
John Garry:
- Fix uncore PMU alias list for ARM64
Raphael Gault:
- Compile tests unconditionally.
cs-etm:
Mathieu Poirier:
- Optimize option setup for CPU-wide sessions.
build:
Florian Fainelli:
- Don't hardcode host include path for libslang, fixing up building with it
in cross build environments.
Arnaldo Carvalho de Melo:
- Check if gettid() is available before providing helper, fixing the build
when using the latest glibc version, where a helper for gettid() is finally
present.
- Fix building with libslang in systems where it is located in slang/slang.h.
- Fix fast path test for zstd library.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 12f5ad98f8c1c..f3532b081b317 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1239,7 +1239,7 @@ static size_t syscall_arg__scnprintf_augmented_string(struct syscall_arg *arg, c */ int consumed = sizeof(*augmented_arg) + augmented_arg->size; - arg->augmented.args += consumed; + arg->augmented.args = ((void *)arg->augmented.args) + consumed; arg->augmented.size -= consumed; return printed; @@ -1527,13 +1527,12 @@ static int trace__read_syscall_info(struct trace *trace, int id) static int trace__validate_ev_qualifier(struct trace *trace) { - int err = 0, i; + int err = 0; bool printed_invalid_prefix = false; - size_t nr_allocated; struct str_node *pos; + size_t nr_used = 0, nr_allocated = strlist__nr_entries(trace->ev_qualifier); - trace->ev_qualifier_ids.nr = strlist__nr_entries(trace->ev_qualifier); - trace->ev_qualifier_ids.entries = malloc(trace->ev_qualifier_ids.nr * + trace->ev_qualifier_ids.entries = malloc(nr_allocated * sizeof(trace->ev_qualifier_ids.entries[0])); if (trace->ev_qualifier_ids.entries == NULL) { @@ -1543,9 +1542,6 @@ static int trace__validate_ev_qualifier(struct trace *trace) goto out; } - nr_allocated = trace->ev_qualifier_ids.nr; - i = 0; - strlist__for_each_entry(pos, trace->ev_qualifier) { const char *sc = pos->s; int id = syscalltbl__id(trace->sctbl, sc), match_next = -1; @@ -1566,7 +1562,7 @@ static int trace__validate_ev_qualifier(struct trace *trace) continue; } matches: - trace->ev_qualifier_ids.entries[i++] = id; + trace->ev_qualifier_ids.entries[nr_used++] = id; if (match_next == -1) continue; @@ -1574,7 +1570,7 @@ matches: id = syscalltbl__strglobmatch_next(trace->sctbl, sc, &match_next); if (id < 0) break; - if (nr_allocated == trace->ev_qualifier_ids.nr) { + if (nr_allocated == nr_used) { void *entries; nr_allocated += 8; @@ -1587,11 +1583,11 @@ matches: } trace->ev_qualifier_ids.entries = entries; } - trace->ev_qualifier_ids.nr++; - trace->ev_qualifier_ids.entries[i++] = id; + trace->ev_qualifier_ids.entries[nr_used++] = id; } } + trace->ev_qualifier_ids.nr = nr_used; out: if (printed_invalid_prefix) pr_debug("\n"); |