Message ID | 20230315094316.26772-5-yangyicong@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2237079wrd; Wed, 15 Mar 2023 03:04:14 -0700 (PDT) X-Google-Smtp-Source: AK7set8GxwNUcwKTKmGn2E6ApXpefUvZPVesuvWByHalPNd17rvfZ8cUaorqCUaqI4fAHSKCM72H X-Received: by 2002:a17:902:e2ca:b0:19a:f9b5:2f2f with SMTP id l10-20020a170902e2ca00b0019af9b52f2fmr1656218plc.55.1678874653762; Wed, 15 Mar 2023 03:04:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678874653; cv=none; d=google.com; s=arc-20160816; b=vL8kQUudNfFUl6XOYVYHKVGOcXtyMowNq3dvJHUACZy/yihuU7xBIKoCyhDKzJRenK JdnvYuuR01ucSo+Yx+qPJSaCsoNLS5TSSbrrfyDXz/Bgwp2n9BZ8nFKoaRgYfZufw5kI 6pqd6QinOUP4TSxA9fwQQowQYb7noPiaykFBE0w9XXWXQMLH37zyoQ0X+1IWBt29zjsd 0e930N+e7kMfbBkazlxpscoaYn8SmF6HoDKZg6B012m+K2sDBZTouNRMWLtGB4b2VCYH XUslmmFlSWAPY1GUvnVabpWIWAQROstjcpjERycdQ4de1DVwxf5ATVg67+Pzeobnb1cj +LSg== 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:date:subject:cc:to:from; bh=PEQm79JaowkLPGNwe2frAIcmii9zPlZFPPFNdEiEQTY=; b=mib1xHhaeX+XIdq5sU3rL4woKbErl8D6xe66HQu/YNvp4KP8n6uMe1RNhfFh2SSoi4 vpihxAnrE+N6nc8Q4aymbvlApLIPlMfklxeRlCNeav0OWzUuxajgT+gK9g41ag8NtpYr d8ZbwjqoKP1+ZeMY5YlGntfPG0oqd//AqwtLaHRATve8PdsYax2a9ohQ5Gk7FpoIYMDA g7LEbHnFVe0Z9A41ImV28guFUtnvrhFSOGPqPBLBJsQ3w4/TRkpFMZ834Y9ETxJanl6q m2nhfVPN84CW/xgfq8V/xEs4GGKCIrlQ9LCe3RgXY7iQSxThkh43Zi8V+mMRb+It839P u+UQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a170903240f00b0019adf805babsi5046985plo.500.2023.03.15.03.03.58; Wed, 15 Mar 2023 03:04:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231340AbjCOJoQ (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Wed, 15 Mar 2023 05:44:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232096AbjCOJn7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 15 Mar 2023 05:43:59 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C469062D9B; Wed, 15 Mar 2023 02:43:47 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Pc54t3n2VzHwyp; Wed, 15 Mar 2023 17:41:34 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Wed, 15 Mar 2023 17:43:45 +0800 From: Yicong Yang <yangyicong@huawei.com> To: <mathieu.poirier@linaro.org>, <suzuki.poulose@arm.com>, <jonathan.cameron@huawei.com>, <corbet@lwn.net>, <linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org> CC: <alexander.shishkin@linux.intel.com>, <helgaas@kernel.org>, <linux-pci@vger.kernel.org>, <prime.zeng@huawei.com>, <linuxarm@huawei.com> Subject: [PATCH 4/4] hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU Date: Wed, 15 Mar 2023 17:43:16 +0800 Message-ID: <20230315094316.26772-5-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230315094316.26772-1-yangyicong@huawei.com> References: <20230315094316.26772-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760427669379426138?= X-GMAIL-MSGID: =?utf-8?q?1760427669379426138?= |
Series |
Improve PTT filter interface and some fixes
|
|
Commit Message
Yicong Yang
March 15, 2023, 9:43 a.m. UTC
From: Yicong Yang <yangyicong@hisilicon.com> The PTT trace collects PCIe TLP headers from the PCIe link and don't have the ability to exclude certain context. It doesn't support itrace as well. So only advertise PERF_PMU_CAP_NO_EXCLUDE. This will greatly save the storage of final data. Tested tracing idle link for ~15s, without this patch we'll collect ~28.682MB data for context related information and with this patch it reduced to ~0.226MB. Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> --- drivers/hwtracing/ptt/hisi_ptt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Wed, 15 Mar 2023 17:43:16 +0800 Yicong Yang <yangyicong@huawei.com> wrote: > From: Yicong Yang <yangyicong@hisilicon.com> > > The PTT trace collects PCIe TLP headers from the PCIe link and don't > have the ability to exclude certain context. It doesn't support itrace > as well. So only advertise PERF_PMU_CAP_NO_EXCLUDE. This will greatly > save the storage of final data. Tested tracing idle link for ~15s, > without this patch we'll collect ~28.682MB data for context related > information and with this patch it reduced to ~0.226MB. > > Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Seems reasonable. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/hwtracing/ptt/hisi_ptt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c > index a5cd87edb813..8c1cce32b83f 100644 > --- a/drivers/hwtracing/ptt/hisi_ptt.c > +++ b/drivers/hwtracing/ptt/hisi_ptt.c > @@ -1216,7 +1216,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt) > > hisi_ptt->hisi_ptt_pmu = (struct pmu) { > .module = THIS_MODULE, > - .capabilities = PERF_PMU_CAP_EXCLUSIVE | PERF_PMU_CAP_ITRACE, > + .capabilities = PERF_PMU_CAP_NO_EXCLUDE, > .task_ctx_nr = perf_sw_context, > .attr_groups = hisi_ptt_pmu_groups, > .event_init = hisi_ptt_pmu_event_init,
diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c index a5cd87edb813..8c1cce32b83f 100644 --- a/drivers/hwtracing/ptt/hisi_ptt.c +++ b/drivers/hwtracing/ptt/hisi_ptt.c @@ -1216,7 +1216,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt) hisi_ptt->hisi_ptt_pmu = (struct pmu) { .module = THIS_MODULE, - .capabilities = PERF_PMU_CAP_EXCLUSIVE | PERF_PMU_CAP_ITRACE, + .capabilities = PERF_PMU_CAP_NO_EXCLUDE, .task_ctx_nr = perf_sw_context, .attr_groups = hisi_ptt_pmu_groups, .event_init = hisi_ptt_pmu_event_init,