[llvm] [Bolt] Fix address translation for KASLR kernel (PR #114261)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 21:45:39 PST 2024


xur-llvm wrote:

OK. I see. This should be easy to fix: the logic of detecting kernel is not
using the name. So if this is kernel, we can skip the match and use the
provided ELF file directly.
Or, we can pass a flat for kernel? (I don't think you would like this).

-Rong

On Mon, Nov 11, 2024 at 9:16 PM Maksim Panchenko ***@***.***>
wrote:

> What is the symptom of the breakage? Can you share the perf file and the
> vmlinux so that I can debug? I just tried my patch on 6.12.0-rc6-1 for
> non-KASLR profile and it generated exactly the same bolt profile using
> perf2bolt without my patch.
>
> On your system you must have matched vmlinux binary by build-id. When
> build-id doesn't match or doesn't exist, with this patch perf2bolt will
> try to match the kernel binary by name. In perf.data it's recorded as
> "[kernel.kallsyms]" hence the error from perf2bolt. The workaround is to
> rename "vmlinux" to "[kernel.kallsyms]" which I'd rather avoid since unlike
> in the user space there's no ambiguity about the kernel binary.
>
>> Reply to this email directly, view it on GitHub
> <https://github.com/llvm/llvm-project/pull/114261#issuecomment-2469628863>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AOI42XS7H4FGILEIM76442L2AGFLJAVCNFSM6AAAAABQ4Q6YGGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRZGYZDQOBWGM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


https://github.com/llvm/llvm-project/pull/114261


More information about the llvm-commits mailing list