[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOQCU653Y1SE1wQbL-qkMo1H0GemfT3tiN8JbJKujh9Hb1a-UA@mail.gmail.com>
Date: Mon, 7 Apr 2025 00:54:01 +0200
From: Krzysztof Łopatowski <krzysztof.m.lopatowski@...il.com>
To: Howard Chu <howardchu95@...il.com>
Cc: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
namhyung@...nel.org, mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...nel.org, irogers@...gle.com, adrian.hunter@...el.com,
kan.liang@...ux.intel.com, james.clark@...aro.org, charlie@...osinc.com,
mpetlan@...hat.com, vmolnaro@...hat.com, linux@...blig.org,
mhiramat@...nel.org, leo.yan@....com, dima@...retsauce.net,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] perf trace: Speed up startup time by bypassing the
creation of kernel maps
Thank you Howard,
I much appreciate your work.
> I also want to express my gratitude to Krzysztof Łopatowski—his
> profiling of the perf trace [1] inspired this patch.
:-)
> I'm not sure why the discussion stalled, and I apologize for
> not being able to answer his questions.
I believe the conversation stalled because it touched a piece of code that
has been forgotten/abandoned.
Perhaps because the mechanism of setting trampolines in the kernel changed.
I'm not sure about that.
> Since his findings significantly improve the startup time of
> perf trace, I don't want to take credit for that.
> So Krzysztof, please let me know if you'd like a Suggested-by:
> or anything else.
I'd appreciate a Suggested-by: credit.
A while ago I also tried to refactor perf's code to improve the startup
time even more by merging all invocations of kallsyms__parse.
I gave up on that for now.
But I also investigated the possibility of removing dependency on
/proc/kallsyms. You can find my findings in [2].
Basic idea is to use a built-in feature of printk [3].
We can use this either in a custom kernel module or
(in a limited way) in an eBPF program to get name of a kernel symbol
on demand from raw kpointer.
It's a question to the more knowledgeable programmers here if such an
approach could work in perf? I didn't share it here before because
I hoped to get some feedback from the BCC guys first.
Best regards,
Krzysztof
[1]: https://lore.kernel.org/linux-perf-users/CAOQCU67EsHyw_FsqGbRuityahZTSAtWzffU=hLUJ7K=aZ=1hhA@mail.gmail.com/
[2]: https://github.com/iovisor/bcc/pull/5217
[3]: https://docs.kernel.org/core-api/printk-formats.html#symbols-function-pointers
Powered by blists - more mailing lists