[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-a4066d64d9391a734ee0e49c8d2757f5685013b4@git.kernel.org>
Date: Fri, 21 Jun 2019 23:44:26 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, adrian.hunter@...el.com, jolsa@...nel.org,
namhyung@...nel.org, alexander.shishkin@...ux.intel.com,
suzuki.poulose@....com, mingo@...nel.org, hpa@...or.com,
linux-kernel@...r.kernel.org, acme@...hat.com,
mathieu.poirier@...aro.org, mike.leach@...aro.org,
leo.yan@...aro.org
Subject: [tip:perf/core] perf trace: Fix exclusion of not available syscall
names from selector list
Commit-ID: a4066d64d9391a734ee0e49c8d2757f5685013b4
Gitweb: https://git.kernel.org/tip/a4066d64d9391a734ee0e49c8d2757f5685013b4
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 13 Jun 2019 17:35:09 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 17 Jun 2019 15:57:19 -0300
perf trace: Fix exclusion of not available syscall names from selector list
We were just skipping the syscalls not available in a particular
architecture without reflecting this in the number of entries in the
ev_qualifier_ids.nr variable, fix it.
This was done with the most minimalistic way, reusing the index variable
'i', a followup patch will further clean this by making 'i' renamed to
'nr_used' and using 'nr_allocated' in a few more places.
Reported-by: Leo Yan <leo.yan@...aro.org>
Tested-by: Leo Yan <leo.yan@...aro.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
Cc: Mike Leach <mike.leach@...aro.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Suzuki K Poulose <suzuki.poulose@....com>
Fixes: 04c41bcb862b ("perf trace: Skip unknown syscalls when expanding strace like syscall groups")
Link: https://lkml.kernel.org/r/20190613181514.GC1402@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-trace.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 12f5ad98f8c1..fa9eb467eb4c 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1527,9 +1527,9 @@ 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;
+ size_t nr_allocated, i;
struct str_node *pos;
trace->ev_qualifier_ids.nr = strlist__nr_entries(trace->ev_qualifier);
@@ -1574,7 +1574,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 == i) {
void *entries;
nr_allocated += 8;
@@ -1587,11 +1587,11 @@ matches:
}
trace->ev_qualifier_ids.entries = entries;
}
- trace->ev_qualifier_ids.nr++;
trace->ev_qualifier_ids.entries[i++] = id;
}
}
+ trace->ev_qualifier_ids.nr = i;
out:
if (printed_invalid_prefix)
pr_debug("\n");
Powered by blists - more mailing lists