Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3419527pxb; Tue, 20 Apr 2021 07:58:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJys2wFxdzjkFHZqwRxz5pbk4El7rniVUvLJlwk6i6mP1t70wku5UH7FFCJAMhYQQK+paRdj X-Received: by 2002:a17:907:77d9:: with SMTP id kz25mr28227118ejc.153.1618930716428; Tue, 20 Apr 2021 07:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618930716; cv=none; d=google.com; s=arc-20160816; b=ZNIsnTw624YnIEbcEZ7EmODVcZOcEjM1l5ZyobIr4jcUNAj2dJjBLwMqT4woEt0VS4 UjGf8+AEugUg8ASN3Rd5agAn9M/fShvIaXdm70lGbm8J90NizzWBTx4R/kzbrLPD9DiD atllFY7vVDu4qBu5eKG+gMu2QlNjfjFTl4qquqatwKdKn2aADQU+pLP9JDkxV+1uwXR1 Mx0wVVHcdXcdYKiOP5pWkrD57zqGo4t198PIFp7fqaUgzmQY0Z/QI77tBg7k7OZEKaLO Jj/j+xR6CvfiRGcdVCCuopu1QngKJ0eFkcP311iIfpGeM12s9foO/CGLeYge1RCMphtk RLbA== 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=0vVgp/+ZwDfT7FH/BCk2M2coo+fpQMOPz5f8VWUyd+A=; b=n5EBib7153F00MxGAf59QXsKb8rqjd/K7WyEs5lVFFFnoTqxGnQuMYW+tCZiEjtWaC i3bG03lKjcv7UPqTGLi+SjJe/lNHtfYfxqYae9MM5EOwrg0LP7fbw3bwtPdIdtwZFnDW z9s11zJRy5AO9q8J6AM1DyNyFTOVL+keHMpSSHsTxRVpo0o5k6VS6pGgGm2YprAH/9IQ 1WiyMtHBe4TIP52wu4FfnnkjRiVtKWeHNgalk7goerUisBmUcIBABBLqudWNTs13VwF7 XGLJJ5ne64TkHduUyztRLV3NTz97gkDPLpvCiE8dKa3yITwh2Esc3i6i/1wlYk7b5xEE J2FQ== 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 z4si14910859eji.172.2021.04.20.07.58.12; Tue, 20 Apr 2021 07:58:36 -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 S232764AbhDTOzq (ORCPT + 99 others); Tue, 20 Apr 2021 10:55:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:56788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232504AbhDTOzq (ORCPT ); Tue, 20 Apr 2021 10:55:46 -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 895B0613CA; Tue, 20 Apr 2021 14:55:13 +0000 (UTC) Date: Tue, 20 Apr 2021 10:55:11 -0400 From: Steven Rostedt To: Mathieu Desnoyers Cc: Dan Williams , fweisbec , Jessica Yu , linux-kernel , Ingo Molnar , chris@chris-wilson.co.uk, yuanhan liu , "Grumbach, Emmanuel" Subject: Re: [PATCH][RFC] tracing: Enable tracepoints via module parameters Message-ID: <20210420105511.65490e8d@gandalf.local.home> In-Reply-To: <1154727029.2004.1618925367044.JavaMail.zimbra@efficios.com> References: <1299622684.20306.77.camel@gandalf.stny.rr.com> <20130813111442.632f3421@gandalf.local.home> <87siybk8yl.fsf@rustcorp.com.au> <20130814233228.778f25d0@gandalf.local.home> <77a6e40b57df092d1bd8967305906a210f286111.camel@intel.com> <20210419181111.5eb582e8@gandalf.local.home> <20210420085532.4062b15e@gandalf.local.home> <1154727029.2004.1618925367044.JavaMail.zimbra@efficios.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 On Tue, 20 Apr 2021 09:29:27 -0400 (EDT) Mathieu Desnoyers wrote: > ----- On Apr 20, 2021, at 8:55 AM, rostedt rostedt@goodmis.org wrote: > [...] > > > > 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. > > There is one thing we should consider here in terms of namespacing: those module > command line parameters should be specific to each tracer (e.g. ftrace, perf, ebpf). > > LTTng for instance already tackles early module load tracing in a different > way: users can enable instrumentation of yet-to-be loaded kernel modules. So > it would not make sense in that scheme to have module load parameters. > > It's a different trade-off in terms of error reporting though: for instance, > LTTng won't report an error if a user does a typo when entering an event name. > > So I think those command line parameters should be tracer-specific, do you agree ? No, I do not agree. I would like to make it consistent with the kernel command line. As you can put in: "trace_event=sched_switch" and the sched_switch trace point will be enable (for the tracefs directory) on boot up. The same should be for modules as well. It shouldn't affect LTTng, as you already have a way to enable them as they get loaded. -- Steve