Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp646909pxh; Tue, 9 Nov 2021 16:47:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJzy/FART4Y2mpijfCYDay0O6gycsXJ8REh7zJwvbThHvoSQcOF8cBA1g79mhcSRjcoZaSJF X-Received: by 2002:a6b:ed04:: with SMTP id n4mr7969253iog.83.1636505246894; Tue, 09 Nov 2021 16:47:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636505246; cv=none; d=google.com; s=arc-20160816; b=HucN7B5Kt6p9wDMD11GyJiGvJWt3zGMz51D4RU2nUXg40iEEG1qvwhWnkJRV44llUJ G3z1s/ZKO0RBnSrTLC7aNq/OpFIe0ljL6lwZVBLnrM1jR8+WZuwhJbL5dqZjWsKMFgKb ylyWhRMZ4JvoRe5vIfdYBh5uMCuWzzY803KnrJP/dyDVBZiiymmATyNOXEt85ackVR28 ZSFB7CsUFZjach7nQcnWrsDAV1il5OLWV6k/LRg/jgkKJ6/pP7TWsHFloPRA0kD0Q4/t q8uUL59RUtKQpecTacsLQA1NmrMxX6iYAbxZ7Uy8/6tGJ3ocaWSfn1OnnrDuQm6F/JUP GA/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=GM0JYa+acnAKyyE+8+85kWBtG9p5ztmPZ30QJcreQnc=; b=AyCixKQipDs242O6eFxat8lTAEXuz+q96fTXCkL58/JzxYGIs/K0yIDbW6oajgilfz QoADxJnbhVOBFFWuNTatYYcwlgAY29iCSH9voeC2mJ+EySolR6yv/rncIBnlcOoHDC/6 e+ggwWNiNijokD7FKQ7r+vr/gWKOPe0/XtR0MfEtAhb83/62e9c1W558u4FoBUn5dnkr KEu5jEv1SWDailV/luIKS99jik9Qzo636Vb6DThFaX5+A9fhWBgpAEz6k8tu1/8Zl07x 2SvOjsWXnjBNh78YN39xyxGOlQGkR170uQCKej8WHFHvlDPSYGsT41p0zSWY+lWIdZ84 Zg5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si51178489ill.11.2021.11.09.16.47.14; Tue, 09 Nov 2021 16:47:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345443AbhKIWrV (ORCPT + 97 others); Tue, 9 Nov 2021 17:47:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:35026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346263AbhKIWoN (ORCPT ); Tue, 9 Nov 2021 17:44:13 -0500 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 32A4E6108C; Tue, 9 Nov 2021 22:28:50 +0000 (UTC) Date: Tue, 9 Nov 2021 17:28:48 -0500 From: Steven Rostedt To: Jason Baron Cc: Sai Prakash Ranjan , Will Deacon , Catalin Marinas , quic_psodagud@quicinc.com, Marc Zyngier , gregkh@linuxfoundation.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, mingo@redhat.com, jim.cromie@gmail.com, seanpaul@chromium.org, Mathieu Desnoyers Subject: Re: [PATCHv3 3/3] dynamic_debug: Add a flag for dynamic event tracing Message-ID: <20211109172848.304b1c19@gandalf.local.home> In-Reply-To: <55a9fe7b-5573-0f80-e075-758b377a6c47@akamai.com> References: <3706af20bc64a320ff8f3ff8950738b988f4bdf5.1636452784.git.quic_saipraka@quicinc.com> <20211109104941.2d50eafc@gandalf.local.home> <20211109115951.1c2b5228@gandalf.local.home> <264b77dd-5509-60f9-248c-a93135b01aa9@quicinc.com> <20211109124046.2a772bcb@gandalf.local.home> <20211109165104.176b4cf9@gandalf.local.home> <55a9fe7b-5573-0f80-e075-758b377a6c47@akamai.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Hmm, should add Mathieu in on this discussion ] On Tue, 9 Nov 2021 17:13:13 -0500 Jason Baron wrote: > > What we are looking at there is to pass the dynamic debug descriptor to the > > trace event filtering logic, where you could filter on information passed > > to it. For example, on a specific file if a trace event is called by > > several different files or modules. > > > > -- Steve > > Ok, Could this be done at the dynamic debug level as it can already match > on specific files and line numbers currently? Not sure what you mean by that. The idea was that this would only be enabled if dynamic debug is enabled and that the DEFINE_DYNAMIC_DEBUG_METADATA() could be used at the tracepoint function location (trace_foo()) by the tracepoint macros. And then if one of the callbacks registered for the tracepoint had a "dynamic_debug" flag set, it would be passed the descriptor in as a pointer. And then, for example, the filtering logic of ftrace could then reference the information of the event, if the user passed in something special. # echo 'DEBUG_FILE ~ "drivers/soc/qcom/*"' > events/rwmmio/rwmmio_write/filter # echo 1 > events/rwmmio/rwmmio_write/enable And then only the rwmmio_write events that came from the qcom directory would be printed. We would create special event fields like "DEBUG_FILE", "DEBUG_FUNC", "DEBUG_MOD", "DEBUG_LINE", etc, that could be used if dyndebug is enabled in the kernel. Of course this is going to bloat the kernel as it will create a dynamic debug descriptor at every tracepoint location. -- Steve