You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 debug update from Ingo Molnar: "A single change enhancing stack traces by hiding wrapper function entries" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/stacktrace: Avoid recording save_stack_trace() wrappers
This commit is contained in:
@@ -30,7 +30,7 @@ static int save_stack_address(struct stack_trace *trace, unsigned long addr,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __save_stack_trace(struct stack_trace *trace,
|
static void noinline __save_stack_trace(struct stack_trace *trace,
|
||||||
struct task_struct *task, struct pt_regs *regs,
|
struct task_struct *task, struct pt_regs *regs,
|
||||||
bool nosched)
|
bool nosched)
|
||||||
{
|
{
|
||||||
@@ -56,6 +56,7 @@ static void __save_stack_trace(struct stack_trace *trace,
|
|||||||
*/
|
*/
|
||||||
void save_stack_trace(struct stack_trace *trace)
|
void save_stack_trace(struct stack_trace *trace)
|
||||||
{
|
{
|
||||||
|
trace->skip++;
|
||||||
__save_stack_trace(trace, current, NULL, false);
|
__save_stack_trace(trace, current, NULL, false);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(save_stack_trace);
|
EXPORT_SYMBOL_GPL(save_stack_trace);
|
||||||
@@ -70,6 +71,8 @@ void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
|
|||||||
if (!try_get_task_stack(tsk))
|
if (!try_get_task_stack(tsk))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (tsk == current)
|
||||||
|
trace->skip++;
|
||||||
__save_stack_trace(trace, tsk, NULL, true);
|
__save_stack_trace(trace, tsk, NULL, true);
|
||||||
|
|
||||||
put_task_stack(tsk);
|
put_task_stack(tsk);
|
||||||
@@ -88,8 +91,9 @@ EXPORT_SYMBOL_GPL(save_stack_trace_tsk);
|
|||||||
} \
|
} \
|
||||||
})
|
})
|
||||||
|
|
||||||
static int __save_stack_trace_reliable(struct stack_trace *trace,
|
static int __always_inline
|
||||||
struct task_struct *task)
|
__save_stack_trace_reliable(struct stack_trace *trace,
|
||||||
|
struct task_struct *task)
|
||||||
{
|
{
|
||||||
struct unwind_state state;
|
struct unwind_state state;
|
||||||
struct pt_regs *regs;
|
struct pt_regs *regs;
|
||||||
|
|||||||
Reference in New Issue
Block a user