Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758900AbcDHS7n (ORCPT ); Fri, 8 Apr 2016 14:59:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41660 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758833AbcDHS7L (ORCPT ); Fri, 8 Apr 2016 14:59:11 -0400 From: Denys Vlasenko To: Ingo Molnar Cc: Denys Vlasenko , Peter Zijlstra , linux-kernel@vger.kernel.org Subject: [PATCH] lockdep: Deinline register_lock_class, save 2328 bytes Date: Fri, 8 Apr 2016 20:58:46 +0200 Message-Id: <1460141926-13069-5-git-send-email-dvlasenk@redhat.com> In-Reply-To: <1460141926-13069-1-git-send-email-dvlasenk@redhat.com> References: <1460141926-13069-1-git-send-email-dvlasenk@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 991 Lines: 27 This function compiles to 1328 bytes of machine code. Three callsites. Registering a new lock class is definitely not *that* time-critical to inline it. Signed-off-by: Denys Vlasenko CC: Peter Zijlstra CC: Ingo Molnar CC: linux-kernel@vger.kernel.org --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 53ab2f8..ffad373 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -708,7 +708,7 @@ look_up_lock_class(struct lockdep_map *lock, unsigned int subclass) * yet. Otherwise we look it up. We cache the result in the lock object * itself, so actual lookup of the hash should be once per lock object. */ -static inline struct lock_class * +static struct lock_class * register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) { struct lockdep_subclass_key *key; -- 2.1.0