Message ID | 20230523093228.48149-5-yangyicong@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2011698vqo; Tue, 23 May 2023 02:42:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4OZoQHxv8SC8ZFIRTevsPq+dTGronA9bKSTlMBdtT6anQelCOZtfgc65S2CrbY0QYYGHZb X-Received: by 2002:a05:6a21:6d95:b0:10b:ce6e:656b with SMTP id wl21-20020a056a216d9500b0010bce6e656bmr6187332pzb.46.1684834951820; Tue, 23 May 2023 02:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684834951; cv=none; d=google.com; s=arc-20160816; b=TwYHzZXToT7MZJgqgS1X8/I07SAqsiR9/A3QKIdjRQ1rTLgpc6caibwH08P6PaNNSW 5fn8tmy7wLw8L8e5R1lQe8MRFqof11VVJaMxLIal/4HTV2AFL/TLjTNd5FF8yzzOI1gj MriWsHWRpKPA51pXWmslGrzKwoD/q0OSEwlUIIUq4tV898zo2gNZreKX9LLlHbtgDy3Y DsTOKxdouRK51gce8nvg0VMIxNm19jO3mhJBnWatj6t3Jk0LJ22quMAKMXYExvizeFOg N7Q+vzUEhom1YB+7YUFc979rZgdUXSAQoE2+8Ll8dV0rMF+uMg88CPjIGEgPGOF3ZMC3 F+Ag== 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=Ci6ayDUlKk3t86WS1ajIavoZxJG316mLusJdB7N3CaM=; b=R3aqdD3HhPs4z6MkAVtUKxRDe0pzQyfTeZik2zb5JyOV3MH7xZZ0Uf+D4DhwfV75Sg HEFdtr2I+VTi19oNnmj10cFJUo8b5a10XNqaOeMXsIbQzQsk3OHtlzOANWCQ55F+LhVy 9+RnIbJ/zIJn7GTbsKPv8+SjA9hHQx14PmWpgUqdPkOo/PtlRuUdWO57Jm3I34LomBFd Y8Qff6xr8S3YIvi2kiHXdeEF3daslWG+uGNDZuOQrrspD0ifXDdTNFjI52IryX0X1DWY 6QDq8zm9x6pnmLhQwMBf9pLOrWJHbe2+9NwpUVj6gbPtQFtVtcC6STRL20+2aFkUOKRY iEUQ== 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 e184-20020a6369c1000000b0053416d0b54dsi470755pgc.518.2023.05.23.02.42.19; Tue, 23 May 2023 02:42:31 -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 S236273AbjEWJeI (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Tue, 23 May 2023 05:34:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232089AbjEWJd6 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 23 May 2023 05:33:58 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB80FE6; Tue, 23 May 2023 02:33:48 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QQTZg2f46zLpv6; Tue, 23 May 2023 17:30:51 +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.23; Tue, 23 May 2023 17:33:47 +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 v3 4/4] hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU Date: Tue, 23 May 2023 17:32:28 +0800 Message-ID: <20230523093228.48149-5-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230523093228.48149-1-yangyicong@huawei.com> References: <20230523093228.48149-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: dggems703-chm.china.huawei.com (10.3.19.180) 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, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1766677494376229079?= X-GMAIL-MSGID: =?utf-8?q?1766677494376229079?= |
Series |
Improve PTT filter interface
|
|
Commit Message
Yicong Yang
May 23, 2023, 9:32 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 Tue, 23 May 2023 17:32:28 +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> Interesting - I didn't know about this flag. 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 65f4288a1915..b9917db849bf 100644 > --- a/drivers/hwtracing/ptt/hisi_ptt.c > +++ b/drivers/hwtracing/ptt/hisi_ptt.c > @@ -1210,7 +1210,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 65f4288a1915..b9917db849bf 100644 --- a/drivers/hwtracing/ptt/hisi_ptt.c +++ b/drivers/hwtracing/ptt/hisi_ptt.c @@ -1210,7 +1210,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,