From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30377C433E2 for ; Mon, 14 Sep 2020 11:57:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D29C72224C for ; Mon, 14 Sep 2020 11:56:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="l4pvuGU7"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mFz+j23/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D29C72224C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VFNkYr7djlIfLjD3afPvLmm6HM4yywOLJNIxAQUas40=; b=l4pvuGU7wBjvOIZGRdqHYFMEBO sSlDlIqW4XaCrZi/4KNyMt1szAVlDhn+agmYgCyRcqOdBS8AatpkQUC4DfEbbqJuQbkZ/g7X0AATx iMsTUtsIXWDSTaulJV3SIkp/Krn4cU1TYMd6At/5H5JfQX4IJVIUJnoQKUeAo+HH78nJnL95q1pcf lNQaBQPAm/HrH3YNuP36Cos+KxYHiWLzdPK+k30TtC/BmozlyFE7gKh1ufxmOhIxH/IX5OGqKzVPQ exCfCPtmjevuFzsL2t6CN/KHDWPHx79QLmcHCiJ+TLfjDYw9cHjQosDwuQlTZ/D9vdIZkG1T/yZt0 v/HP4Cvg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHn5D-00087B-4u; Mon, 14 Sep 2020 11:55:43 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHn57-00084c-My for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 11:55:39 +0000 Received: by mail-pj1-x1043.google.com with SMTP id u3so5240794pjr.3 for ; Mon, 14 Sep 2020 04:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aOBJ9MjoirS+L5o0/6ixv/rHOD5sDCECP2wua5enYLg=; b=mFz+j23/DsHUjdmzVxlu9gnTp4M+x6SJ0Zt+v+cAtC5fobW/aJnu0UsSswHbY1B+1n uQzsa/PL/7EhePWKjquPfTPYyhVbxqKxTxnd0KhIPA0f+p+1uvMHQ1WgKjBBUoo5QPkq wjw9UvnrHMoySGqQ8T1WuVS85EPZCUuJJ8Ra3UZRRXEbL9rYZdTKzSGwr/HLlFlV3U61 6snzU8WsY0UReB6koWGVldvJEG38Mm/rdlkKPMKjFaiz2UOSCzR/xMAQbL9JJQzoVV4H GYCD9gRBZDXzOKyqDu/bMtc6rMWpve3JBQmBGfr0A0m/5M0JLg9pRvh/TZ5zRproU74A qVrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aOBJ9MjoirS+L5o0/6ixv/rHOD5sDCECP2wua5enYLg=; b=ly3guZ02CbNgkLsZlotkaafD9xXtJNEH4eHbbXdQL5E/2xAvoDi2vRBAQZ04p1mjls mGQD+UfhZ2Mg3zAkNR3QeBrLrcDRY/dMIeHTvhConKGwKE5q76AFW66imIJY9YvYjyQn foN88wDwBlJTjq9vieCiVBCAv5a/YTdwYBB+g6w4AvKYB9RCd0hxet3nBiuTYT922YOs DXlFijt1mztdU284v8L5OskvUPd5MoyKBQSulfquOSZeqvhQ3C50tFjiYvL062QO6qU8 KIaPnaxHmApbGyHo4kCFLEsF6xD3CYY8sa2GTnlo3VXFN2zQLfNjv1Dx7YdrwR+9mHON IsvQ== X-Gm-Message-State: AOAM530LkwnWmC8GC9yyMx3zLJCTEVlXRwNUL/18rDKB78SE+L6qqwRI /uQHhYUcvirugQivn3cKQnhsOg== X-Google-Smtp-Source: ABdhPJzhnIQHCZNS8UAApJD38ZxCo2Rc99Md+3WX4LEEgKKEZwud4BYFnFfuxmmdE4J+gt4Uo6j9Bw== X-Received: by 2002:a17:90a:d3cd:: with SMTP id d13mr14452003pjw.70.1600084534577; Mon, 14 Sep 2020 04:55:34 -0700 (PDT) Received: from localhost ([2600:3c01::f03c:91ff:fe8a:bb03]) by smtp.gmail.com with ESMTPSA id i15sm3628675pfk.145.2020.09.14.04.55.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Sep 2020 04:55:34 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Will Deacon , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Mathieu Poirier , Adrian Hunter , Kemeng Shi , Ian Rogers , Remi Bernon , Nick Gasson , Stephane Eranian , Andi Kleen , Steve MacLean , "Gustavo A. R. Silva" , Zou Wei , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 5/6] perf tests tsc: Make tsc testing as a common testing Date: Mon, 14 Sep 2020 19:53:10 +0800 Message-Id: <20200914115311.2201-6-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200914115311.2201-1-leo.yan@linaro.org> References: <20200914115311.2201-1-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_075537_999768_0BB57BE3 X-CRM114-Status: GOOD ( 19.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Yan MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org x86 arch provides the testing for conversion between tsc and perf time, the testing is located in x86 arch folder. Move this testing out from x86 arch folder and place it into the common testing folder, so allows to execute tsc testing on other architectures (e.g. Arm64). Signed-off-by: Leo Yan --- tools/perf/arch/x86/include/arch-tests.h | 1 - tools/perf/arch/x86/tests/Build | 1 - tools/perf/arch/x86/tests/arch-tests.c | 4 ---- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 ++++ tools/perf/{arch/x86 => }/tests/perf-time-to-tsc.c | 0 tools/perf/tests/tests.h | 1 + 7 files changed, 6 insertions(+), 6 deletions(-) rename tools/perf/{arch/x86 => }/tests/perf-time-to-tsc.c (100%) diff --git a/tools/perf/arch/x86/include/arch-tests.h b/tools/perf/arch/x86/include/arch-tests.h index c41c5affe4be..6a54b94f1c25 100644 --- a/tools/perf/arch/x86/include/arch-tests.h +++ b/tools/perf/arch/x86/include/arch-tests.h @@ -7,7 +7,6 @@ struct test; /* Tests */ int test__rdpmc(struct test *test __maybe_unused, int subtest); -int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest); int test__insn_x86(struct test *test __maybe_unused, int subtest); int test__intel_pt_pkt_decoder(struct test *test, int subtest); int test__bp_modify(struct test *test, int subtest); diff --git a/tools/perf/arch/x86/tests/Build b/tools/perf/arch/x86/tests/Build index 2997c506550c..36d4f248b51d 100644 --- a/tools/perf/arch/x86/tests/Build +++ b/tools/perf/arch/x86/tests/Build @@ -3,6 +3,5 @@ perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o perf-y += arch-tests.o perf-y += rdpmc.o -perf-y += perf-time-to-tsc.o perf-$(CONFIG_AUXTRACE) += insn-x86.o intel-pt-pkt-decoder-test.o perf-$(CONFIG_X86_64) += bp-modify.o diff --git a/tools/perf/arch/x86/tests/arch-tests.c b/tools/perf/arch/x86/tests/arch-tests.c index 6763135aec17..bc25d727b4e9 100644 --- a/tools/perf/arch/x86/tests/arch-tests.c +++ b/tools/perf/arch/x86/tests/arch-tests.c @@ -8,10 +8,6 @@ struct test arch_tests[] = { .desc = "x86 rdpmc", .func = test__rdpmc, }, - { - .desc = "Convert perf time to TSC", - .func = test__perf_time_to_tsc, - }, #ifdef HAVE_DWARF_UNWIND_SUPPORT { .desc = "DWARF unwind", diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build index 69bea7996f18..8ddf81447344 100644 --- a/tools/perf/tests/Build +++ b/tools/perf/tests/Build @@ -61,6 +61,7 @@ perf-y += demangle-java-test.o perf-y += pfm.o perf-y += parse-metric.o perf-y += pe-file-parsing.o +perf-y += perf-time-to-tsc.o $(OUTPUT)tests/llvm-src-base.c: tests/bpf-script-example.c tests/Build $(call rule_mkdir) diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index 651b8ea3354a..0abb5ce88962 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c @@ -345,6 +345,10 @@ static struct test generic_tests[] = { .desc = "PE file support", .func = test__pe_file_parsing, }, + { + .desc = "Convert perf time to TSC", + .func = test__perf_time_to_tsc, + }, { .func = NULL, }, diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/tests/perf-time-to-tsc.c similarity index 100% rename from tools/perf/arch/x86/tests/perf-time-to-tsc.c rename to tools/perf/tests/perf-time-to-tsc.c diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h index ef0f33c6ba23..60a1c317b8db 100644 --- a/tools/perf/tests/tests.h +++ b/tools/perf/tests/tests.h @@ -123,6 +123,7 @@ const char *test__pfm_subtest_get_desc(int subtest); int test__pfm_subtest_get_nr(void); int test__parse_metric(struct test *test, int subtest); int test__pe_file_parsing(struct test *test, int subtest); +int test__perf_time_to_tsc(struct test *test, int subtest); bool test__bp_signal_is_supported(void); bool test__bp_account_is_supported(void); -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel