[PATCH 1/5] perf record: Always get text_poke events with --kcore option

From: Adrian Hunter
Date: Fri Jun 10 2022 - 07:33:48 EST


kcore provides a copy of the running kernel including any modified code.
A trace that benefits from that also benefits from text_poke events, so
enable them.

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
---
tools/perf/builtin-record.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 9a71f0330137..3959a1b86afb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -3805,6 +3805,9 @@ int cmd_record(int argc, const char **argv)
goto out_opts;
}

+ if (rec->opts.kcore)
+ rec->opts.text_poke = true;
+
if (rec->opts.kcore || record__threads_enabled(rec))
rec->data.is_dir = true;

--
2.25.1