Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3832286rdh; Tue, 28 Nov 2023 05:14:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/EDCTOyOJhecn9CVKUCP7CV4QfPIBjuEAG8+ym8W1f+PiFRrs3ElE83Wt+eVJJPaf/uou X-Received: by 2002:a17:90a:d152:b0:280:29df:747e with SMTP id t18-20020a17090ad15200b0028029df747emr25406015pjw.1.1701177292312; Tue, 28 Nov 2023 05:14:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701177292; cv=none; d=google.com; s=arc-20160816; b=sc2ZytR7Vsls9w0lQZ9/piEsj2/5xa+Cuo4WfF3UKabjjN8mfd5zyeZUQYicH+nal+ 7nXVyqICGQGQc7ABuibS/WFOi81g/OlKpBt08p6S18z5wa6YD0UBdxtdOnc+hfZNDj1L W/BoQM29bqeEhBv8orjosImL4SYWSpnzYrO+j9M8+jrItCWYbO2bh4Cz4lGy96T+4Q7t YbwbmqR2qPTaIeTKXpUxKGcO49pfUrxqxCBJpDk/GF9z21AIynUMQ2R/uy2jWzqGVDfu rVGcvwDy6Jq5gjQip8NMBDSbGbavF407K86hYySi8vI8ShbIZuW/B7QGqfNFTk+GGdfV rA/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D3lzwLwPre7wvnqsdFYx09a6rbeV9XRoBcce+xZPKf0=; fh=JE73C3I0GaI4ZjWUR69aTlIwRIYg9EOIFcBCDVvMZR8=; b=YUdidQ91Np5Q7zqcPJFtXoLcwwZMqwofpKndKXFRfIX5qc87UAeCHSpgrh0N7w4Bj+ S1xcoFacaUzjqsZhoLkCNz5vOTh9j/680xSUOtB4DOZDhN/+yg5WTdXoLPdacLknd+ah BjVlnTm29FyO+9IvnACTKvr88Epdx8lGdLqUnb1yXGr6RNyT+8MjLCQmtxiNgWKUgIM0 Er+C6plmm8DY2wMuC8pPDmMESvn9OF1HGJKywZh7heu/x/OtLAbR91ND7INTQRNYYKfs noiZ7CG0EiRzYp1OFsD1mTvy0u7I8DXby2Btq/g63IiTRoGLKLHTTfM8+ynE08W6VsQu g1xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RNTpJRNc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a8-20020a170902b58800b001c9c83947d1si11152576pls.645.2023.11.28.05.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:14:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=RNTpJRNc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A19368069D42; Tue, 28 Nov 2023 05:14:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344860AbjK1NOc (ORCPT + 99 others); Tue, 28 Nov 2023 08:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344975AbjK1NOb (ORCPT ); Tue, 28 Nov 2023 08:14:31 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B0DA10DC for ; Tue, 28 Nov 2023 05:14:37 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50bba1dd05fso886275e87.0 for ; Tue, 28 Nov 2023 05:14:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1701177276; x=1701782076; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=D3lzwLwPre7wvnqsdFYx09a6rbeV9XRoBcce+xZPKf0=; b=RNTpJRNcNnEb5YFU00RErkxk3Q938Q0YMiV1OCgISy7pscuhklxpap21xy+bca9FuX EufNZX45lM5ALVc3We2A//Qhxc3tdyo1A+oQdrpJnJb6dMFAX3h8y2RGSAdLkhlEFZm8 IZGENb7cXFoWZS/4ZIB6c6WQt6Uk5HsspDVuM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701177276; x=1701782076; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=D3lzwLwPre7wvnqsdFYx09a6rbeV9XRoBcce+xZPKf0=; b=blVl8FoJMwatdmNRUE8AibJ7expNfgFMWFVeZdTfiabuwc4SJyyWHx79PTdoiJVM54 +flNOl2m56YXgXWwpqKSTeXizDo4vpGBPLTvym8l4J60kF1VeJgHngHm4+VVoOWDTsbK 9Jrb1sQlNGEU0PGf1JYBUoQQNT4LIKVyq6aPM9Sy4s70zhggo8224BXGHe9Jnz4EIRSY ShyqtsXR8+bvsFprimE8B/CysbCqjA1DqieMydT9jEV5S00MhpLMN3s3k088X1e8RCxw 2xJ17oXxtIObnNkK5NnRDsGjY2cquGgktkRi1wp1dy32SWm8kA5ladMgSxLFtb9TjH0V Tjjg== X-Gm-Message-State: AOJu0Yw73xR1sD4mk8Au67OAZ7x+h5+lwRFVkrtrUaq4lGRpkut6Che4 7X0ZY8xtARPIijNvRsaPh4Kxdw== X-Received: by 2002:ac2:5619:0:b0:507:9f51:acee with SMTP id v25-20020ac25619000000b005079f51aceemr9291885lfd.22.1701177275725; Tue, 28 Nov 2023 05:14:35 -0800 (PST) Received: from google.com ([83.142.187.84]) by smtp.gmail.com with ESMTPSA id k9-20020ac24f09000000b0050ba6e480fdsm1352362lfr.248.2023.11.28.05.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:14:35 -0800 (PST) Date: Tue, 28 Nov 2023 14:14:29 +0100 From: Dmytro Maluka To: Steven Rostedt Cc: LKML , Linux Trace Kernel , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Sean Paul , Arun Easi , Daniel Wagner Subject: Re: [RFC][PATCH] tracing: Allow creating instances with specified system events Message-ID: References: <20231127174108.3c331c9c@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127174108.3c331c9c@gandalf.local.home> X-Spam-Status: No, score=0.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 28 Nov 2023 05:14:49 -0800 (PST) On Mon, Nov 27, 2023 at 05:41:08PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > A trace instance may only need to enable specific events. As the eventfs > directory of an instance currently creates all events which adds overhead, > allow internal instances to be created with just the events in systems > that they care about. This currently only deals with systems and not > individual events, but this should bring down the overhead of creating > instances for specific use cases quite bit. > > The qla2xxx instance could just enable the systems it cares about, but that > should be a separate patch. > > Note that kprobes and synthetic events created after the creation of these > instances, will be added to these instances, but those that are created > before the creation of the instance will not be included. This limitation will cause (unrelated) events created by modules that are insmoded after creating the instance to be also added to the instance. Why not filter those as well? Besides that, the change looks nice to me. > Note, this may also be useful for creating instances in the eventfs, but > I'm not sure how to do this there. I could add a deliminator: > > mkdir /sys/kernel/tracing/instances/foo::sched,timer > > But if a tool already uses "::" as a deliminator, then this will break it. > I could just have it work if all the events after the deliminator exist. > > Thoughts? > > Signed-off-by: Steven Rostedt (Google) > --- > drivers/scsi/qla2xxx/qla_os.c | 2 +- > include/linux/trace.h | 4 ++-- > kernel/trace/trace.c | 22 ++++++++++++-------- > kernel/trace/trace.h | 3 ++- > kernel/trace/trace_boot.c | 2 +- > kernel/trace/trace_events.c | 31 ++++++++++++++++++++++++++--- > samples/ftrace/sample-trace-array.c | 2 +- > 7 files changed, 49 insertions(+), 17 deletions(-)