From patchwork Tue Jun 22 09:59:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gumingtao X-Patchwork-Id: 12336731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 602A1C48BDF for ; Tue, 22 Jun 2021 09:59:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F30B361361 for ; Tue, 22 Jun 2021 09:59:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F30B361361 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9B5886B0062; Tue, 22 Jun 2021 05:59:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 964856B006C; Tue, 22 Jun 2021 05:59:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 790506B0070; Tue, 22 Jun 2021 05:59:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0156.hostedemail.com [216.40.44.156]) by kanga.kvack.org (Postfix) with ESMTP id 47F736B0062 for ; Tue, 22 Jun 2021 05:59:36 -0400 (EDT) Received: from smtpin34.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id E698E8249980 for ; Tue, 22 Jun 2021 09:59:35 +0000 (UTC) X-FDA: 78280912710.34.848B2AD Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by imf11.hostedemail.com (Postfix) with ESMTP id 4D08D20015DA for ; Tue, 22 Jun 2021 09:59:35 +0000 (UTC) Received: by mail-pl1-f180.google.com with SMTP id u2so1456595plf.3 for ; Tue, 22 Jun 2021 02:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=fWyxVP5TubxadYnG5B6dMDsoSFF6OPmW883RO9Ii+UI=; b=R24mIOPvoHL3hw4UXY7zM5quCmSotsIYa02egM0qd9OR0RxqZWYIzSN52aXPi0dr8I OvXjT0VPpyU0heqADJonB1miSJ/T0HhOo0M0IGWycC1MtbGUj2EGuW7zM61Nl/osWB53 EawnGc4BkjIoeyj2uE2p8hWSLmYOAj9dM5YpRxfpnZN5rI+MmX4MHwX3srdbhq4ZEkXR XmdaJX9UeTB3HO9A40gSR4iWhxysEIet/M0xq+Q6uCYqigtGB1Z13tjylU3RfmtsKAbs Nz8Fu8RulQQPr3fxpm7Fmifh3J4nEDQYt/jdBpTT5pK8KsV1JiuCjzU0uEIDm/e4N0rZ m5tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=fWyxVP5TubxadYnG5B6dMDsoSFF6OPmW883RO9Ii+UI=; b=mjPTombdRQl7VBo2tim+FLokjhob8GCICSpUpJKnVKF/oTbIlb5VNg9BVVOIhlcNYY mxEqR2PBfcYNG/5qR43473zYiZK+nhqD1/ABpx7LoHnT43LJD5K8QGMhNz2bV+y+F7X3 OVommujHnucf17dbSal+oaI49OXhBhZWw/PWoLI1eYEmDwXmwK7t+8Twt/t4myb8nsys ZJbY03yY+wt62ycCOZ2XF7sAXzO7l4PJ98xEzNnQYqOJzuOhHm51fUR1loPHtxRMBWJp SZakXklJ591zZBOlPeuUCyTxrHE+siZxd4VfNquV2kMax+A1EfcLHxBxEyufd3fnd0+6 dH9w== X-Gm-Message-State: AOAM5302TAMXZFHPZ8Fz0OqvJAqKkXflg6Be8D4B1GmHxXhFglDeXbuV qcAmk1HEfhhjY+pZBS/xbMk= X-Google-Smtp-Source: ABdhPJyei2FVezO07TmiytsjbpVEf8ctrqRTAqb156L9ShGWVBs/ivSPgelXJ0B+0pOT15GOPkQkoA== X-Received: by 2002:a17:90b:3b88:: with SMTP id pc8mr3293153pjb.124.1624355974371; Tue, 22 Jun 2021 02:59:34 -0700 (PDT) Received: from localhost ([43.224.245.180]) by smtp.gmail.com with ESMTPSA id o20sm1814577pjq.57.2021.06.22.02.59.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jun 2021 02:59:34 -0700 (PDT) From: gumingtao X-Google-Original-From: gumingtao To: cl@linux.com Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, nathan@kernel.org, ndesaulniers@google.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, gumingtao Subject: [PATCH v3] slab: Use __func__ to trace function name Date: Tue, 22 Jun 2021 17:59:25 +0800 Message-Id: <31fdbad5c45cd1e26be9ff37be321b8586b80fee.1624355507.git.gumingtao@xiaomi.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 4D08D20015DA Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=R24mIOPv; spf=pass (imf11.hostedemail.com: domain of gumingtao1225@gmail.com designates 209.85.214.180 as permitted sender) smtp.mailfrom=gumingtao1225@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Stat-Signature: tyn6z8zs98x38obeyftcick19zi344yu X-HE-Tag: 1624355975-606921 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: It is better to use __func__ to trace function name. Signed-off-by: gumingtao Acked-by: Christoph Lameter Acked-by: David Rientjes Reviewed-by: Aaron Tomlin --- mm/slab_common.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index a4a5714..ffa3b11 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -378,11 +378,11 @@ kmem_cache_create_usercopy(const char *name, if (err) { if (flags & SLAB_PANIC) - panic("kmem_cache_create: Failed to create slab '%s'. Error %d\n", - name, err); + panic("%s: Failed to create slab '%s'. Error %d\n", + __func__, name, err); else { - pr_warn("kmem_cache_create(%s) failed with error %d\n", - name, err); + pr_warn("%s(%s) failed with error %d\n", + __func__, name, err); dump_stack(); } return NULL; @@ -509,8 +509,8 @@ void kmem_cache_destroy(struct kmem_cache *s) err = shutdown_cache(s); if (err) { - pr_err("kmem_cache_destroy %s: Slab cache still has objects\n", - s->name); + pr_err("%s %s: Slab cache still has objects\n", + __func__, s->name); dump_stack(); } out_unlock: