Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3321967pxb; Tue, 20 Apr 2021 05:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlQOzWZIEejz7GiY7yIo6bloGyqPGttn5AvGy2OiYGjjFJWf10steut1T3yUr76zqAQCJ1 X-Received: by 2002:a62:4d86:0:b029:252:c889:2dd8 with SMTP id a128-20020a624d860000b0290252c8892dd8mr25546685pfb.41.1618923454059; Tue, 20 Apr 2021 05:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618923454; cv=none; d=google.com; s=arc-20160816; b=S79rdZWozLse1lcNFWEo5lwnN5Xv6eSJjM+egXB4aZurn2U4K8Gf3GXFDfHbMtKkWb pPlcYk5ssat3xK97OdymvilyTHfq1/H0K2xtPMwsf112J3tHm2R8FQtmkmWseu+ZxpXL ZkJ1+TtboWFCTo5iCiFTJi7Jg/KR0jpRcsJ9VUVUPZX0ZMjjsAxOk57avX6Vme5/HPJF o81g1k6kbhXgn60tOAqOQawHsvuH4gvRbYDtWxLzCMGASZiOpFhJCqm81NsO3jceZegk y95Fyd2MEYfUCD50WmBiR91DVCicEMvHBixNmHPmC62K6vR7RCObNbyBXq2a/UCzj6t5 ko7w== 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=GdcXPYKMKalQLt/FQqST4/9RVlc7JYJNzdM6yPIuVTM=; b=VXEtYMmrUWZQ+touhGeYVYuV0OZ53CHn13YSZkuDNeAUEBeN12zZ2rzQxiIL6q2ITS N+gALOcuiGs0vWvVIqT147Z239uZ6t5tVBH03UrSE9//frI2ZQcPf+HI685YfL9M5atZ o+HMsGN0ljwgiCpNTRZBTUwtloxDELhmxGEgfo5/fyVcQDSxQW5cyukwOOQFMCxWw2rs z3DaV92zetl6mrr2ov/2yrF5+KUpOCV6GbUSGL/qOgh/vNcjtnpKQdHr4mVR6Ja8cvoj LhyEknZfYC9a+ArZj/pAJMlB4+ybLCEYln2kE6oXzlwksjoliqSqsPbxCBiFUS1cpCAF 2kPg== 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 f11si19578091pfe.306.2021.04.20.05.57.20; Tue, 20 Apr 2021 05:57:34 -0700 (PDT) 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 S232084AbhDTM4H (ORCPT + 99 others); Tue, 20 Apr 2021 08:56:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:54368 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbhDTM4G (ORCPT ); Tue, 20 Apr 2021 08:56:06 -0400 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 E4C6E613C8; Tue, 20 Apr 2021 12:55:33 +0000 (UTC) Date: Tue, 20 Apr 2021 08:55:32 -0400 From: Steven Rostedt To: Dan Williams Cc: "fweisbec@gmail.com" , "jeyu@kernel.org" , "mathieu.desnoyers@efficios.com" , "linux-kernel@vger.kernel.org" , "mingo@elte.hu" , "chris@chris-wilson.co.uk" , "yuanhan.liu@linux.intel.com" , "Grumbach, Emmanuel" Subject: Re: [PATCH][RFC] tracing: Enable tracepoints via module parameters Message-ID: <20210420085532.4062b15e@gandalf.local.home> In-Reply-To: References: <1299622684.20306.77.camel@gandalf.stny.rr.com> <877hc64klm.fsf@rustcorp.com.au> <20130813111442.632f3421@gandalf.local.home> <87siybk8yl.fsf@rustcorp.com.au> <20130814233228.778f25d0@gandalf.local.home> <77a6e40b57df092d1bd8967305906a210f286111.camel@intel.com> <20210419181111.5eb582e8@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 Mon, 19 Apr 2021 18:25:54 -0700 Dan Williams wrote: > On Mon, Apr 19, 2021 at 3:11 PM Steven Rostedt wrote: > > > > On Mon, 19 Apr 2021 21:54:13 +0000 > > "Williams, Dan J" wrote: > > > > > [ drop Rusty, add Jessica and Emmanuel ] > > > > Probably could have kept Jessica on as she's the module maintainer. > > Oh, you misread, I swapped out Rusty for Jessica on the Cc. Ah, I read that as "Rusty and Jessica". > > So yes, function tracing now allows setting a filter to trace only the > > functions for a given module, and if that module is not yet loaded, it > > stores the filter until it is. > > Ah, thanks for the pointer. So if I wanted to convert a kernel command like: > > libnvdimm.dyndbg > > ...it would be something like: > > ftrace=function ftrace_filter=:mod:libnvdimm Hmm, that may not work, but if it doesn't, it would be trivial to add it. > > ...and then "cat /sys/kernel/tracing/trace" instead of "dmesg" to > retrieve... assuming only "got here" style debug was being attempted. > > > To do something similar for tracepoints, I think we still need to add it as > > a module parameter. > > The dev_dbg() filter language is attractive, it's too bad Not sure what you mean by that. What filter language. Tracepoints do have a pretty good filtering too. > trace_printk() has such a high runtime cost as combining dynamic-debug > and tracing would seem to be a panacea. trace_printk() has a high runtime cost? Besides that it's not allowed on production code (see nasty banner), it is made to be extremely fast. Although, it does do sprintf() work. Would adding automatic module parameters be an issue? That is, you can add in the insmod command line a parameter that will enable tracepoints. We could have a way to even see them from the modinfo. I think I had that working once, and it wasn't really that hard to do. -- Steve