From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC8CAC433EF for ; Tue, 9 Nov 2021 23:57:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DF5B60E97 for ; Tue, 9 Nov 2021 23:57:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8DF5B60E97 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dc0FSywwKbJeeaNcHtsX0LAMh96IxY/xrTEr3jBt6uk=; b=n8HR0uiisUJc80 Ku6w2E44eW2Hguk7/nTC/JGvAcWqJzzZqnSW/J+B3bIAfp/vLdfEk28c2W7FzA/0ZYp6MWMLDnpoa 0M6rtuSzqA6kUmlh47XlJntqH8mbV5IBJyoDpJcc7CM/uMEm+c67p7/bvBe1D3qoxOP3TWGm+9wvz kF0Y2IL5I0h+1OnL4gXTxrrCY20D0254hh43marbpvwxEAaErZYADBP3oSs2I/2rwLM7/fjNWk8MA /ymh+G7SIqsow6JqwmDGvU28PTKiOEyfDpgjvALfYC0In0tsQiMUmMsNOeQHTN3q18lMz5UWYTbgn YvQtSWs3tlkP1suuriYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkaxg-0043Go-5K; Tue, 09 Nov 2021 23:55:32 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkZbn-003Rt8-WB for linux-arm-kernel@lists.infradead.org; Tue, 09 Nov 2021 22:28:53 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211109_142852_126358_1960DACA X-CRM114-Status: GOOD ( 21.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel