perf evsel: Handle precise_ip fallback in evsel__open_cpu()
authorRiccardo Mancini <rickyman7@gmail.com>
Sat, 21 Aug 2021 09:19:30 +0000 (11:19 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 31 Aug 2021 19:52:27 +0000 (16:52 -0300)
commit28667a526980bd713ccd55e955e9a9a9c9bc7724
tree31c8a34f09ae95864482c55385e2a5f36c1157d3
parent91233d003b0906f146765fbef3572509c99d9386
perf evsel: Handle precise_ip fallback in evsel__open_cpu()

This is another patch in the effort to separate the fallback mechanisms
from the open itself.

In case of precise_ip fallback, the original precise_ip will be stored
in the evsel (it was stored in a local variable) and the open will be
retried. Since the precise_ip fallback will be the first in the chain of
fallbacks, there should be no functional change with this patch.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/74208c433d2024a6c4af9c0b140b54ed6b5ea810.1629490974.git.rickyman7@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h