Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp122155lqs; Mon, 4 Mar 2024 17:55:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVdlV0cpL7iN5MsOnQ4+EH4XLWoEpJxAtMgjz3dTEUTQWZl9PFsxVbDPB4o+lz7ZW53/JITVkMUBY+AU0oZ8tQLzwFiEKarPoJhPFngag== X-Google-Smtp-Source: AGHT+IG9xt+9EZdNAxio4W5Lbm5C4rx8o8h2EbZs5hqLdw/SDsz2xLI0QqoYQMiioGEGD3bkzSep X-Received: by 2002:a05:6a20:d385:b0:1a1:501e:8159 with SMTP id iq5-20020a056a20d38500b001a1501e8159mr569546pzb.24.1709603748595; Mon, 04 Mar 2024 17:55:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709603748; cv=pass; d=google.com; s=arc-20160816; b=MQiMotGaDTMmB2hvoiv+nOgwHFlZFo2JQR8lNechSiLm015HSelA2v1NrWzQSXOLrV i3rpLRuI07MdiuZo/UTZC5jUztfKibXZhSxQG20F3q2YaTEmmWHpOB3wh0ZdbFCy1CKl anKF1dv+3x6QLCpflR33byX9H4tHq6r5ADDTEhEpwGbIJuvQGVkKJ4dNHz/iL5yube3l CZ2eDC8+VidizXvuUF9ObiP9N+/JplzaG67DtVI4+Xanv0DB8lIE3FSGU0n+BjtkHF0C upIUeGej1muCmeeHyd1nGp7gCFEtO45RUucfVIP1eVFidyc4b7ENGjEGt0HgL4jkCbhL xrnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=MSLjwH+W2l5isx0XyNnhQNuAub4Ew3Y7WEZDJ04yrM0=; fh=5GSL8iMgAyuzpToQ7VTfMGDhy7T5RKF49tB9TFqJckE=; b=F/5jVX72Tzvrck8BMFyRuRyyvW0xxVhVB7vBr/HPlrpFpyAgzVGmGLw6m5al00ebaF DZNJVOlutnycD65dxSRL8hwS6PoKO2aDW0pEZ/j4QmYQENI5AahbejPkQjAy28RHY5Z8 PIcb8ibmgbqr9pGBka/riOTa3TuHJF41StkTWU4MxEwez7+RISKek7lkbfes7c9e3ZWI QIG11C6EMi2sL9G9q6mk45FtF+qT3WMPqGnT2sBYapFzFUMVe700BeWEyBVUsXOeKCM9 rU1TdLSS81v81JeA3khdnwgn6s2e5LUuOsX+EmtTyVBTd8ANVbIHjgvtToIWJlTon6CL lwBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-91517-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91517-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a23-20020a17090ad81700b0029af80d747dsi10553551pjv.14.2024.03.04.17.55.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 17:55:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91517-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-91517-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91517-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 48B12284FDF for ; Tue, 5 Mar 2024 01:55:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A81817C9E; Tue, 5 Mar 2024 01:55:43 +0000 (UTC) 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 21D9A2F43; Tue, 5 Mar 2024 01:55:42 +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=1709603743; cv=none; b=fHvNDS28MuMgf50uSd1LNMSPZkY8QsVPmixA2jO+wRR6ronxNEz5X4UXbasirr0NRLGzxdXjBUb6myvHymaWDYITaqrnlbDZyzLBIYikijZ3domNcGdox+K6L/elVOpXN0TW8iO6Qzsp30Q92+FGZGEbFf/qgCH+dQgvJxIsvpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709603743; c=relaxed/simple; bh=FlXtlSeO6cB/ZUPdjYZmayDOEDubCs5O53bxkF5XlEM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AIt1I8okxX0haWkpoRKPr+Okyvu2611D329v/40cx6EIpfAssTpPwq0Eyg2lP++oKxW1LfAz9X9wV10uF4YEBgBI7b1wKvYGFoQDd6aqA53F14gGf6s+jOjjUHMvNPMZgqjiemMQOyy5pUf+HrgiPYupAd3sDV6yLvhNIdSujh4= 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 CE76BC433F1; Tue, 5 Mar 2024 01:55:41 +0000 (UTC) Date: Mon, 4 Mar 2024 20:57:30 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Linus Torvalds , Sachin Sant Subject: Re: [PATCH] tracing: Have trace_marker writes be just half of TRACE_SEQ_SIZE Message-ID: <20240304205730.53328530@gandalf.local.home> In-Reply-To: References: <20240304192710.4c99677c@gandalf.local.home> <469d31a7-f358-4547-bb17-0979b3515924@efficios.com> <20240304203516.45b7a551@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-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 Mon, 4 Mar 2024 20:36:28 -0500 Mathieu Desnoyers wrote: > > <...>-999 [001] ..... 2296.140373: tracing_mark_write: hello > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > This is the meta data that is added to trace_seq > > If this header has a known well-defined upper-limit length, then use > that in the BUILD_BUG_ON(). Unfortunately there's no set limit. It's built up by different callbacks and such. The output can be changed by options set by the user and even by tracers, like the function graph tracer: # tracer: function_graph # # CPU DURATION FUNCTION CALLS # | | | | | | | 1) | /* hello */ But the worse that will happen if it overflows is that the event is replaced with: <...>-999 [001] ..... 2296.140373: [LINE TOO BIG] But this has never happened outside of development. I guess you could trigger it if you add a trace_printk() that has a string bigger than TRACE_SEQ_BUFFER_SIZE. But as Linus says, "Don't do stupid things" ;-) But in reality, with all the options and everything, I've never seen the appended text more than 80 bytes (and probably much less). -- Steve