Skip to content
Commit 46def08f authored by Riccardo Mancini's avatar Riccardo Mancini Committed by Arnaldo Carvalho de Melo
Browse files

perf evsel: Save open flags in evsel in prepare_open()



This patch caches the flags used in perf_event_open() inside evsel, so
that they can be set in __evsel__prepare_open() (this will be useful in
patches in the workqueue series, when the fallback mechanisms will be
handled outside the open itself).

This also optimizes the code, by not having to recompute them everytime.

Since flags are now saved in evsel, the flags argument in
perf_event_open() is removed.

Signed-off-by: default avatarRiccardo 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/d9f63159098e56fa518eecf25171d72e6f74df37.1629490974.git.rickyman7@gmail.com
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d45ce034
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