mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 23:21:31 +00:00
cb8a2ef084
The kernel CONFIG_UNWINDER_ORC option enables the ORC unwinder, which is similar in concept to a DWARF unwinder. The difference is that the format of the ORC data is much simpler than DWARF, which in turn allows the ORC unwinder to be much simpler and faster. The ORC data consists of unwind tables which are generated by objtool. After analyzing all the code paths of a .o file, it determines information about the stack state at each instruction address in the file and outputs that information to the .orc_unwind and .orc_unwind_ip sections. The per-object ORC sections are combined at link time and are sorted and post-processed at boot time. The unwinder uses the resulting data to correlate instruction addresses with their stack states at run time. Most of the logic are similar with x86, in order to get ra info before ra is saved into stack, add ra_reg and ra_offset into orc_entry. At the same time, modify some arch-specific code to silence the objtool warnings. Co-developed-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Jinyang He <hejinyang@loongson.cn> Co-developed-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
41 lines
1.4 KiB
Plaintext
41 lines
1.4 KiB
Plaintext
choice
|
|
prompt "Choose kernel unwinder"
|
|
default UNWINDER_PROLOGUE if KALLSYMS
|
|
help
|
|
This determines which method will be used for unwinding kernel stack
|
|
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
|
|
lockdep, and more.
|
|
|
|
config UNWINDER_GUESS
|
|
bool "Guess unwinder"
|
|
help
|
|
This option enables the "guess" unwinder for unwinding kernel stack
|
|
traces. It scans the stack and reports every kernel text address it
|
|
finds. Some of the addresses it reports may be incorrect.
|
|
|
|
While this option often produces false positives, it can still be
|
|
useful in many cases.
|
|
|
|
config UNWINDER_PROLOGUE
|
|
bool "Prologue unwinder"
|
|
depends on KALLSYMS
|
|
help
|
|
This option enables the "prologue" unwinder for unwinding kernel stack
|
|
traces. It unwind the stack frame based on prologue code analyze. Symbol
|
|
information is needed, at least the address and length of each function.
|
|
Some of the addresses it reports may be incorrect (but better than the
|
|
Guess unwinder).
|
|
|
|
config UNWINDER_ORC
|
|
bool "ORC unwinder"
|
|
select OBJTOOL
|
|
help
|
|
This option enables the ORC (Oops Rewind Capability) unwinder for
|
|
unwinding kernel stack traces. It uses a custom data format which is
|
|
a simplified version of the DWARF Call Frame Information standard.
|
|
|
|
Enabling this option will increase the kernel's runtime memory usage
|
|
by roughly 2-4MB, depending on your kernel config.
|
|
|
|
endchoice
|