Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp3214117rwp; Fri, 14 Jul 2023 20:47:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqmjwG0dTqYwUquPc/D34ov+aQS7Ks1FzDfaXmNNvKheRN6OJ3mwdL7/NOvUsjGFA+xsrT X-Received: by 2002:a17:906:2205:b0:993:eed1:904 with SMTP id s5-20020a170906220500b00993eed10904mr577223ejs.3.1689392837385; Fri, 14 Jul 2023 20:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689392837; cv=none; d=google.com; s=arc-20160816; b=UHYsXVY/9yby+DOtufpimYt0jl9IWfyI82oFg9KYwV1w0fJGoDkxB1AabZXqDipugd HGVRH0wEbLfhldWA9t7CjyAEM4BBUHcQmKG4eis5b30YIk+1SU6s/t0/PG089zckgvVe Hb28DpjnDjoruzKvqMUDFfv4yxngFyYz5g0wkFiB4pm3KwhGBgMc8bfU6CJ5iJDQue6i wkHMCQAH/esbDt6GF6tt866gtIGdLEJ0krFzlmfoX2JEqXadMMczBJAtR4kqLq+mUWf+ QmSdEVmEceuABECgXPX9Md6fnjgV9fIlVV2qep3B23Wss7kKtYlTjuDQ8ut+/hg7L9D6 SRXA== 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=KYyF7GMwdJnmcSDi3ym4N6moo/bcg8n7UAWJpc/Ey+o=; fh=Ib1wi7jRbo+eNDLEErvWCJx+cnUm87PkGFthhdFf08Y=; b=AZBczwfI0v/rFlj3s1rV+/KTPDcqYhJf5GSoXG/PPQLHoTkfxCIx6MwnF1BOkT4Sck Nb29BprbCcMdC9qTqhwoKaH4uFtC3MupreFuNkCc6dx0aUZ+C0dVKoDgvVua8E7+azsK 43hWUIUqWMwdkjVUa+JMD3y0zfenTYLaY8zXHTGVBKOgAEGdaDg1Bu2VHGTPqEkcCTY8 U9jEeTJ0iHQnG/PipOizClxnvUPL13Bq+7IyDZU8227IZyMTgTZLTRUU24NGwRdSZ3el gAxV1fOdq6UODX92elD+xNeWYU1JdYqsts1FzR5YFZx6yccBEGxluYSZbQFOMlNg6987 HQkg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw3-20020a170906fca300b00992c1154498si10650166ejb.967.2023.07.14.20.46.53; Fri, 14 Jul 2023 20:47:17 -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 S230056AbjGODbp (ORCPT + 99 others); Fri, 14 Jul 2023 23:31:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbjGODbh (ORCPT ); Fri, 14 Jul 2023 23:31:37 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EB753A97; Fri, 14 Jul 2023 20:31:36 -0700 (PDT) Received: from kwepemm600003.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4R2v1q5TclzNm9v; Sat, 15 Jul 2023 11:28:15 +0800 (CST) Received: from localhost.localdomain (10.67.174.95) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sat, 15 Jul 2023 11:31:33 +0800 From: Yang Jihong To: , , , , , , , , , , , , , , , CC: Subject: [PATCH v2 5/7] perf evlist: Skip dummy event sample_type check for evlist_config Date: Sat, 15 Jul 2023 03:29:13 +0000 Message-ID: <20230715032915.97146-6-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT In-Reply-To: <20230715032915.97146-1-yangjihong1@huawei.com> References: <20230715032915.97146-1-yangjihong1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.95] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, 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: X-Mailing-List: linux-kernel@vger.kernel.org The dummp event does not contain sampls data. Therefore, sample_type does not need to be checked. Currently, the sample id format of the actual sampling event may be changed after the dummy event is added. Signed-off-by: Yang Jihong --- tools/perf/util/record.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/util/record.c b/tools/perf/util/record.c index 9eb5c6a08999..0240be3b340f 100644 --- a/tools/perf/util/record.c +++ b/tools/perf/util/record.c @@ -128,6 +128,13 @@ void evlist__config(struct evlist *evlist, struct record_opts *opts, struct call evlist__for_each_entry(evlist, evsel) { if (evsel->core.attr.sample_type == first->core.attr.sample_type) continue; + + /* + * Skip the sample_type check for the dummy event + * because it does not have any samples anyway. + */ + if (evsel__is_dummy_event(evsel)) + continue; use_sample_identifier = perf_can_sample_identifier(); break; } -- 2.30.GIT