lkml.org 
[lkml]   [2023]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 (repost)] locking/lockdep: add debug_show_all_lock_holders()
From
On 2023/01/14 18:36, Ingo Molnar wrote:
> Yeah, so note how you introduce a function with a parameter:
>
> void __debug_show_all_locks(bool show_stack)
>
> ... only to then *hide* the new parameter via helper functions:
>
> static inline void debug_show_all_locks(void)
> {
> __debug_show_all_locks(false);
> }
>
> static inline void debug_show_all_lock_holders(void)
> {
> __debug_show_all_locks(true);
> }
>
> ... which is a *strong* hint by our universe that the new parameter was
> probably a bad idea to begin with.
>
> Given how small debug_show_all_locks() is to begin with, I'd suggest simply
> duplicating the loop into debug_show_all_lock_holders() or so.

Initial version at https://lkml.kernel.org/r/82af40cc-bf85-2b53-b8f9-dfc12e66a781@I-love.SAKURA.ne.jp
was duplicating the loop.

Waiman Long suggested me not to duplicate the loop at
https://lkml.kernel.org/r/3e027453-fda4-3891-3ec3-5623f1525e56@redhat.com .

Please talk with Waiman. I'm fine with either approach.

\
 
 \ /
  Last update: 2023-03-26 23:41    [W:0.079 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site