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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7AF43C433EF for ; Fri, 28 Jan 2022 21:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=MqbmVdmaqg3M3s/ewCKutwR0kQPkBg7NVvvzG1V62xE=; b=jB8CJubfJp9xaC lykZoni66+PeyjDXxwdvVkR59kZb1NIKd0Mi83+Tr7+15m3PCYxu6MCdnVraKc5gLOsdTQvHPortH r++ZdAd+0mANpJAl9fco+kC7YBa2V5TOIFRBzewOuJryBDx79wCU3d6Ax9oi5mQ6EV0t8VhILT8pN QPYqkkb4kIJSSHXiIdRT1xjJwG7yQ1o2sJga0ntrQ8AVW4X7o6wfV4cbfA4v5NbHJb3XDoacEB0GY 1Bgcz6I/cFCHEWPUtOdjg617OJWuBkRyYfUWlcbSIalwGxJC9afUQnPobHIE0yZEf4QTo8VMs38ru qs9ieVcCzkXYVi+GPenQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDYOk-003Xr2-M3; Fri, 28 Jan 2022 21:03:10 +0000 Received: from smtp-fw-80006.amazon.com ([99.78.197.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nDYOh-003Xpi-EI for linux-arm-kernel@lists.infradead.org; Fri, 28 Jan 2022 21:03:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1643403788; x=1674939788; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0elh7Uegmz6NB5gRLtcnKnV9reRQ0A3TuI1lW+jT4v4=; b=TdEKR0QbqL1Tb9j6CWxbDS9y3Hz+J8BRFNjMKfITOPNZYoceK+MNrb49 hhdKWoBUxvnPTbFZp6mTFd6NYiratgmfQpkJ0WxGJWyFdbFmJbIL9MW3F Nb4UjKbvodeTXK+vDJpOVctS9eNhCQrbdMgys9x/yhx34CKEBRG3Q2up1 o=; X-IronPort-AV: E=Sophos;i="5.88,324,1635206400"; d="scan'208";a="58828092" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-5feb294a.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP; 28 Jan 2022 21:02:59 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-5feb294a.us-west-2.amazon.com (Postfix) with ESMTPS id 2F5E19FCD2; Fri, 28 Jan 2022 21:02:53 +0000 (UTC) Received: from EX13D02UWB001.ant.amazon.com (10.43.161.240) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Fri, 28 Jan 2022 21:02:52 +0000 Received: from EX13MTAUEA002.ant.amazon.com (10.43.61.77) by EX13D02UWB001.ant.amazon.com (10.43.161.240) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Fri, 28 Jan 2022 21:02:50 +0000 Received: from dev-dsk-alisaidi-i31e-9f3421fe.us-east-1.amazon.com (10.200.138.153) by mail-relay.amazon.com (10.43.61.169) with Microsoft SMTP Server id 15.0.1497.28 via Frontend Transport; Fri, 28 Jan 2022 21:02:49 +0000 Received: by dev-dsk-alisaidi-i31e-9f3421fe.us-east-1.amazon.com (Postfix, from userid 5131138) id A5DCC21BC4; Fri, 28 Jan 2022 21:02:49 +0000 (UTC) From: Ali Saidi To: CC: , , , , , , , , , , , , , , , , , Subject: Re: [PATCH 2/2] perf arm-spe: Parse more SPE fields and store source Date: Fri, 28 Jan 2022 21:02:45 +0000 Message-ID: <20220128210245.4628-1-alisaidi@amazon.com> X-Mailer: git-send-email 2.24.4.AMZN In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220128_130307_581368_9E28A6D4 X-CRM114-Status: GOOD ( 15.47 ) 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 Hi German, On 28/01/2022 19:20, German Gomez wrote: >Hi Ali, > >On 25/01/2022 19:20, Ali Saidi wrote: >> Decode more SPE events and op types to allow for processing by perf >> scripts. For example looking for branches which may indicate candidates >> for conversion to a CSEL, store exclusives that are candidates for >> conversion to LSE atomics and record the source information for memory >> ops. >> [snip] >> + if (SPE_OP_PKT_IS_LDST_ATOMIC(payload)) { >> + if (payload & SPE_OP_PKT_AT) >> + decoder->record.op |= ARM_SPE_LDST_ATOMIC; > >In "utils/arm-spe.c" we check "if (record->op == ARM_SPE_LD)" so this >ORing could break some of the generated samples. Yep, you're correct. Interestingly I can only find one use of record->op using equivalence instead of a logical and so perhaps it's best to fix this one use. ... >> diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h >> index 69b31084d6be..113e427afe99 100644 >> --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h >> +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h >> @@ -22,11 +22,18 @@ enum arm_spe_sample_type { >> ARM_SPE_TLB_MISS = 1 << 5, >> ARM_SPE_BRANCH_MISS = 1 << 6, >> ARM_SPE_REMOTE_ACCESS = 1 << 7, >> + ARM_SPE_BR_NOT_TAKEN = 1 << 8, > >Can you rename it to ARM_SPE_BRANCH_NOT_TAKEN for consistency? No problem > >> }; >> >> enum arm_spe_op_type { >> ARM_SPE_LD = 1 << 0, >> ARM_SPE_ST = 1 << 1, >> + ARM_SPE_LDST_EXCL = 1 << 2, >> + ARM_SPE_LDST_ATOMIC = 1 << 3, >> + ARM_SPE_LDST_ACQREL = 1 << 4, >> + ARM_SPE_BR = 1 << 5, >> + ARM_SPE_BR_COND = 1 << 6, >> + ARM_SPE_BR_IND = 1 << 7, > >I'm not sure if we should keep everything in one enum/bitmask. I'm also >looking at adding more of the data from the packets to the record, and >considering refactoring the record structure. I'll share here when I >have something. One straight forward way to do this would be to make it a u16 field that was SPE operation-type header and operation-type payload with some accessors instead of trying to re-encode the operation type into a new format. Thanks, Ali _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel