From nobody Wed Jan 22 11:32:25 2025 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 710A085947 for ; Wed, 22 Jan 2025 02:49:15 +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=1737514155; cv=none; b=r6L1nF0Rx58nfzCAMMHFW8XdF2reqNAlUWuht9LtlcgNedu8i6dfQ+77EhAj7zKZhkT62mTzH3sYZ57HaO+KITO6zEXvqiucKATsEwuN1ceQswgvsJnsU7X1dtDDXTwYCzNErPGH04iquBJb2PikxshA0FGKWC/44vuvn1BtXic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737514155; c=relaxed/simple; bh=nB5rq90Z+SwgYhkG7Cx0wgYne1sCT00siZjSL+j3DUc=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=IBsCR7PLRtw5VxA5Ti+pnu3R4C8WvDniM/Kx8nkelJ+8daKRH7cQDE2cIyDR9dKgxLDeEbq/dZwFOfzhr0Jqke0+ZssOYCCw4iNy9MIFb6b+oHKMSG+V2pPdE186LsRchSVvSdlxBKRL66T4Bq54hL7er03FT+/0WTh3sMjB/2U= 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 11752C4CEE4; Wed, 22 Jan 2025 02:49:15 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1taQnv-00000000P9P-2gn3; Tue, 21 Jan 2025 21:49:19 -0500 Message-ID: <20250122024919.492911772@goodmis.org> User-Agent: quilt/0.68 Date: Tue, 21 Jan 2025 21:48:55 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-next][PATCH 2/2] tracing: Fix output of set_event for some cached module events References: <20250122024853.550837992@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 following works fine: ~# echo ':mod:trace_events_sample' > /sys/kernel/tracing/set_event ~# cat /sys/kernel/tracing/set_event *:*:mod:trace_events_sample ~# But if a name is given without a ':' where it can match an event name or system name, the output of the cached events does not include a new line: ~# echo 'foo_bar:mod:trace_events_sample' > /sys/kernel/tracing/set_event ~# cat /sys/kernel/tracing/set_event foo_bar:mod:trace_events_sample~# Add the '\n' to that as well. Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Link: https://lore.kernel.org/20250121151336.6c491844@gandalf.local.home Fixes: b355247df104e ("tracing: Cache ":mod:" events for modules not loaded= yet") Signed-off-by: Steven Rostedt (Google) --- kernel/trace/trace_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 5217dcddcb4c..a9d7d02bbb20 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -1634,7 +1634,7 @@ static int s_show(struct seq_file *m, void *v) =20 /* When match is set, system and event are not */ if (iter->event_mod->match) { - seq_printf(m, "%s:mod:%s", iter->event_mod->match, + seq_printf(m, "%s:mod:%s\n", iter->event_mod->match, iter->event_mod->module); return 0; } --=20 2.45.2