Received: by 2002:ac0:cd04:0:0:0:0:0 with SMTP id w4csp336535imn; Fri, 1 Jul 2022 16:38:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDbLhgPPv8YYahvPrAETl9J1d+62djcCoo3v7G7smLh+FUyzFnCeW68qWssliGOK+DVLvi X-Received: by 2002:a63:2bc3:0:b0:411:66bf:9ce3 with SMTP id r186-20020a632bc3000000b0041166bf9ce3mr13855145pgr.165.1656718692061; Fri, 01 Jul 2022 16:38:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656718692; cv=none; d=google.com; s=arc-20160816; b=XNZJd/tIknkNu04+jy9rlggBrxaqm1Hm7E10Rl3++U6J3oikPxMypasugmrPGxCPZp ea6Np2tSMk+kS9gmVLZKGMApiwpsPdfXTfWbr2LKl61pmIjNZKE+PW86iCMRkqvel+en 2x5RC0eqx1Z9I7SdRiMg8RhDhIQt6Hc3YJ2XzA1P33DASEXJuF2cg2FH2pyiTnqhton7 OPfS34hUMJAPHTmwL1VdNUrsybudyxVoo8fuZjJSO8Cj9DAhudrnDkk6LgG08/OaaX/E MlELgE7uE/vveTYb5SMDXiEw7eO+95rCxsEHzcDynCejlqqHHU6KEJqp3WtTqILjqXCI Jb+g== 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 :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=6IRIEmaeAGecPLER6MT79dRjRZdauydgJASqqrU4/Kg=; b=Ep9dh96H+MUg4I1Xo3OZdRPvHvpfv961QKl2E7WtmyOPrENWX2fq+ht7tYegCMfULm 1jFcspJglSztWNMDSh00r4ADoo3pcWP+AfPUrHc6q60p/itWUYykb+vmNTxuO6VIVZKr oa+e70DbPb59U855SKX3r9nd1Hz+hgF1qXIgOSq+KNGZDQ9XtDpJGeNmgoshMtKCfYcO 6NBlGV621oTof1vuNF4Wq7Qdj1FObdtbB2+d9NjaMqTuNw7qilCFYniDnHBrO8/lUOR6 E+F+LTlE0xrTVoirzie0l9OvEeq1h//DGDm4wxSsknlNk2N7gnNLF/DbqbFA7Op+f/un h4AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SdbwE9SB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b24-20020a6567d8000000b003fc19a5f892si4525466pgs.55.2022.07.01.16.37.59; Fri, 01 Jul 2022 16:38:12 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SdbwE9SB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232147AbiGAXJg (ORCPT + 99 others); Fri, 1 Jul 2022 19:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbiGAXJf (ORCPT ); Fri, 1 Jul 2022 19:09:35 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C843071BF1; Fri, 1 Jul 2022 16:09:34 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id l2so3994717pjf.1; Fri, 01 Jul 2022 16:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6IRIEmaeAGecPLER6MT79dRjRZdauydgJASqqrU4/Kg=; b=SdbwE9SB09/WGXPxj0WG5eSh+z5Y9MRmCDAT55nPg50HMKd2kqr5U77bO3B+FQPjDT 0y2fPFQz950SK8ds5T7IJKuBeaFXDSx3NecPebmNi1f6c5Txg39/RvUlI1yFaijgy3Cy HITwlFjfux+07H1F/EahDqMXKTMECveugjAh56h+Gu4L4gFxA7baaVgMn936WRv3+v2i e3aTV7QHMoeMfASi2RGDdqZKfbbK5y3nu+5cz7KTbq73hut60piK8LltrrLxVVVgrgYN ZNOG7DFGzVSPCwc4AJ6WSm9nJMxC1d+fT4VUtle0YG22jyDG2oHbef4VbqfZLViZIARF 0wuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=6IRIEmaeAGecPLER6MT79dRjRZdauydgJASqqrU4/Kg=; b=ljliAGrAdmbHtqDe8abQsorlnNTNnBraBA+Ftaf6iv3WF8UHe0+S6ZPqXJeA96lOzp PSKz/gZs60ffyoSqHIKvYB3cj6IPWkhXoTMVvRO84xfCjbF3D6RNseMfszjj44+0O4LJ m6a/GFoUddn++OrRlQqxa8vCDRVn2zak5esinaG7tQKNfxrNVm0kyJjXvWrtpsSVjN9y hUnUCvWrPsRJzOpbopyGJCJlWflOZiDLt2mO3U7rRcchKuNC9SUj1AE9qK8Mu3eChmI7 +bRy7KVthzooXpxwhAwUUR2fRzs+5ynWm7NGfc2USFYKY1421VoBK1VFd1gaTBOsMUTK k7Sw== X-Gm-Message-State: AJIora9Kfh8ERGe9tr3uhxjbh70nMildHZhJUgcrTUAGZrXiDPEFixBH woETdcPBOMPrhimTb0Z8oTU3CeyFrAE= X-Received: by 2002:a17:902:f68f:b0:16a:7a95:4689 with SMTP id l15-20020a170902f68f00b0016a7a954689mr22440565plg.112.1656716974276; Fri, 01 Jul 2022 16:09:34 -0700 (PDT) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:480:3b24:1e12:a30a:e9e9]) by smtp.gmail.com with ESMTPSA id c3-20020a624e03000000b005183cf12184sm6256981pfb.133.2022.07.01.16.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Jul 2022 16:09:33 -0700 (PDT) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , linux-perf-users@vger.kernel.org, John Garry , Will Deacon , James Clark , Mike Leach , German Gomez , Leo Yan Subject: [PATCH v3] perf test: Add ARM SPE system wide test Date: Fri, 1 Jul 2022 16:09:32 -0700 Message-Id: <20220701230932.1000495-1-namhyung@kernel.org> X-Mailer: git-send-email 2.37.0.rc0.161.g10f37bed90-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 In the past it had a problem not setting the pid/tid on the sample correctly when system-wide mode is used. Although it's fixed now it'd be nice if we have a test case for it. Cc: German Gomez Cc: Leo Yan Signed-off-by: Namhyung Kim --- * skip if system-wide record was failed * use dummy event for testing tools/perf/tests/shell/test_arm_spe.sh | 30 +++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tools/perf/tests/shell/test_arm_spe.sh b/tools/perf/tests/shell/test_arm_spe.sh index e59044edc406..0d47479adba8 100755 --- a/tools/perf/tests/shell/test_arm_spe.sh +++ b/tools/perf/tests/shell/test_arm_spe.sh @@ -23,17 +23,20 @@ glb_err=0 cleanup_files() { rm -f ${perfdata} + rm -f ${perfdata}.old exit $glb_err } trap cleanup_files exit term int arm_spe_report() { - if [ $2 != 0 ]; then + if [ $2 = 0 ]; then + echo "$1: PASS" + elif [ $2 = 2 ]; then + echo "$1: SKIPPED" + else echo "$1: FAIL" glb_err=$2 - else - echo "$1: PASS" fi } @@ -85,5 +88,26 @@ arm_spe_snapshot_test() { arm_spe_report "SPE snapshot testing" $err } +arm_spe_system_wide_test() { + echo "Recording trace with system-wide mode $perfdata" + + perf record -o - -e dummy -a -B true > /dev/null 2>&1 + if [ $? != 0 ]; then + arm_spe_report "SPE system-wide testing" 2 + return + fi + + perf record -o ${perfdata} -e arm_spe// -a --no-bpf-event \ + -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1 + + perf_script_samples dd && + perf_report_samples dd + + err=$? + arm_spe_report "SPE system-wide testing" $err +} + arm_spe_snapshot_test +arm_spe_system_wide_test + exit $glb_err -- 2.37.0.rc0.161.g10f37bed90-goog