From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1253123BCED for ; Sat, 20 Jun 2026 23:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781999043; cv=none; b=nYZIXA63pwSTMAWvwA0u8pqccFJfX10ZdlDPBhV1KorVY5WGaC4WsJfF5DFPkJ734OV6YeQcuSh5Dwmoy7+lhnQMFmug0sHu/dR2RJ3jUTMY8KL4hg3s18+xbs5Q1PgPxn4MtQlwBsNfLTjTPkts9MizuCyou6vA10+Sh0CWU+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781999043; c=relaxed/simple; bh=g/dS9IX00AY9wvdZUXWcqifKTKSznlKCnhAWJob1YdA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hVMR+AmAgfosRVuJnPcXOBzmesP2LAND65A13iraE3r+yjvZk46TUlTWGNzFJSbA7tXxgASM47aRHuuIa0S+0129Jhq88IwzX+IhzojzUY1o4qYbGRvOdDoobKsKoEWb6z7cV8fk31C+Jl3j6t7aNLLKt25/5q0s72cCpwMAf4M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rostedt.org; spf=pass smtp.mailfrom=rostedt.org; dkim=pass (2048-bit key) header.d=rostedt.org header.i=@rostedt.org header.b=eKFA8v6c; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=i0Bnk46z; arc=none smtp.client-ip=103.168.172.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rostedt.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rostedt.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rostedt.org header.i=@rostedt.org header.b="eKFA8v6c"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="i0Bnk46z" Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 48F78140004E; Sat, 20 Jun 2026 19:44:01 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Sat, 20 Jun 2026 19:44:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rostedt.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1781999041; x=1782085441; bh=IO7iYHMvP+zjV5LT5xLl5fCwfr7g1Y8D+/9PxwvWIjw=; b= eKFA8v6caL/RDsXbd30eLYZxtG9RvH8n7Ur6FqK0ktizcpmo7fCnUN74QkrwafzO oHxmZuyiWLPuwxM5kgz+3LdTMyq2C3L/SgftTvOqLqcipEiAsxYN9qUijpWDVAG1 /F97x1tPWIm1sRyXP3igMmtG070SCz3xBUHfHlZ9nHBlglbIRkl5Z+xrdEjTQpd1 FVCqjaaR6ohOPkIyb7Ml0Ayl8kiZmvEgsoFY1+vSQze2GUn/hrT5uiqo/OZFPd3e 27GWdmiPviSZp+TIAOualQ7BOskR4UyLkeM3mStOwXdg9dobQLgm4KTs5yn9YtbY HkpSr75YhUFYYZhZZA25sw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1781999041; x=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zWeE 241ZFHDJYMofuzQU8ZMrEpJDFW5BgffvMOAzbsE4r6rzpBpLgjhfd3tdTHwA X-ME-Proxy: Feedback-ID: id06e481b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 20 Jun 2026 19:43:56 -0400 (EDT) Date: Sat, 20 Jun 2026 19:43:53 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Yury Norov , LKML , Masami Hiramatsu , Mathieu Desnoyers , Ao Sun , David Carlier , Karl Mehltretter , Martin Kaiser , Pengpeng Hou , Qian-Yu Lin , Rik van Riel , Rosen Penev , Shuvam Pandey , Vineeth Pillai , Yash Suthar , Yu Peng , Sebastian Andrzej Siewior , Thomas Gleixner , Peter Zijlstra Subject: Re: [GIT PULL] tracing: Updates for 7.2 Message-ID: <20260620194233.4e1e5d10@fedora> In-Reply-To: References: <20260616180122.57a3b426@fedora> <20260619081513.3e4a1fb0@fedora> <20260620181957.115d662c@fedora> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) 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-Transfer-Encoding: 7bit On Sat, 20 Jun 2026 15:39:25 -0700 Linus Torvalds wrote: > Feel free to try to come up with such a patch. > > But honestly, before you do, what is the *advantage* of such a thing? For debugging it is really useful. > > Because you seem to think that "trace_printk()" and "printk()" are the same. > > They really aren't. I do not in any way think they are the same. To me, printk() is used for information to the console for various production messages, whereas trace_printk() is used when you have that nasty bug that you don't know exactly where it is. trace_printk() should never be used in a production environment. When I (and many others) use trace_printk() to debug, we basically use the "shotgun" approach. That is, we add trace_printk() all over the place to see where the bug occurs. This could be for 10s of files. Having to add an include to each one of these files is a burden and adds to the frustration when you are debugging something that doesn't work. You just want to add trace_printk() in places to see where the bug triggers. A lot of times, all I add is: trace_printk("%s:%d\n", __func__, __LINE__): and cut and paste that in several locations in several files between if statements. I may even add: if (bad_condition()) tracing_off(); Which will disable tracing when the bad condition is detected. Then I can look at the trace to see all the prints up to the bug. This is *really* useful!!! I really want to avoid having to add an include for trace_printk when I'm focusing on just finding were the bug happens. I'm pretty sure others on the Cc list have the same use case. I totally sympathize with getting rid of junk out of kernel.h (and possibly getting rid of kernel.h altogether) but I also want to keep this debugging ability around. -- Steve