From patchwork Thu Oct 20 17:26:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 6306 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp232905wrr; Thu, 20 Oct 2022 10:27:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72V7ZM6Za+8bjsSvPAu/n/0PYOvw61y6kpVC3AmP2q6c51/Ra3rw3UHUgE2nO2eUJ6rAIz X-Received: by 2002:a17:907:16a7:b0:78d:f586:e446 with SMTP id hc39-20020a17090716a700b0078df586e446mr11939645ejc.252.1666286852267; Thu, 20 Oct 2022 10:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666286852; cv=none; d=google.com; s=arc-20160816; b=uSLUl4hHx0gpUUhOf7gZHqvBS5q47T1xxc3OyS+1yY0QGwbAnxqs20tpylyAAkf89o i0R+aj+po/3+4HqwragCdXhbw9EGlU7P6WJjnSjpU68yKESQS7E0w2+GKgrBnhAYKour m+n0npIGoA1KYxbV8d/xsQmtronH/7qRt/VZ012UJTUx3iizlNKMBir+Wb9s0y8aVbMN P/aWMFRfcNP2ol5Ukk/5lyck7EJ/xqK8SNBIvnE/gVn6VdPJw4POLTsBeXmlNAe/SYlu s51LxchWPFj4koM53bqj4s6FLeeM9+lRCw2/8Ia/rYNGr7LC/08v+wwp4TK3ih/cZI7L Stgg== 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:sender :dkim-signature; bh=zyshK7iYZ8XULGV5AWhAfvvym7/uA21Df+Y+HX9QYb0=; b=ZNDrZmV4yFBCmYUUqYk/2T5ZFZXYrFKv8xgX4lbchV8rlWqCCZIiZXfDIeSfF6HTeI SWXojQILNizWtoUjkxVLTs8RjgM1by1fTtF72rQzmD3vBp9bCZhcSwae+B/puGr+eo17 HenT6GvLg2zfsgHEgYIMOoSPqT1vcltYcwzIpH3vsXzlGAN/ugrzQ/G3gx4a0n0cMUp9 arqQXo8Ntwla0zZd1Sy8ab7x5nygvlr/bUNxgAe9fpf1YjMzHpR6Nv1Ep/ML2ggaUA5k B/6SY0021Tx166/JEiUWEHpH1af0hbX58JeIqZ5Sbek9QsnjxqCs7Nw3PE880tquhv/x lkJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=huTJFdkU; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs20-20020a170906dc9400b0078d9db99a6bsi16190112ejc.444.2022.10.20.10.27.06; Thu, 20 Oct 2022 10:27:32 -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=huTJFdkU; 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 S229810AbiJTR0w (ORCPT + 99 others); Thu, 20 Oct 2022 13:26:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbiJTR0t (ORCPT ); Thu, 20 Oct 2022 13:26:49 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 594751A1B01; Thu, 20 Oct 2022 10:26:48 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id o17-20020a17090aac1100b0020d98b0c0f4so4149521pjq.4; Thu, 20 Oct 2022 10:26:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=zyshK7iYZ8XULGV5AWhAfvvym7/uA21Df+Y+HX9QYb0=; b=huTJFdkUecF8TGzQLLF7zQR3m817T7caMcVFk1X1HFFcunW/qxpRIzuNdRgNp9YqqC 4erIuFOo0N3fk1yBwunPDB7AwfRpS4skpBb3GapttN8tJR4Pj1FP52TRxXE7ZQcBRjAt Uyf9bUk2IqMILVqiZnpCslBjYb6WAI896ZicB9uKXSqaeW4lMwda1d1gN8rr87Mnx4LA 6yv9ET1FPfDyxBHshHme70jUsHjC87DVvGkotDtQdtVN8VpcAp2yB70KmDhgGZl519eA IsVEmtdAbDJu0KoVRoX34HDr5CawYlZiv1XxTaNR4IUdui3x9KpmdHnei4corF9VXRoK mIxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zyshK7iYZ8XULGV5AWhAfvvym7/uA21Df+Y+HX9QYb0=; b=wRojlP4qyexTcDDt1NQ9T2ErvZ9+DJwbMjqwbE6ARNm+i3SqS3aCjKFdOUzohUedbe ZGdx8tsYap1F/FVVk8JX/h2grBBHa/3Im2wO55EMOKE8nhf3azk1+Fc1rYXwBBrsEwKN C+w3T30qT/qkwA3wbuaEN5nxe/pLGjoZgsGb2nHk0yJG+miIEWODEUmyBqZpjri9imH+ sCF1BaXq9qdzLmWMOGgNaRjswYqcbz/ZFUrIkwimmLiPTr/sb+QzHNy/1/O1LjZLMi0Z hYJCZ47bz+BOwD/G/ZWM3HNqavdKB07xfXtMyI2GGq85PQUB41icxkCXC1jtVxERnvbi iXEw== X-Gm-Message-State: ACrzQf1VNVWTowO21RRJ/0tS2D+eCmeH4/6COml4RKBIgm6OEMNCvN+W kFIMKaewISdZKuCmz+OpN4s= X-Received: by 2002:a17:903:32c1:b0:185:5398:8c66 with SMTP id i1-20020a17090332c100b0018553988c66mr15241533plr.135.1666286807796; Thu, 20 Oct 2022 10:26:47 -0700 (PDT) Received: from youngsil.svl.corp.google.com ([2620:15c:2d4:203:637f:7dcc:4bbf:4981]) by smtp.gmail.com with ESMTPSA id q13-20020a170902f34d00b0017680faa1a8sm12951754ple.112.2022.10.20.10.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 10:26:47 -0700 (PDT) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org Subject: [PATCH 1/8] perf test: Do not use instructions:u explicitly Date: Thu, 20 Oct 2022 10:26:36 -0700 Message-Id: <20221020172643.3458767-2-namhyung@kernel.org> X-Mailer: git-send-email 2.38.0.135.g90850a2211-goog In-Reply-To: <20221020172643.3458767-1-namhyung@kernel.org> References: <20221020172643.3458767-1-namhyung@kernel.org> MIME-Version: 1.0 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,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747228402584985861?= X-GMAIL-MSGID: =?utf-8?q?1747228402584985861?= I think it's to support non-root user tests. But perf record can handle the case and fall back to a software event (cpu-clock). Practically this would affect when it's run on a VM, but it seems no reason to prevent running the test in the guest. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Acked-by: Ian Rogers --- tools/perf/tests/shell/record.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh index 301f95427159..747c33a1ec45 100755 --- a/tools/perf/tests/shell/record.sh +++ b/tools/perf/tests/shell/record.sh @@ -21,18 +21,18 @@ trap trap_cleanup exit term int test_per_thread() { echo "Basic --per-thread mode test" - if ! perf record -e instructions:u -o ${perfdata} --quiet true 2> /dev/null + if ! perf record -o /dev/null --quiet true 2> /dev/null then - echo "Per-thread record [Skipped instructions:u not supported]" + echo "Per-thread record [Skipped event not supported]" if [ $err -ne 1 ] then err=2 fi return fi - if ! perf record -e instructions:u --per-thread -o ${perfdata} true 2> /dev/null + if ! perf record --per-thread -o ${perfdata} true 2> /dev/null then - echo "Per-thread record of instructions:u [Failed]" + echo "Per-thread record [Failed record]" err=1 return fi @@ -49,7 +49,7 @@ test_register_capture() { echo "Register capture test" if ! perf list | egrep -q 'br_inst_retired.near_call' then - echo "Register capture test [Skipped missing instruction]" + echo "Register capture test [Skipped missing event]" if [ $err -ne 1 ] then err=2