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 AD11EC433EF for ; Tue, 9 Nov 2021 17:01:24 +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 6EC4C611AF for ; Tue, 9 Nov 2021 17:01:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6EC4C611AF 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=n4cI6hPnxPCw4G3eXON9enucg3JBKHXyIEjTHAOfPno=; b=tjou2mPqxOY/mO xpN3PuX3z3YafVnjdnnJUDWEWIAhYkW1t6KcSlwCYjXxK9IWj9ShKxWNNIQzYMOiO9qWoBPpztDwW gvaxgDRjfiJhpRxw3PM710d55S2rrj8w9QsqMcbieyl66p8eiSAjrtqw3A+SV/1IYe+HaIzJwxtZu 1aim59nYHbqpP/PGQybyjOz3gnLh3dY6QH/novK68gKfQzCGirZnvz0Fq8yL3fzogrP16dY8Q0SHo 6x4/GEOIPuQYGui3i1AG1EhPb2BK+K+9kE+L6oTsbgHeALmwzgt1sS8MppKFirvA3GiBP9bRrWkLI bpFj4intCmo8U5WPjh9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mkUTW-002oqP-9R; Tue, 09 Nov 2021 16:59:58 +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 1mkUTS-002opR-Q0 for linux-arm-kernel@lists.infradead.org; Tue, 09 Nov 2021 16:59:56 +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 E90E0611AF; Tue, 9 Nov 2021 16:59:52 +0000 (UTC) Date: Tue, 9 Nov 2021 11:59:51 -0500 From: Steven Rostedt To: Sai Prakash Ranjan Cc: Will Deacon , Catalin Marinas , , Marc Zyngier , , , , , , , , Subject: Re: [PATCHv3 3/3] dynamic_debug: Add a flag for dynamic event tracing Message-ID: <20211109115951.1c2b5228@gandalf.local.home> In-Reply-To: References: <3706af20bc64a320ff8f3ff8950738b988f4bdf5.1636452784.git.quic_saipraka@quicinc.com> <20211109104941.2d50eafc@gandalf.local.home> 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_085954_907398_D08D54A4 X-CRM114-Status: GOOD ( 20.24 ) 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 On Tue, 9 Nov 2021 21:52:26 +0530 Sai Prakash Ranjan wrote: > >> rwmmio_read: rpmh_rsc_probe+0x35c/0x410 readl addr=0xffff80001071000c > >> rwmmio_read: rpmh_rsc_probe+0x3d0/0x410 readl addr=0xffff800010710004 > >> rwmmio_write: rpmh_rsc_probe+0x3b0/0x410 writel addr=0xffff800010710d00 val=0x3 > >> rwmmio_write: write_tcs_cmd+0x6c/0x78 writel addr=0xffff800010710d30 val=0x10108 > > I'd much rather have a module name or something attached to the event that > > ca be filtered on via the trace event filters, than having it determined by > > some side effect done in another directory. > > I presume we don't have CALLER_MODULENAME0,1,2.. like CALLER_ADDR0,1,2 > without which we > cannot insert the module name to this trace event since MMIO accessors > are defined in low level > arch headers and we won't get any useful module information from where > these accessors are > called. The function name and the offset is good enough to identify the > exact line and module after > post-processing with tools like GDB, objdump, so I feel we can keep the > trace event fields limited? I'm thinking we can pass the descriptor to the event and not have it record it. We could add a new field type for defining the event. Something like: __filter_field() that has size zero in the event itself, but is available to the filtering logic. Than perhaps we could pass that descriptor to the filter that has all the information needed. DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, width); log_read_mmio(width, addr, descriptor); Where descriptor is NULL when dynamic debug in disabled. Have a way to pass that descriptor to the filtering logic (I'll have to take a look into it) and then be able to use the normal filtering. This way you could also create multiple instances, where one instance records the events coming from one file, and the other records events from another file, and not have just one big switch that disables all calls to log_read_mmio(). -- Steve _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel