Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp610007pxh; Tue, 9 Nov 2021 16:08:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJybZQ+3Umgo7LxvSDFa4HnayoS7fOVxS/voU1pBZzrGEoiKFggu9YHS6GEWOWUHcDalYj+u X-Received: by 2002:a92:b105:: with SMTP id t5mr8580962ilh.152.1636502905769; Tue, 09 Nov 2021 16:08:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636502905; cv=none; d=google.com; s=arc-20160816; b=0Kpgy6dxHTh3+gWaboDzWryKSdicEL6BzKnCI9ZvbFd1soiNcxctDUVvSPo/o37UNq powdz+Luv4rPJ4qMbOwdbUMGmMyR7lVvHx1WJGa30mtJ9CpMJLP/CpHc8Zgs3Gjrwv63 n6Zb4lJax5Al9Ohwq9sYqrC+Agar3Rnw/2bEyf4dly+Zploz2k+XxMdANad68s+YT0dp wobZgSsLggZ9QFhhNyehYrGdE2J4Hx1p//yvRRi/3XwD8R20Rjyr1PRuS5fjtm78GOzs btYw/ORhoDtFzjvt4bgEc3voHqb3K9ubzUO5PvR9abtwquaA/B7jqzeGX/Ot9snWXkQa TPCA== 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=krA8NTxJpQVAPgWWoLOMP4sxsBOtyYL6PsdVlVkCySo=; b=wRKfzd4aAbm8L1UqwqC8B3GDX82q6UCt5VrQsPWYgD1yQ2LPGvSC8+E5I4ulw+AWMz yJfNCqfnCQkrtgTQmzOHzI1MjOw2xl0u5OM2xS3qkd5ABvezbs5Tug4Q3vqvXU3Gmj/s GXP2Qi27vKsNthxEZCsGkVZ52uRnC+wTlZkmLdUU7B72aMFvRJO0G79WdsfaruCFJBrw oIPyiVwa3YvVWsecLl3UR0iJVg4uTBgmPQwEb3ouNYaJjEBjp0v71ImS1y7Ogq1hSnzw /2dYQdkQ/K6Pw1tJn4eWh290izQiGzpLftvU4LIYp4qEn8yQOLT+YmLYfYanoSQiXJsb zmFA== 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 f25si4234285iox.8.2021.11.09.16.08.13; Tue, 09 Nov 2021 16:08:25 -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 S235769AbhKIRCl (ORCPT + 97 others); Tue, 9 Nov 2021 12:02:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:37442 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234305AbhKIRCk (ORCPT ); Tue, 9 Nov 2021 12:02:40 -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 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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