[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 9 Sep 2015 16:50:22 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Kan Liang <kan.liang@...el.com>
Cc: Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Borislav Petkov <bp@...e.de>, David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Namhyung Kim <namhyung@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
Wang Nan <wangnan0@...wei.com>
Subject: [PATCH 10/13] perf report: Do not blindly use env->cpu[al.cpu].socket_id
From: Arnaldo Carvalho de Melo <acme@...hat.com>
As al.cpu may be -1, i.e. no PERF_SAMPLE_CPU, and env->cpu may be NULL.
Rely instead on the work now done in perf_event__preprocess_sample(),
that does all those checks.
Reported-by: Wang Nan <wangnan0@...wei.com>
Based-on-a-patch-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Borislav Petkov <bp@...e.de>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Kan Liang <kan.liang@...el.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-2lw80g5ehsrec7tozhmnjgxw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-report.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 4b432453922f..9b5083630a56 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -150,7 +150,6 @@ static int process_sample_event(struct perf_tool *tool,
.add_entry_cb = hist_iter__report_callback,
};
int ret = 0;
- struct perf_env *env = evsel->evlist->env;
if (perf_event__preprocess_sample(event, machine, &al, sample) < 0) {
pr_debug("problem processing %d event, skipping it.\n",
@@ -158,9 +157,6 @@ static int process_sample_event(struct perf_tool *tool,
return -1;
}
- /* read socket id from perf.data for perf report */
- al.socket = env->cpu[al.cpu].socket_id;
-
if (rep->hide_unresolved && al.sym == NULL)
goto out_put;
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists