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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 EE016C433B4 for ; Wed, 19 May 2021 04:18:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 775D16112F for ; Wed, 19 May 2021 04:18:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 775D16112F 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=J3lI7ZA0j/2QWZaToOByxYFVa1o1x1kLrrENrYHWjSY=; b=WhCu6dd0xOLYKBjRAR74UNmOn rssQcLI4pBYlhn5Y4dNLPh/wm4s9AJnk6+ivKU6CBC4boUL5v9a2PQ5chjb7+whpxXWhn3iKB+KsJ pK+uN2JfXHF7RgMQP2/xSuUpmyiM3BLoiFtbfX2OrogpUp69CIEa4VQboF+mLqWtbfnP3LZRyFZtt FX828MOCwoKpIzw/StXXxZtxZ55MdXoegoeCJWhesm00j3v5kuppvaAIsD8YS+ZHyUudUKgncIx2E TyPP+zhIkkWGrNs3SpWgMcY4SnUAf/Dk9nmEHNwHu/dZI2XmzK+dPljldGF52nKDK+gKr/FNtgDWg BgbHjQFVg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljDd9-002hda-5Z; Wed, 19 May 2021 04:16:23 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljDcp-002hbV-PW for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 04:16:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=9hP472i8tu0x2oWr2ZZdW3TiExRRKywLv6WAxBp0eH4=; b=2nTEpY0yLTd9rBE4Ytd58CJggq HuzZSHfcivJu53b5Q1dT7P1RGJBjdiuU6z5o7kuNEZVbVgqdMEQWsLbX+tKCVJtgYde3s2YiIOMNo PE3L/dR0Yqgnwh7OK6mZ96jXoVz5CioFjaiDt0G2Jkds49BPj/2KGC1EMGdVyJ4h/p0jOQ08hnvTS p5aKGX0LW4KFwQMfrOSHA/xXhi95ZOybzUy638icyO54eQZKp98amD7MQt8M9zCqfRBQ8uZgM4pNk kCM3XZyrmcIvG1FhswgxhHsxxPfXEmL9GWsueL0h4EJJi15Mn0zSD6BJwOnc584Aod9o7pQozZzuy UWdxJPPw==; Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljDcn-00F77y-BD for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 04:16:02 +0000 Received: by mail-pl1-x631.google.com with SMTP id s20so6271603plr.13 for ; Tue, 18 May 2021 21:16:01 -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 :mime-version:content-transfer-encoding; bh=9hP472i8tu0x2oWr2ZZdW3TiExRRKywLv6WAxBp0eH4=; b=ZqWbS934HXeMusilkVQHGpZ3Q7vGiO7M0MUhqBwrcrwXi+yiv+LfI1IFFgG55aPJ3F AqPEzAT7IbucWE+hJY1kLI3IgxoGc26uDeR8hTERW6r4mUhqr/wj25zAXWpckxqMyJaQ e9wa8PoKnLRs6YM2oykFuACMjKlfifKrW/fRG8dH5auH3N++J40GsQb/mOGRSbp7AVtt 63ew5qNPYMksJ374gKdWGU3yxvOlLUj5a2GWDAzzBIOolZT8BYehXPx47F5zXJe1ZxIp oS0+kaCHvPBfeER/gIuQpIjD4BQ2cJJOugivvlmBYPxNN3J+NmK1UfzRCeFHqoyRV6gW IqWA== 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:mime-version:content-transfer-encoding; bh=9hP472i8tu0x2oWr2ZZdW3TiExRRKywLv6WAxBp0eH4=; b=OXqbfScnOCTr6uUZradHNPmGvAWuyG/gpwfcsbuGKwfhr2WY9KYfb70EFuctJ9Meea Gzs5eljxsAqBCaRdTEOB4qVnMsRRdzy/tiYfsN+WS46goVD4uDQ4UdRSFCvkZktyV+GI yOHm72UEuShEhx+uesY99y+lhSMT7gc0kZ4X9W7DcrH/y3DxZBYLM19v6MnhvYUepKZo hwH4U+QmYI8Je43Z7LLhtVrF6v/KHvqrgnbN9k4TWX1LsGQLbLSjHlMg2i6oFts0UAGc oeGS5qf2G4Eny9G7F5iWHFFrWiaef8xMZPoOUnBRk0YuRrar3jwG2rBAIM0m0Xj14h7J kwXQ== X-Gm-Message-State: AOAM532aUjnOjnIqjGA/77BIr5ZWSQih7EVP6B0og8i00QB8Ja+DNEW7 ZtcShoOwyAArWnkoQVTUtl8e/g== X-Google-Smtp-Source: ABdhPJyGVQQN0GIEUbL3koaYY2sK4NeUkK5gEA8vO0yJRRxu3bib5xdQI2HlfpWuxUUBFFDAnKf5BA== X-Received: by 2002:a17:90a:1a43:: with SMTP id 3mr9090485pjl.154.1621397760560; Tue, 18 May 2021 21:16:00 -0700 (PDT) Received: from localhost ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id kk7sm2993954pjb.16.2021.05.18.21.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 21:16:00 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , John Garry , Will Deacon , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , James Clark , Al Grant , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 2/4] perf arm-spe: Correct sample flags for dummy event Date: Wed, 19 May 2021 12:15:44 +0800 Message-Id: <20210519041546.1574961-3-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210519041546.1574961-1-leo.yan@linaro.org> References: <20210519041546.1574961-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_211601_400311_51A63E9D X-CRM114-Status: GOOD ( 17.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 The dummy event is mainly used for mmap, the TIME sample is only needed for per-cpu case so that the perf tool can rely on the correct timing for parsing symbols. And the CPU sample is useless for mmap. The BRANCH_STACK sample bit will be always reset for the dummy event in the function evsel__config(), so don't need to repeatedly reset it for Arm SPE specific. So this patch only enables TIME sample for per-cpu mmap. Signed-off-by: Leo Yan Reviewed-by: James Clark Tested-by: James Clark --- tools/perf/arch/arm64/util/arm-spe.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index 902e73a64184..4c916626c203 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -135,9 +135,10 @@ static int arm_spe_recording_options(struct auxtrace_record *itr, tracking_evsel->core.attr.freq = 0; tracking_evsel->core.attr.sample_period = 1; - evsel__set_sample_bit(tracking_evsel, TIME); - evsel__set_sample_bit(tracking_evsel, CPU); - evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK); + + /* In per-cpu case, always need the time of mmap events etc */ + if (!perf_cpu_map__empty(cpus)) + evsel__set_sample_bit(tracking_evsel, TIME); return 0; } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel