Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6842413rdb; Fri, 15 Dec 2023 09:37:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IEW/f0i3Jx8BWFEj/nWYTgZoNY2PaSU8lT/vQLy9GJimv5vpKyyj683yVMJeTEcWgSlw1fb X-Received: by 2002:a05:6a21:3e04:b0:193:fd81:9523 with SMTP id bk4-20020a056a213e0400b00193fd819523mr459994pzc.47.1702661867784; Fri, 15 Dec 2023 09:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702661867; cv=none; d=google.com; s=arc-20160816; b=kxAmIa+e0olFT7nrwq78EAHnP8nObjC60av22i2QQae2Cey88BiyV3+wCsryGl9dRa CzJkB7g0hnZB7EV0fKcx5degnLkl4BLb+zIqQg6olaS/ZkDLCAId1/j2mkxAy/vHTjnF zap/GsaQp0uzIddh05ICvsOpVw6NqHQq883HsrMc3OKEUHpMjM1DIAgctT3cHnAJq4ey ULcmfGW26Sa6aNbj+fNbsynawhZD3L7U//GHAnah1kk1VIZffRmr+PzJFCz+h0d1KckS HWY8ckAGb8mltZVV2NWsbuZwAsUc1sL+gQM6Gb5YTBnyeTRotFDaPa4zgU3Fp5adAYiX zRFw== ARC-Message-Signature: i=1; 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=TfqOwZBE1zESWzM+7mKCbaUMs1xVLuSWD17yMDL1P2U=; fh=UZpTDzkhzZ9L8G7jwsdcfgvh6xD2n8fD+pbOm7SKsOE=; b=SRahXq8huuF1eyPQ0GsG9fyuR3YJ/9lEe/IK6k3ECX+cuZDxCSV/YPUrg1Ab9Md1sC WNhIejC0oJg9QdpWRMsoC/WtLzmrXXHGhkUnAYF9gzDycJekcuSYiET+UIjnYnaaBQ1N aprUN21P9njRsr+oz3a4s92fyFk8xVqt9esu3E2wnujhgF4Yu3n2Vk7a+gmRe1mr8Kpp xl/+xpHjJWel3RMKEMhE4zf0Rw7n5GueyPTfHAlcnpwatrPZDCaF811ChfG9alr2G2rw 1MEKFvkZooXI+sTtdwCIHU+I89gONKKeWBLUbkXmcEdUHxs2U6ee/mcdXowkysrUSUg3 6QhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1428-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c9-20020a63d509000000b005bd03d4f2d7si12912091pgg.511.2023.12.15.09.37.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 09:37:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-1428-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1428-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 40D61B23697 for ; Fri, 15 Dec 2023 17:35:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 08B2C82EC4; Fri, 15 Dec 2023 17:35:01 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org 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 8D7083011B; Fri, 15 Dec 2023 17:35:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2F60C433C8; Fri, 15 Dec 2023 17:34:59 +0000 (UTC) Date: Fri, 15 Dec 2023 12:34:58 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: LKML , Linux trace kernel , Masami Hiramatsu , Mark Rutland Subject: Re: [PATCH] tracing: Add disable-filter-buf option Message-ID: <20231215123458.63f57238@rorschach.local.home> In-Reply-To: References: <20231215102633.7a24cb77@rorschach.local.home> <21936075-3858-446a-9391-a38e8d8968e7@efficios.com> <20231215120417.567d5ea4@rorschach.local.home> X-Mailer: Claws Mail 3.17.8 (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 Fri, 15 Dec 2023 12:24:14 -0500 Mathieu Desnoyers wrote: > On 2023-12-15 12:04, Steven Rostedt wrote: > > On Fri, 15 Dec 2023 10:53:39 -0500 > > Mathieu Desnoyers wrote: > [...] > >> > >> So rather than stacking tons of "on/off" switches for filter > >> features, how about you let users express the mechanism they > >> want to use for filtering with a string instead ? e.g. > >> > >> filter-method="temp-buffer" > >> filter-method="ring-buffer" > >> filter-method="input-arguments" > > > > If I add other ways to filter, it will be a separate file to control > > that, but all options are on/off switches. Even if I add other > > functionality to the way buffers are created, this will still have the > > same functionality to turn the entire thing on or off. > > I'll be clearer then: I think this is a bad ABI. In your reply, you justify > this bad ABI by implementation motivations. What's wrong with a way to stop the copying ? The option is just a way to say "I don't want to do the copy into the buffer, I want to go directly into it" > > I don't care about the implementation, I care about the ABI, and > I feel that your reply is not addressing my concern at all. Maybe I don't understand your concern. It's an on/off switch (like all options are). This is just a way to say "I want to indirect copying of the event before filtering or not". The "input-argument" part above may never happen. What's different between tracefs and LTTng, is that all events are created by the subsystem not by me. You don't use the TRACE_EVENT() macro, but you need to manually create each event you care about yourself. It's more of a burden but you also then have the luxury of hooking to the input portion. That is not exposed, and that is by design. As that could possibly make all tracepoints an ABI, and you'll have people like peterz nacking any new tracepoint in the scheduler. He doesn't allow trace events anymore because of that exposure. > > Moreover, double-negative boolean options (disable-X=false) are confusing. I agree with this, and will rename it to "filter-buffer" instead. I blame getting up at 3am for my 5:15am flight for not thinking clearly on that ;-) Thanks! -- Steve