Re: [RFC PATCH] sched/core: Enhanced debug logs in do_task_dead()
From: Peter Zijlstra
Date: Tue Dec 10 2024 - 09:19:49 EST
On Tue, Dec 10, 2024 at 09:45:13PM +0800, Zhongqiu Han wrote:
> If BUG() is a NOP, dump the problematic stack for debugging purposes.
>
> Signed-off-by: Zhongqiu Han <quic_zhonhan@xxxxxxxxxxx>
> ---
> If BUG() is a NOP, it should make sense for debugging purposes. However,
> just arising the patch with RFC, because at least for now, I haven't found
> a definition of BUG() as NOP in various architectures. Thanks~
Yeah, this don't make sense. If you want a stack-trace you shouldn't
have killed BUG.
And yeah, having done a quick peek, I don't see how you can kill BUG
these days other than explicitly modyfing your source, in which case you
get to keep the pieces.