From nobody Sat Feb 7 16:00:28 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 43A172CA8 for ; Sat, 1 Mar 2025 16:22:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740846153; cv=none; b=LtLrzYpi/04mJ2/pQUzvWoAaTYb/42+aQ3nLPOxdg0HcN71MoDxiqEs8yYr9I6F4khMW7FDzo4JGKVkeQLGIXKybCaKmBQWKSrNGcVAsGC1rvlXoFBFoA/jPGrlwn0PMHDkWM36azNC2UCw+UrZHiEALauKH2p6RpAgQ8ScL4nk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740846153; c=relaxed/simple; bh=7GLwPeu5KSxEZPPg2F64+CLNB9yhb7jzmU+0aH6L6aQ=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=tQfueGRM4J0PYj8zrGA1UmmIr6aneILOXBk4nweAMfs7l9kAJFHpuH+bzCyhAM2znmDIl7MfViF/TJE83I2uJb/D7Iz3sA4iNTrAj0bKvtOj2bSqxJ9ZEHldDKk0DU/7d0MN+k3dTX+AdKi6o7bs5qxacVxv5Mw8XSd9Vrlbo28= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFCD7C4CEE6; Sat, 1 Mar 2025 16:22:32 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1toPcW-0000000AgxA-3lG9; Sat, 01 Mar 2025 11:23:20 -0500 Message-ID: <20250301162320.748095061@goodmis.org> User-Agent: quilt/0.68 Date: Sat, 01 Mar 2025 11:22:59 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Zhouyi Zhou Subject: [for-next][PATCH 1/3] ring-buffer: Fix typo in comment about header page pointer References: <20250301162258.654648143@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Zhouyi Zhou Fix typo in comment about header page pointer in function rb_get_reader_page. Link: https://lore.kernel.org/20250118012352.3430519-1-zhouzhouyi@gmail.com Signed-off-by: Zhouyi Zhou Signed-off-by: Steven Rostedt (Google) --- kernel/trace/ring_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index bb6089c2951e..9d4d951090d3 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -5318,7 +5318,7 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_bu= ffer) * moving it. The page before the header page has the * flag bit '1' set if it is pointing to the page we want. * but if the writer is in the process of moving it - * than it will be '2' or already moved '0'. + * then it will be '2' or already moved '0'. */ =20 ret =3D rb_head_page_replace(reader, cpu_buffer->reader_page); --=20 2.47.2 From nobody Sat Feb 7 16:00:28 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 515011E25E3 for ; Sat, 1 Mar 2025 16:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740846153; cv=none; b=ek8FYn1X34Oef6fcOqkph53nzgMvU1vdPMP797AKtZVOxoDffQHo+cDp7Vn7FyNrkkvliCA6i1GzmsQz2K4iVi2rUTGfUN1+sD5li2wbcoeV3er7+UJZZqsSwWRARaIXVvBycSUVbZEj977MledDkCUVIRDjtmIMLf37kikun7k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740846153; c=relaxed/simple; bh=t5EvaYWoI5FL3vzeHxx/tNJOe/m4FapskxyeKZrfXM0=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=QQ/yJOHwq6TVSf9GrMhHCaMyG47mLjN05ga8v6uyrdUT5kHMFomb30xV6ipliUfufwLqhvF6PzMVpbHFvZLoul5ufAUR6rHZaEqnluMYqb6cCGusMw7YgNJJEQ7k/4cnmvz6SULb9Ec5mRX5/CzHnSTYOxjKe85tKIuCsco0XyY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6A75C4CEE2; Sat, 1 Mar 2025 16:22:32 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1toPcX-0000000Agxg-0HaL; Sat, 01 Mar 2025 11:23:21 -0500 Message-ID: <20250301162320.918285043@goodmis.org> User-Agent: quilt/0.68 Date: Sat, 01 Mar 2025 11:23:00 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Hengqi Chen Subject: [for-next][PATCH 2/3] tracing: Remove orphaned event_trace_printk References: <20250301162258.654648143@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Hengqi Chen The event_trace_printk macro has no callers since commit b8e65554d80b ("tracing: remove deprecated TRACE_FORMAT"). So drop it. Link: https://lore.kernel.org/20250213113951.813258-1-hengqi.chen@gmail.com Signed-off-by: Hengqi Chen Signed-off-by: Steven Rostedt (Google) --- include/linux/trace_events.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 5caea596fef0..fa9cf4292dff 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -859,24 +859,6 @@ int ftrace_set_clr_event(struct trace_array *tr, char = *buf, int set); int trace_set_clr_event(const char *system, const char *event, int set); int trace_array_set_clr_event(struct trace_array *tr, const char *system, const char *event, bool enable); -/* - * The double __builtin_constant_p is because gcc will give us an error - * if we try to allocate the static variable to fmt if it is not a - * constant. Even with the outer if statement optimizing out. - */ -#define event_trace_printk(ip, fmt, args...) \ -do { \ - __trace_printk_check_format(fmt, ##args); \ - tracing_record_cmdline(current); \ - if (__builtin_constant_p(fmt)) { \ - static const char *trace_printk_fmt \ - __section("__trace_printk_fmt") =3D \ - __builtin_constant_p(fmt) ? fmt : NULL; \ - \ - __trace_bprintk(ip, trace_printk_fmt, ##args); \ - } else \ - __trace_printk(ip, fmt, ##args); \ -} while (0) =20 #ifdef CONFIG_PERF_EVENTS struct perf_event; --=20 2.47.2 From nobody Sat Feb 7 16:00:28 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 625361E3DE4 for ; Sat, 1 Mar 2025 16:22:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740846153; cv=none; b=F3LMNzJpIU/o2RmUQHyIo7vnT8exUJ+2u+749WqM/wJ2YiX9ufJGlaL9naJmiJkgx+DCO8eiWiZ+48nL9h6W9ReU9PP8rWiuoJOx1ZYeXDTd7TdzS70RQDafilp6bUdyle6ATCTdol2eZpc7MQxmSLsaqDdsFNjhOl0ExUslhzc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740846153; c=relaxed/simple; bh=iS/TKtHfTKR62iLUTdR4zjY4hsC+3+pNIMjpfDu7Wzo=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=IpPtklS/pQzP2gL/SPgn7xvmVG457JGS2SXCiJ61rHDnPmjHCH0PPXJ7ZteqVeLx2Z+4Zn7j3LFtBdPTZl4viBKzci+LMgwzjghMjbbHmUBWq2acvrRx39Vs/Iy8mpeivviKa67hsRyLed/2Eza5Ob6Lh14/xFyeRsV8EE/kDxA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A08AC4CEEA; Sat, 1 Mar 2025 16:22:33 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1toPcX-0000000AgyA-1124; Sat, 01 Mar 2025 11:23:21 -0500 Message-ID: <20250301162321.091457102@goodmis.org> User-Agent: quilt/0.68 Date: Sat, 01 Mar 2025 11:23:01 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Michael Petlan , Veronika Molnarova , Suren Baghdasaryan , Linus Torvalds Subject: [for-next][PATCH 3/3] tracing: gfp: Remove duplication of recording GFP flags References: <20250301162258.654648143@goodmis.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Steven Rostedt The gfp_flags when recorded in the trace require being converted from their numbers to values. Various macros are used to help facilitate this, but there's two sets of macros that need to keep track of the same GFP flags to stay in sync. Commit 60295b944ff68 ("tracing: gfp: Fix the GFP enum values shown for user space tracing tools") added a TRACE_GFP_FLAGS macro that holds the enum ___GFP_*_BIT defined bits, and creates the TRACE_DEFINE_ENUM() wrapper around them. The __def_gfpflag_names() macro creates the mapping of various flags or multiple flags to give them human readable names via the __print_flags() tracing helper macro. As the TRACE_GFP_FLAGS is a subset of the __def_gfpflags_names(), it can be used to cover the individual bit names, by redefining the internal macro TRACE_GFP_EM(): #undef TRACE_GFP_EM #define TRACE_GFP_EM(a) gfpflag_string(__GFP_##a), This will remove the bits that are duplicate between the two macros. If a new bit is created, only the TRACE_GFP_FLAGS needs to be updated and that will also update the __def_gfpflags_names() macro. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Michael Petlan Cc: Veronika Molnarova Cc: Suren Baghdasaryan Cc: Linus Torvalds Link: https://lore.kernel.org/20250225135611.1942b65c@gandalf.local.home Signed-off-by: Steven Rostedt (Google) --- include/trace/events/mmflags.h | 41 +++++++++------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h index 72fbfe3caeaf..82371177ef79 100644 --- a/include/trace/events/mmflags.h +++ b/include/trace/events/mmflags.h @@ -78,6 +78,13 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT); =20 #define gfpflag_string(flag) {(__force unsigned long)flag, #flag} =20 +/* + * For the values that match the bits, use the TRACE_GFP_FLAGS + * which will allow any updates to be included automatically. + */ +#undef TRACE_GFP_EM +#define TRACE_GFP_EM(a) gfpflag_string(__GFP_##a), + #define __def_gfpflag_names \ gfpflag_string(GFP_TRANSHUGE), \ gfpflag_string(GFP_TRANSHUGE_LIGHT), \ @@ -91,41 +98,13 @@ TRACE_DEFINE_ENUM(___GFP_LAST_BIT); gfpflag_string(GFP_NOIO), \ gfpflag_string(GFP_NOWAIT), \ gfpflag_string(GFP_DMA), \ - gfpflag_string(__GFP_HIGHMEM), \ gfpflag_string(GFP_DMA32), \ - gfpflag_string(__GFP_HIGH), \ - gfpflag_string(__GFP_IO), \ - gfpflag_string(__GFP_FS), \ - gfpflag_string(__GFP_NOWARN), \ - gfpflag_string(__GFP_RETRY_MAYFAIL), \ - gfpflag_string(__GFP_NOFAIL), \ - gfpflag_string(__GFP_NORETRY), \ - gfpflag_string(__GFP_COMP), \ - gfpflag_string(__GFP_ZERO), \ - gfpflag_string(__GFP_NOMEMALLOC), \ - gfpflag_string(__GFP_MEMALLOC), \ - gfpflag_string(__GFP_HARDWALL), \ - gfpflag_string(__GFP_THISNODE), \ - gfpflag_string(__GFP_RECLAIMABLE), \ - gfpflag_string(__GFP_MOVABLE), \ - gfpflag_string(__GFP_ACCOUNT), \ - gfpflag_string(__GFP_WRITE), \ gfpflag_string(__GFP_RECLAIM), \ - gfpflag_string(__GFP_DIRECT_RECLAIM), \ - gfpflag_string(__GFP_KSWAPD_RECLAIM), \ - gfpflag_string(__GFP_ZEROTAGS) - -#ifdef CONFIG_KASAN_HW_TAGS -#define __def_gfpflag_names_kasan , \ - gfpflag_string(__GFP_SKIP_ZERO), \ - gfpflag_string(__GFP_SKIP_KASAN) -#else -#define __def_gfpflag_names_kasan -#endif + TRACE_GFP_FLAGS \ + { 0, "none" } =20 #define show_gfp_flags(flags) \ - (flags) ? __print_flags(flags, "|", \ - __def_gfpflag_names __def_gfpflag_names_kasan \ + (flags) ? __print_flags(flags, "|", __def_gfpflag_names \ ) : "none" =20 #ifdef CONFIG_MMU --=20 2.47.2