Commit 792bc998 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf record: Fix debug message placement for test consumption

evlist__config() might mess up the debug output consumed by test
"Test per-thread recording" in "Miscellaneous Intel PT testing".

Move it out from between the debug prints:

  "perf record opening and mmapping events" and
  "perf record done opening and mmapping events"

Fixes: da406202 ("perf tools: Add debug messages and comments for testing")
Closes: https://lore.kernel.org/linux-perf-users/ZhVfc5jYLarnGzKa@x1/Reported-by: default avatarArnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240411075447.17306-1-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 873a8373
...@@ -1355,8 +1355,6 @@ static int record__open(struct record *rec) ...@@ -1355,8 +1355,6 @@ static int record__open(struct record *rec)
struct record_opts *opts = &rec->opts; struct record_opts *opts = &rec->opts;
int rc = 0; int rc = 0;
evlist__config(evlist, opts, &callchain_param);
evlist__for_each_entry(evlist, pos) { evlist__for_each_entry(evlist, pos) {
try_again: try_again:
if (evsel__open(pos, pos->core.cpus, pos->core.threads) < 0) { if (evsel__open(pos, pos->core.cpus, pos->core.threads) < 0) {
...@@ -2483,6 +2481,8 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) ...@@ -2483,6 +2481,8 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
evlist__uniquify_name(rec->evlist); evlist__uniquify_name(rec->evlist);
evlist__config(rec->evlist, opts, &callchain_param);
/* Debug message used by test scripts */ /* Debug message used by test scripts */
pr_debug3("perf record opening and mmapping events\n"); pr_debug3("perf record opening and mmapping events\n");
if (record__open(rec) != 0) { if (record__open(rec) != 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment