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=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 29903C433B4 for ; Wed, 12 May 2021 15:19:11 +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 C5DF261441 for ; Wed, 12 May 2021 15:19:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5DF261441 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com 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:In-Reply-To:MIME-Version:Date:Message-ID:References: To:From:Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9Fnhi90U0AGFKGczwGl6Puz/kGNzTLSfoPJaL7Wt0e8=; b=GSSL337crmfrMSqFeq1cqjYeP 0JazMPu6yLq0DFq6PjNZ/4CegYaLmnfGcugzuIt/szR9s/lrwjO4tRy3Ygi8gk7xxCds7xaKs5YuA W3CEFzeojZA1Ou2o3RHbUhJ+TdGPWu6+TYL0gIMSIM7MllsT3ks7vW3xSAYne9V2RKG7w1P8AwR/k kmUpWLZEksJQ9TM+xPvXH680qkQjcV9WQ/F7TX4r4uj6YasJeGhfUZ00SawwLdsz+HmaKZouDGDDO 87zuYfpKMchAYRgu2kOW7P9JtWD0QWGaiejIp0TCtuVlemonaiD7koq+aA3wuTRm6E282n9vzIMsY /Ue5Ue2kA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgqcJ-0039Ok-Up; Wed, 12 May 2021 15:17:44 +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 1lgqbp-0039Eh-6a for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 15:17:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:References:To:From: Subject:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=RM5VoUK9Cvr8hLGXHvagqDdnirI+hFTTtHLZ97C71ag=; b=ElOjb3lQMoBJFXLT+168Cbp5u9 j73Ql9dmA45pZJbJsdU2ZuJB9iyLjGIkmTka+0nLG2HqEiJcJySsZ7ELqBpmv8wDPKP9zOeHQhYy+ bnuu7l7BO0pqZpY/Eq6ZUVWISBdyND3SEpMl8kxlH/RrT9F6pNtOlRfZQme+ET5wKrBcaQHjQMr1w RyH/XlhdMqgau4lnv74Nmk9v+VMSiwWkUEO8z1Ojz9WrVqOX1aJgs1KbKqYa0LDR+Ef4UtwRGuSlY l+gk8/MeZ2o2ScnvqYVBLhI0kH0QnLtvUiceJmT5p9qJGDw0nfrP6Z92J8+dZGL8P2R6OW05+UIJm 2UHNwBmg==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbl-00AVGI-1U for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 15:17:11 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9CE2D31B; Wed, 12 May 2021 08:17:06 -0700 (PDT) Received: from [10.57.81.122] (unknown [10.57.81.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E2DA3F718; Wed, 12 May 2021 08:17:04 -0700 (PDT) Subject: Re: [PATCH v1 2/3] perf arm-spe: Correct sample flags for dummy event From: James Clark To: Leo Yan , Arnaldo Carvalho de Melo , John Garry , Will Deacon , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Al Grant References: <20210429150100.282180-1-leo.yan@linaro.org> <20210429150100.282180-3-leo.yan@linaro.org> Message-ID: <95d93dcb-e930-a1c7-08e1-be8885d19f64@arm.com> Date: Wed, 12 May 2021 18:17:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_081709_165292_DB42F251 X-CRM114-Status: GOOD ( 23.53 ) 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 On 12/05/2021 17:39, James Clark wrote: > > > On 29/04/2021 18:00, Leo Yan wrote: >> The dummy event is mainly used for mmap, the TIME sample is only needed [...] >> - 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); >> + if (opts->full_auxtrace) { >> + struct evsel *tracking_evsel; > > Hi Leo, > > I know the "if (opts->full_auxtrace)" pattern is copied from other auxtrace > files, but I don't think it does anything because there is this at the top > of the function: > > if (!opts->full_auxtrace) > return 0; > > The same applies for other usages of "full_auxtrace" in the same function. > They are all always true. I'm also not sure if it's ever defined what > full_auxtrace means. > > James Apart from this issue above, I've tested the full patchset with various combinations of --per-thread, -a and --timestamp and don't see any issues like missing command names or decode issues. (Apart from -a where Command is reported as '-1', but this issue is present before and after this patchset so is unrelated.) I think it makes sense to unify the behaviour to make it more like Coresight and others so this is a good change. Reviewed-by: James Clark Tested-by: James Clark > >> + >> + err = parse_events(evlist, "dummy:u", NULL); >> + if (err) >> + return err; >> + >> + tracking_evsel = evlist__last(evlist); >> + evlist__set_tracking_event(evlist, tracking_evsel); >> + >> + tracking_evsel->core.attr.freq = 0; >> + tracking_evsel->core.attr.sample_period = 1; >> + >> + /* 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; >> } >> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel