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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42A56C79FB7 for ; Mon, 5 Jan 2026 18:31:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6756010E29B; Mon, 5 Jan 2026 18:31:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="axwZHyau"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 579A810E29B; Mon, 5 Jan 2026 18:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1767637866; x=1799173866; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=ktHXCzPHJgY7XQIgZS1cpiTgqKNmo93Rr7YlINKPrMk=; b=axwZHyauSDGUruHPh7N6vLEr6sGZnb0pbGcVRBuVE6X3ACcocIbnvQA8 ycX+Fge5vroS0SSePKvR1Ykht+Q9acqKkblfrrC1WrUAcMujMdzYhXI8Q 3kgST4F/hECgtSdcxYXQlOKZ1rN3bV3wPeRm6JaUia3hSbjCG93E2+DEx YvJX+N3eGBKL6oYm91zdzm1OzAjgsHY3ZMM8cPvGrt1vB4ZD9g4RBYFh1 6nXv3XXQOmtVU7avUtUmcUsP/vRbypWt8+eKnbDi0sA/XceyO+EWLtiRI hZ9zSyrj0b61R9SXcWIbpGUqXv7eE8ozsM3Tk97me+Sf00dfsNhYz3O89 Q==; X-CSE-ConnectionGUID: WBLY6+grR1+xmcZ0lO66Ig== X-CSE-MsgGUID: i2dd+yqdRsiCOnS7CVGsJQ== X-IronPort-AV: E=McAfee;i="6800,10657,11662"; a="69165765" X-IronPort-AV: E=Sophos;i="6.21,204,1763452800"; d="scan'208";a="69165765" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2026 10:31:05 -0800 X-CSE-ConnectionGUID: xQbfnGbcRSiQ1JYrgkaMhw== X-CSE-MsgGUID: vHKsorAGSpqZSH/ARbKQWQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,204,1763452800"; d="scan'208";a="207347253" Received: from ettammin-mobl2.ger.corp.intel.com (HELO localhost) ([10.245.246.3]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2026 10:30:57 -0800 From: Jani Nikula To: Yury Norov Cc: Andy Shevchenko , Joel Fernandes , Steven Rostedt , Andrew Morton , Masami Hiramatsu , Mathieu Desnoyers , Christophe Leroy , Randy Dunlap , Ingo Molnar , Joonas Lahtinen , David Laight , Petr Pavlu , Andi Shyti , Rodrigo Vivi , Tvrtko Ursulin , Daniel Gomez , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH v4 7/7] kernel.h: drop trace_printk.h In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <20251225170930.1151781-1-yury.norov@gmail.com> <20251225170930.1151781-8-yury.norov@gmail.com> <20251226115848.298465d4@gandalf.local.home> <20251228133150.1d5731d04bc1b685b0fe81c1@linux-foundation.org> <20251229111748.3ba66311@gandalf.local.home> <20260103005059.GA11015@joelbox2> <254c1096c3b892923dd12b07a8b80291b88c0e9b@intel.com> Date: Mon, 05 Jan 2026 20:30:54 +0200 Message-ID: <7df7c705c02cae6d609a3bc5f153082cf0658a60@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 05 Jan 2026, Yury Norov wrote: > On Mon, Jan 05, 2026 at 11:29:51AM +0200, Jani Nikula wrote: >> On Sat, 03 Jan 2026, Yury Norov wrote: >> > On Sat, Jan 03, 2026 at 02:57:58PM +0200, Andy Shevchenko wrote: >> >> On Fri, Jan 02, 2026 at 07:50:59PM -0500, Joel Fernandes wrote: >> >> > On Mon, Dec 29, 2025 at 11:17:48AM -0500, Steven Rostedt wrote: >> >> >> >> ... >> >> >> >> > I use trace_printk() all the time for kernel, particularly RCU development. >> >> > One of the key usecases I have is dumping traces on panic (with panic on warn >> >> > and stop tracing on warn enabled). This is extremely useful since I can add >> >> > custom tracing and dump traces when rare conditions occur. I fixed several >> >> > bugs with this technique. >> >> > >> >> > I also recommend keeping it convenient to use. >> >> >> >> Okay, you know C, please share your opinion what header is the best to hold the >> >> trace_printk.h to be included. >> > >> > What if we include it on Makefile level, similarly to how W=1 works? >> > >> > make D=1 // trace_printk() is available >> > make D=0 // trace_printk() is not available >> > make // trace_printk() is not available >> > >> > Where D stands for debugging. >> > >> > D=1 may be a default setting if you prefer, but the most important is >> > that every compilation unit will have an access to debugging without >> > polluting core headers. >> >> You do realize this means recompiling everything when adding D=1 for >> debugging? > > Yes sir I do. > > It would be as simple (or hard) as building another arch: > > make O=../build/linux-arm64 > make O=../build/linux-x86_64 > make D=1 W=1 O=../build/linux-x86_64-dev > > If you're both developer and CI engineer in your company, you're likely > already doing something like that. If you're CI-only, there're no > changes for you. If you're a developer - yeah, you'd have to learn a > new flag. Learn a new flag? What I'm saying is, if you're doing regular builds as a developer, and *then* realize you need trace_printk(), doing your suggested 'make D=1' rebuilds *everything*. Not exactly something you want in the middle of your development flow. I'd *rather* manually add that #include where needed, and rebuild just those files. I don't even feel very strongly about the whole thing, other than the D=1 being the worst suggestion so far in the thread. BR, Jani. > > The real problem of course is the status inflation. The fact that > defconfig enables CONFIG_EXPERT and CONFIG_DEBUG_KERNEL implies that > every random person who is able to do: > > git clone && make && sudo make install > > now assumed an expert kernel user and active developer. It is not > correct, and it leads to bloating kernel with dev-only features. > > What we discuss here is a new marker for those real experts and > developers, I think. (In an hope that it will inflate not very fast.) > > Thanks, > Yury -- Jani Nikula, Intel