From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f46.google.com (mail-yx1-f46.google.com [74.125.224.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73AA230C62D for ; Sat, 3 Jan 2026 14:23:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767450184; cv=none; b=GhjJWIJ6M0YM/VC+19NwgnY4go3uSj2tu82+kz2MlQyaXfjDNt/kORtvXTUV/OYiQAwFwavwbQEBBLmXqwJY+ZcbM65OaghiFlS1FRZWee+TvrkXlYpYlXDDe+ZFSrWWVmVt/ptExfDWX+2Gw4Ax9pbV01Ru1CsKAVS65sa+vsw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767450184; c=relaxed/simple; bh=ZRSxVMtScwe6h3FIhzi9uAo8xP9iZxypD8mDCI8zPyU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AXywKio4dizHewGnwkz/R/qqkvCJlgs9JYf/pn4526jyIkX06XCTP6ULnL4HDWDN/UT154lg5ovLP4Ejd3iweCViNBUAxqEnZuMVqzr12f0ZftMRkJndNl3Sb72whTaoYXeJ73P7+pbIBPq0jRhmJl7NYf2WcvMmLIvWrku86GQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=f8qV92qz; arc=none smtp.client-ip=74.125.224.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f8qV92qz" Received: by mail-yx1-f46.google.com with SMTP id 956f58d0204a3-640c9c85255so12684768d50.3 for ; Sat, 03 Jan 2026 06:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767450181; x=1768054981; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=KWO8OL17OBUAj+kZREKMHrCa17fZaSRz1SGAoiZKS+E=; b=f8qV92qzykKHXPln1yAUhfqnTM+AYi49Wx9zSKlfArfXkAuq7EGbH4lROBAMoG/+BH Vz+wv2zPvPQv5U47TUMxJIbMGQKdalG1xRbd4ynxYCpzZUVVTK3c+/oxXPgnnPybKX5C FdaLzEis0GSDQBxK1bgYYDp/OthOT5kS+Kyw1KP7CAbbEl1I8+GJQClHghQH3WUFWvxy 94/9UKEI46B6oFvpRBhKSyN0uBc9Ymk7dxotABs6p8OAGqyAorYSZ34ziUoGdUiF2DMj WCS5teYx5Xbll0/2gpZ0/vMyackFaDfQA4Gwk6BBcsMj/l5udOYg4HdFAVzq2b/pJLL/ sunw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767450181; x=1768054981; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KWO8OL17OBUAj+kZREKMHrCa17fZaSRz1SGAoiZKS+E=; b=mDLGFZn5XLgM3XWKF7e76HdRlW37f/HEEMzyTNC0RD3MqOer64zEEbxTx/wcQKxebu hYKwkyTfStSdRWbFpAs/Ts3WPkxE+PpuQpe2iLWjUw7ddRuq5USrjLct+/C4c34JosVf NlEdWw5iJzHJyG075KeP3GkRXhdVItOYHHk7ER90kB5X0Tc5hGFczhTiuE8VAessCOxf OWurhngTJ9HHKmfCHUHv0tb/lIsumc3d8it5LHDhps0QwxCWpT60vQfzy9d6yiavoI6C vbLSI/i5yD6bWpcwQs//unkz46m7xLNjLeQE74ZQ1TUbnlkh6kE0omjKljr5J7JXJ/zr TgIQ== X-Forwarded-Encrypted: i=1; AJvYcCVcoOAi2EP8j752KDSDQntkuMtCR3q5aP/PN4M2oUgCzi2gT6s5mzLQJbxgEk75X9/YzXTPhTIk9Tqqqu0=@vger.kernel.org X-Gm-Message-State: AOJu0YxeTR0Q1+vAa4njjyz9UgIXSUfG6cgCmsWg4gz4yMTs65AFqncg d6XtLYtixs6CMclcXEM1XNKWNg+CnLrCuNDi4cgd01aPxQwoBaT5b/uf X-Gm-Gg: AY/fxX6pmO7XRdCoirF6Y8sAagBcaGoVstAAtMLz3LclrirwGSzlIAqHvJXDikSt+x+ J9j9I7tqU4dsebL4pje5zmQsglNkvNH/C1E/+v2qoPtAZsH82tWtW++WnpBjnthjlcEQhiV4oqA S3KxTToSKyxed1hrL9fYs9LiaWfJ8cVSisrFZAMh060a2eJ7B3+CnEvftNkFxd5QRdtziZZ4t34 1kECVH9kdbwzfia7DNvxGLhMO2XkaAfeq0DjxNItg/4YIipNanbmlIyI8eQ1+ujjRYe/MVGpdvu zOuFNjSXNnWXlfyI4S3Bst35+/ZBhi9CGOVl18Ydj9kuGlKI0Twyw2lsn+VE5KpFpqjLir4xD3o G0g0hPk/Z8SSfW5Si4qwu9yt67alvqhiap91LzzI5uDYcdgo5XD3NEXvlz3ZNnx7yMoibZFLqSY LlIhEdug8= X-Google-Smtp-Source: AGHT+IEdPmL19UdV/nj838Gi9cF7n++Nt3CuB8F8HM0/Ed6ihGLC5se2e1S4EasbnPz0/pKisPSC0g== X-Received: by 2002:a53:cb03:0:b0:63f:a909:d0c6 with SMTP id 956f58d0204a3-6466a8b6552mr25947887d50.68.1767450181408; Sat, 03 Jan 2026 06:23:01 -0800 (PST) Received: from localhost ([2601:346:0:79bd:3bbb:b821:6713:e729]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-6466a8bcee0sm21277519d50.6.2026.01.03.06.23.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Jan 2026 06:23:01 -0800 (PST) Date: Sat, 3 Jan 2026 09:22:59 -0500 From: Yury Norov To: Andy Shevchenko Cc: Joel Fernandes , Steven Rostedt , Andrew Morton , Masami Hiramatsu , Mathieu Desnoyers , Christophe Leroy , Randy Dunlap , Ingo Molnar , Jani Nikula , 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 Message-ID: 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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.