From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 0D700C433DB for ; Thu, 25 Feb 2021 17:50:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1ED264F3C for ; Thu, 25 Feb 2021 17:50:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbhBYRuR (ORCPT ); Thu, 25 Feb 2021 12:50:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhBYRuQ (ORCPT ); Thu, 25 Feb 2021 12:50:16 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E94FC061574 for ; Thu, 25 Feb 2021 09:49:36 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id 2so2928189ljr.5 for ; Thu, 25 Feb 2021 09:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zU4aOxtFZT7R1f+rrboFRm9WstvNO0s8X9Gu+u3DCBo=; b=hitC4olgG8YgCzw8OF2AEAmt/+xFesmkFz6U8u4GB5ybIn+omTo09J4atdnBjxkdNC a4QQlEziGYX6emaPTTwjQTqSonntQUXinRwKnFJcocPbqnuTMA29DZoRcjsGbuc7p/1B pgatQsKrL6jTkFG3O1AVPc8krWhNCuoZm91kA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zU4aOxtFZT7R1f+rrboFRm9WstvNO0s8X9Gu+u3DCBo=; b=n9z+P875965syt0LyIR6zJC7Yp3ClAwK2uBH107jTBFYWnrP3GedoB7+PX8wcwd7lB 26IkU4dIqHw0R0isPdiLjHVmxmdtbR1IiOzvKYpPM76cpDh0ntfwNOgtlOwdOp34WjtD 2RvULah1aLhDiUaFJso4I6yi7+iqxP/fnVww3cV7GsjoHUvsW58c1CfnmihgZav4NAJo VCTXsCjpIDxaslP33hIyEDBLZiynR4OBKAAGtdh+kIGNbOyWCqFfB+0aSvF0H2X6DXM7 iOdg9JgdQb4sdwyjAnUx89HIqr113cYVvwuYWEKPiVwXcTmVJtAkKsxmbUCpP0JvhHRp XW3Q== X-Gm-Message-State: AOAM532fR+C/jRcv2Mtl/Yve4Qrexsd/M+wpX5a4ihprSzycokZP7/yq MYz7ti/dTlMXYI3N7g76YMO7EqW/X2h+8w== X-Google-Smtp-Source: ABdhPJzK0x2dvU447OaxRZrhCuiOrk32Yr9aoMiExKWw49PuDzaAZtBc5gBjbDmAlMNKKDZrlSmqTw== X-Received: by 2002:a05:651c:485:: with SMTP id s5mr2286742ljc.276.1614275372882; Thu, 25 Feb 2021 09:49:32 -0800 (PST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com. [209.85.167.46]) by smtp.gmail.com with ESMTPSA id 14sm1156599lfr.9.2021.02.25.09.49.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Feb 2021 09:49:32 -0800 (PST) Received: by mail-lf1-f46.google.com with SMTP id d3so9812724lfg.10 for ; Thu, 25 Feb 2021 09:49:31 -0800 (PST) X-Received: by 2002:a19:8186:: with SMTP id c128mr2405939lfd.377.1614275371361; Thu, 25 Feb 2021 09:49:31 -0800 (PST) MIME-Version: 1.0 References: <20210224115824.1e289a6895087f10c41dd8d6@linux-foundation.org> <20210224200055.U7Xz47kX5%akpm@linux-foundation.org> <20210224203708.4489755a@oasis.local.home> <20210224210740.73273c7a@oasis.local.home> <5a0b6fb4-6efd-e391-45fa-cd188f181d5d@oracle.com> <20210225093128.4cd86439@gandalf.local.home> In-Reply-To: <20210225093128.4cd86439@gandalf.local.home> From: Linus Torvalds Date: Thu, 25 Feb 2021 09:49:15 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 014/173] mm, tracing: record slab name for kmem_cache_free() To: Steven Rostedt Cc: Jacob Wen , Andrew Morton , Joe Perches , Christoph Lameter , Joonsoo Kim , Linux-MM , mm-commits@vger.kernel.org, Paul McKenney , Pekka Enberg , David Rientjes Content-Type: text/plain; charset="UTF-8" Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org On Thu, Feb 25, 2021 at 6:31 AM Steven Rostedt wrote: > > Here's nothing special about %s in TP_printk. It uses the same code as > printk() and what other string formatters use. > > What is special is that the print is on data that is stored from a previous > time. Well, technically that's not actually limited to just %s, although that's the common case. All our magic "%p*" formats do the same thing: they print out not the argument _value_, but something that the pointer value points to. So "%pD" takes a "struct file *" pointer, and follows it to the dentry, and then from the dentry to the name. So it will in fact follow pointers even more than "%s" does. It might indeed be worth having a warning for TP_printk() about any of the formats that follow a pointer, exactly because of the whole "by the time it actually prints, the pointer may be long gone". Linus From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 2BAE4C433DB for ; Thu, 25 Feb 2021 17:49:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9C66564F36 for ; Thu, 25 Feb 2021 17:49:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C66564F36 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2FD896B006C; Thu, 25 Feb 2021 12:49:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 29EFD8D0001; Thu, 25 Feb 2021 12:49:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1B4A96B0070; Thu, 25 Feb 2021 12:49:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0018.hostedemail.com [216.40.44.18]) by kanga.kvack.org (Postfix) with ESMTP id 06DEF6B006C for ; Thu, 25 Feb 2021 12:49:36 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BEF74DB21 for ; Thu, 25 Feb 2021 17:49:35 +0000 (UTC) X-FDA: 77857527510.14.F35BE43 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by imf30.hostedemail.com (Postfix) with ESMTP id 511F5E000107 for ; Thu, 25 Feb 2021 17:49:35 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id a17so9389615lfb.1 for ; Thu, 25 Feb 2021 09:49:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zU4aOxtFZT7R1f+rrboFRm9WstvNO0s8X9Gu+u3DCBo=; b=hitC4olgG8YgCzw8OF2AEAmt/+xFesmkFz6U8u4GB5ybIn+omTo09J4atdnBjxkdNC a4QQlEziGYX6emaPTTwjQTqSonntQUXinRwKnFJcocPbqnuTMA29DZoRcjsGbuc7p/1B pgatQsKrL6jTkFG3O1AVPc8krWhNCuoZm91kA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zU4aOxtFZT7R1f+rrboFRm9WstvNO0s8X9Gu+u3DCBo=; b=TgpDZbSs10VAjXonUzf6TrNYY4JECwNHgi225L61wO78b1onPza299UQxOFIspEUk+ zD2UNPrndHX4qlcahIo86uDa9XLPPDC7R0ANArKPjsauzaEPjlh9lVHcVOtpb2WgNmzw binO1RuWLzBVuZ1wD2ebSHOfgYV56pnGegib5581xnhKnQo1RAQ3q9orpusmjaIbGVhH xuqf7z6DQaKjP3zCEYRVdAa7spvH61hc9ImDx+adznfU3Ml/P6R/vVwV13n2zyKceC7q BLaywHi5USjbJlB224BXwfIXZYr9bQMrUkW1j5jTHnBqRfg1YF0SnrxFN/aTygitxs2D JqfA== X-Gm-Message-State: AOAM5308p4k6xZ9mSy0jR9JJ6oj3H9LciaoNt+GV/DSQh0NBhg6+mrqG YMv8BQ2nCXA980/VNhzwTUo/3lwosAdrIQ== X-Google-Smtp-Source: ABdhPJxInt7tdzaNvt0kd2owQhuBsadUsy1SIhxOaetMtnsiasfabISDIeDoNQzYVnBsht533NFCsQ== X-Received: by 2002:a19:3f54:: with SMTP id m81mr2504819lfa.134.1614275373371; Thu, 25 Feb 2021 09:49:33 -0800 (PST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id i19sm1151403ljn.86.2021.02.25.09.49.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Feb 2021 09:49:32 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id m22so9856154lfg.5 for ; Thu, 25 Feb 2021 09:49:31 -0800 (PST) X-Received: by 2002:a19:8186:: with SMTP id c128mr2405939lfd.377.1614275371361; Thu, 25 Feb 2021 09:49:31 -0800 (PST) MIME-Version: 1.0 References: <20210224115824.1e289a6895087f10c41dd8d6@linux-foundation.org> <20210224200055.U7Xz47kX5%akpm@linux-foundation.org> <20210224203708.4489755a@oasis.local.home> <20210224210740.73273c7a@oasis.local.home> <5a0b6fb4-6efd-e391-45fa-cd188f181d5d@oracle.com> <20210225093128.4cd86439@gandalf.local.home> In-Reply-To: <20210225093128.4cd86439@gandalf.local.home> From: Linus Torvalds Date: Thu, 25 Feb 2021 09:49:15 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [patch 014/173] mm, tracing: record slab name for kmem_cache_free() To: Steven Rostedt Cc: Jacob Wen , Andrew Morton , Joe Perches , Christoph Lameter , Joonsoo Kim , Linux-MM , mm-commits@vger.kernel.org, Paul McKenney , Pekka Enberg , David Rientjes Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: br1t4pbo39iouwgfg9i8inuxz8ygxtz6 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 511F5E000107 Received-SPF: none (linuxfoundation.org>: No applicable sender policy available) receiver=imf30; identity=mailfrom; envelope-from=""; helo=mail-lf1-f42.google.com; client-ip=209.85.167.42 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614275375-648032 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: On Thu, Feb 25, 2021 at 6:31 AM Steven Rostedt wrote: > > Here's nothing special about %s in TP_printk. It uses the same code as > printk() and what other string formatters use. > > What is special is that the print is on data that is stored from a previous > time. Well, technically that's not actually limited to just %s, although that's the common case. All our magic "%p*" formats do the same thing: they print out not the argument _value_, but something that the pointer value points to. So "%pD" takes a "struct file *" pointer, and follows it to the dentry, and then from the dentry to the name. So it will in fact follow pointers even more than "%s" does. It might indeed be worth having a warning for TP_printk() about any of the formats that follow a pointer, exactly because of the whole "by the time it actually prints, the pointer may be long gone". Linus