Received: by 10.192.165.148 with SMTP id m20csp371016imm; Wed, 9 May 2018 14:16:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoEGL8OJpjtM3ZSEZP4tZ9cg51UKeCVZC5cPCsqZT7Xt+iVGfINQuwp7c3IWxnjWsX2h3xB X-Received: by 2002:a17:902:14cb:: with SMTP id y11-v6mr21239445plg.229.1525900588349; Wed, 09 May 2018 14:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525900588; cv=none; d=google.com; s=arc-20160816; b=A7BW6sisYIVzMYNkwPYTScejgMHk1l9Y+tRI+0eS4OnlxtF1AuozLljXrZRGmDJ/+N 5KxjlAPUBTDaLChrTBaYHs9dFisceGBChdLXGxHAs6nrEr9WsLDx0YxL0g0KHd0PtmlQ 5ZppWtNjaGmW6G5BqMsfoIUpwzzN5j/ejiLxuw1CnvlDtiVjHnjSXs4ONcww3FTBtaoS VhV/G1lyOPRi7uNmJh8AOWlLqOGL5y3t0lw7RHGMjfBDw4nNKgm8pLLro/HsCnj1G2Gg kGrd30xRdeccCIaIKwKwxDTp/mA7+c1L/8RNgHGya2c55UC+SboQYl4GyqYLCBaK/sNp Upzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FgLVbYb2dvInCQZ1oZfRrNSQivxDgtZeIHEwC3/K0zQ=; b=BNlQtqHb5PMQjdbZDbUdXU14XWxFpdiqAVyCRFelvtVZk037aFYGV9BQZBwPkf2JPj szfXVW6lEikHPI5GGzF4ULAYwYf2FLicxH7kQCZBhcQOZ8c4j2odkZ061FjXkOTg2cM6 irPAMBXaLHuyXTR1IiXjzroHMrPWQC9D796q4cDBcyA6x3kRq9JiOSlsJ91n7aclBKv6 ciLf2d6Mk6AoM4uGtzVfB8HEhtxFN8OIlarfSAQoaQOnkl6qpxZKxcdn/rePVyzfGdUM ToNfIWigu4SeDoUvsOLmdWe5/XoYvTq+7h8BMIBx17Yney9VpxQO3u0CluHEvXqM5eiu e9iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3si29479598pfj.58.2018.05.09.14.16.11; Wed, 09 May 2018 14:16:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965365AbeEIVOz (ORCPT + 99 others); Wed, 9 May 2018 17:14:55 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:39628 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964849AbeEIVOx (ORCPT ); Wed, 9 May 2018 17:14:53 -0400 Received: from ben-dt3.candelatech.com (firewall.candelatech.com [50.251.239.81]) by mail2.candelatech.com (Postfix) with ESMTP id 7244940A5CB; Wed, 9 May 2018 14:14:51 -0700 (PDT) From: greearb@candelatech.com To: linux-kernel@vger.kernel.org Cc: peterz@infradead.org, mingo@redhat.com, Ben Greear Subject: [PATCH] lockdep: Change __lock_acquire to __lock_acquire_lockdep Date: Wed, 9 May 2018 14:14:42 -0700 Message-Id: <1525900482-31661-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.4.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Greear This should make it easier to notice one is using lockdep when looking at 'perf top' and related output. Signed-off-by: Ben Greear --- kernel/locking/lockdep.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 89b5f83..818fc8b 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3283,10 +3283,13 @@ static int __lock_is_held(const struct lockdep_map *lock, int read); * This gets called for every mutex_lock*()/spin_lock*() operation. * We maintain the dependency maps and validate the locking attempt: */ -static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, int hardirqs_off, - struct lockdep_map *nest_lock, unsigned long ip, - int references, int pin_count) +static int __lock_acquire_lockdep(struct lockdep_map *lock, + unsigned int subclass, + int trylock, int read, int check, + int hardirqs_off, + struct lockdep_map *nest_lock, + unsigned long ip, + int references, int pin_count) { struct task_struct *curr = current; struct lock_class *class = NULL; @@ -3564,13 +3567,14 @@ static int reacquire_held_locks(struct task_struct *curr, unsigned int depth, struct held_lock *hlock; for (hlock = curr->held_locks + idx; idx < depth; idx++, hlock++) { - if (!__lock_acquire(hlock->instance, - hlock_class(hlock)->subclass, - hlock->trylock, - hlock->read, hlock->check, - hlock->hardirqs_off, - hlock->nest_lock, hlock->acquire_ip, - hlock->references, hlock->pin_count)) + if (!__lock_acquire_lockdep(hlock->instance, + hlock_class(hlock)->subclass, + hlock->trylock, + hlock->read, hlock->check, + hlock->hardirqs_off, + hlock->nest_lock, hlock->acquire_ip, + hlock->references, + hlock->pin_count)) return 1; } return 0; @@ -3917,8 +3921,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, current->lockdep_recursion = 1; trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip); - __lock_acquire(lock, subclass, trylock, read, check, - irqs_disabled_flags(flags), nest_lock, ip, 0, 0); + __lock_acquire_lockdep(lock, subclass, trylock, read, check, + irqs_disabled_flags(flags), nest_lock, ip, 0, 0); current->lockdep_recursion = 0; raw_local_irq_restore(flags); } -- 2.4.11