Searched hist:"5 bb8d34449c4a2eb94d657b992170afafac274f9" (Results 1 – 4 of 4) sorted by relevance
/linux/arch/loongarch/kernel/ |
H A D | unwind_guess.c | diff 5bb8d34449c4a2eb94d657b992170afafac274f9 Tue Jan 17 04:42:16 CET 2023 Jinyang He <hejinyang@loongson.cn> LoongArch: Use correct sp value to get graph addr in stack unwinders
The stack frame when function_graph enable like follows,
--------- <- function sp_on_entry | | | FAKE_RA <- sp_on_entry - sizeof(pt_regs) + PT_R1 | --------- <- sp_on_entry - sizeof(pt_regs)
So if we want to get the &FAKE_RA we should get sp_on_entry first. In the unwinder_prologue case, we can get the sp_on_entry as state->sp, because we try to calculate each CFA and the ra saved address. But in the unwinder_guess case, we cannot get it because we do not try to calculate the CFA. Although LoongArch have not fixed frame, the $ra is saved at CFA - 8 in most cases, we can try guess, too. As we store the pc in state, we not need to dereference state->sp, too.
Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
|
H A D | unwind_prologue.c | diff 5bb8d34449c4a2eb94d657b992170afafac274f9 Tue Jan 17 04:42:16 CET 2023 Jinyang He <hejinyang@loongson.cn> LoongArch: Use correct sp value to get graph addr in stack unwinders
The stack frame when function_graph enable like follows,
--------- <- function sp_on_entry | | | FAKE_RA <- sp_on_entry - sizeof(pt_regs) + PT_R1 | --------- <- sp_on_entry - sizeof(pt_regs)
So if we want to get the &FAKE_RA we should get sp_on_entry first. In the unwinder_prologue case, we can get the sp_on_entry as state->sp, because we try to calculate each CFA and the ra saved address. But in the unwinder_guess case, we cannot get it because we do not try to calculate the CFA. Although LoongArch have not fixed frame, the $ra is saved at CFA - 8 in most cases, we can try guess, too. As we store the pc in state, we not need to dereference state->sp, too.
Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
|
/linux/arch/loongarch/include/asm/ |
H A D | unwind.h | diff 5bb8d34449c4a2eb94d657b992170afafac274f9 Tue Jan 17 04:42:16 CET 2023 Jinyang He <hejinyang@loongson.cn> LoongArch: Use correct sp value to get graph addr in stack unwinders
The stack frame when function_graph enable like follows,
--------- <- function sp_on_entry | | | FAKE_RA <- sp_on_entry - sizeof(pt_regs) + PT_R1 | --------- <- sp_on_entry - sizeof(pt_regs)
So if we want to get the &FAKE_RA we should get sp_on_entry first. In the unwinder_prologue case, we can get the sp_on_entry as state->sp, because we try to calculate each CFA and the ra saved address. But in the unwinder_guess case, we cannot get it because we do not try to calculate the CFA. Although LoongArch have not fixed frame, the $ra is saved at CFA - 8 in most cases, we can try guess, too. As we store the pc in state, we not need to dereference state->sp, too.
Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
|
H A D | ftrace.h | diff 5bb8d34449c4a2eb94d657b992170afafac274f9 Tue Jan 17 04:42:16 CET 2023 Jinyang He <hejinyang@loongson.cn> LoongArch: Use correct sp value to get graph addr in stack unwinders
The stack frame when function_graph enable like follows,
--------- <- function sp_on_entry | | | FAKE_RA <- sp_on_entry - sizeof(pt_regs) + PT_R1 | --------- <- sp_on_entry - sizeof(pt_regs)
So if we want to get the &FAKE_RA we should get sp_on_entry first. In the unwinder_prologue case, we can get the sp_on_entry as state->sp, because we try to calculate each CFA and the ra saved address. But in the unwinder_guess case, we cannot get it because we do not try to calculate the CFA. Although LoongArch have not fixed frame, the $ra is saved at CFA - 8 in most cases, we can try guess, too. As we store the pc in state, we not need to dereference state->sp, too.
Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
|