From patchwork Fri Mar 31 07:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 77561 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp373692vqo; Fri, 31 Mar 2023 00:11:27 -0700 (PDT) X-Google-Smtp-Source: AKy350Z534CCBP2TE/FiGccdoASqN5hNg4ufVNFJpDIMiwL77tYfuL6kq5Je6EsvHhruvlL5QKQP X-Received: by 2002:a17:902:ecca:b0:1a1:defc:30d8 with SMTP id a10-20020a170902ecca00b001a1defc30d8mr29273508plh.32.1680246687481; Fri, 31 Mar 2023 00:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680246687; cv=none; d=google.com; s=arc-20160816; b=GQpG494G4G9V0gNfwH0BWAc8zXv4STo4eA9+QK2Z4v4f3I/yVpIluPWzfccpvpJ14Y qeM3sq4JfTciYMiebNU1IxF2fDs471t978iQunvrfBJb0hdrEmL5aBcS1pEdmvDArCc5 qRZhJiJ9OHso0eM37o3LAtdkdBbZQ1lfWTRxHSz+egU2OGZpZpWcBgUK0tjHugZLboHL I8oQLmK+ttQv93Fiji6tT1U5gBnO65L9s2eEIfKXEY/kKXzM7k4czhohNcJNC8iZ+zyy uHIMNaSeDu5jvYG8U8HCuNvrRKQeNO++U/akI4OnfEgWPLClpLl9DbyTpd1sB4eTIzON ae1g== 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=0chF1GNLQO2PrhK+OUVYCr6xLlnT5KslZggHwPrQH1w=; b=IH5fVId04sU8Ya5AB6SON21NtYE/JL7ZWzfY1yibNIjQMbWwnurcchzN+R9qgp2VKK sT4/P6dXyl2jKI8Nx5AKX+FYYuaZOqeYpJoevrprmL9Oh5KvKCBw6FbAmC06F6BTJon3 31f5bdR4vrilZZDqxyrmEV2qBTGj2Dss+nChCaTMN7z6MMl0Bi1EbLCQaBzqMgNQPKpJ NTa6hC1/P2Fnb20CW3cXwhfoD5idFAIXkrqUxfAhhW2gDFWKTOsrJKvGKy/MJTOGa+Dd rI8Pmu1755uLyAPaCdwJ+Qz9ucPDLMv11/MiFoEAlBJWet6nD8eGM4taPj7L1SqiOQYq v2+Q== 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 m1-20020a655301000000b0050fb7c5a656si1686530pgq.190.2023.03.31.00.11.14; Fri, 31 Mar 2023 00:11:27 -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 S230398AbjCaHEO (ORCPT + 99 others); Fri, 31 Mar 2023 03:04:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230383AbjCaHEI (ORCPT ); Fri, 31 Mar 2023 03:04:08 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D3081A47F; Fri, 31 Mar 2023 00:03:53 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Pnrmk5TmszKwCk; Fri, 31 Mar 2023 15:01:26 +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; Fri, 31 Mar 2023 15:03:51 +0800 From: Yicong Yang To: , , , , , CC: , , , , Subject: [PATCH v2 4/4] hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU Date: Fri, 31 Mar 2023 15:03:10 +0800 Message-ID: <20230331070310.5465-5-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230331070310.5465-1-yangyicong@huawei.com> References: <20230331070310.5465-1-yangyicong@huawei.com> MIME-Version: 1.0 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=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761866350428447405?= X-GMAIL-MSGID: =?utf-8?q?1761866350428447405?= From: Yicong Yang 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 --- 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 71bc0c784c51..b0f070ad88a1 100644 --- a/drivers/hwtracing/ptt/hisi_ptt.c +++ b/drivers/hwtracing/ptt/hisi_ptt.c @@ -1205,7 +1205,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,