From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH] locking/lockdep: Save and display stack trace of held locks Date: Mon, 24 Jun 2019 13:08:52 +0200 Message-ID: <20190624110852.GV3419@hirez.programming.kicks-ass.net> References: <1561363259-14705-1-git-send-email-kobe-cp.wu@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1561363259-14705-1-git-send-email-kobe-cp.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+glpam-linux-mediatek=m.gmane.org-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Kobe Wu Cc: linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Ingo Molnar , Will Deacon , wsd_upstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Eason Lin List-Id: linux-mediatek@lists.infradead.org On Mon, Jun 24, 2019 at 04:00:59PM +0800, Kobe Wu wrote: > Save the stack trace of held locks when lock_acquire() is invoked > and display the stack trace when lockdep_print_held_locks() is > invoked. The runtime stack trace of held locks are helpful in > analyzing code flow and lockdep's warning. > > Save stack trace of each held lock will increase runtime overhead > and memory consumption. The operation will be activated under > CONFIG_LOCKDEP_TRACE_HELD_LOCK. So the impact will only occur > when CONFIG_LOCKDEP_TRACE_HELD_LOCK=y. Yeah, I don't see the point of this. If you cannot find where the lock got taken you've bigger problems.