Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp836074pxb; Thu, 15 Apr 2021 07:44:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxAQ0mqkuo6cSfiUFZbQ3UUltTg0qjB3+ut+YBvrKCz4b/3kdqVwb+h2tTStrQM5uxXXow X-Received: by 2002:a17:903:22c2:b029:e7:1f02:434c with SMTP id y2-20020a17090322c2b02900e71f02434cmr4288284plg.73.1618497890035; Thu, 15 Apr 2021 07:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618497890; cv=none; d=google.com; s=arc-20160816; b=LEHBPzCxht/mzM9htVm0af35jmd2vuG+ZhkM2KdinEJwRsf72dHiaqSWDwfHUJw+Q3 4cRX6YubkcIOsPLM+vJdFEw4fiR8K296ZQvWOYT882u4eJUWgtRSc92hHznjqKv4yd/P LI3O8dfP0Y32utQq0/tyHtqhOhMQsXbAhGdKHIrb+MQIg6AciNeT/nWRwfAiTMXSy31t 3p2t+XkDuvaaX11Sw1J0Zxbsqez24vJrSDVFDL5HNsnKlVABCyNnHxwBWmHKQpbvQCsA OvABSyOtG3F1XynLkMDgiO2DnjvLYCgnctqhKT1utQQlcpz8FC4ez20kgRXG7eEqxNI0 kBRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject; bh=NrYR6ToGxedJcogHJTCpzyKtqf1dff93jWCtJkw5mKM=; b=NJv7YWMLmcLj81Blqt7ya/IyCTGJBpIXds15nuQphjwhbsCZ+B9Auu8sHUec3O8N1x 1SX60YkSqJavbJOERxBJ/QHC2qNCM8H9Nh6+0uI/wgr1q8XBYp6MjNpmO/PTNNqWYOma RNSR4KpJIjdtLOi9T0fdiX2ff6MC2AVkcAZpr3VSSxlwx/TgmL/ECh4uN4xptmTXZf4t bkgFnn5QVVjMHWNSqD+/Bu17Hoe1UAJtHhbkxcHb1qnK7JBeaWJ1Ty1sdhJ8mZ07r3fc EP4txQ85uNr6JuOVWUi8gT9QkkwZHvGrl1epB3VO5en0a3r5F0AvH27LtTH9M2AOS820 Eplw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si3371188pff.109.2021.04.15.07.44.37; Thu, 15 Apr 2021 07:44:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233524AbhDOOnv (ORCPT + 99 others); Thu, 15 Apr 2021 10:43:51 -0400 Received: from foss.arm.com ([217.140.110.172]:47850 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233520AbhDOOnu (ORCPT ); Thu, 15 Apr 2021 10:43:50 -0400 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 9FF10106F; Thu, 15 Apr 2021 07:43:27 -0700 (PDT) Received: from [10.57.57.112] (unknown [10.57.57.112]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8BEF43FA45; Thu, 15 Apr 2021 07:43:25 -0700 (PDT) Subject: Re: [PATCH v4 0/6] perf arm-spe: Enable timestamp To: Leo Yan , Arnaldo Carvalho de Melo , Al Grant , John Garry , Will Deacon , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Dave Martin , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20210412091006.468557-1-leo.yan@linaro.org> From: James Clark Message-ID: <570051ef-eda0-ead2-96de-0e22ca226e0a@arm.com> Date: Thu, 15 Apr 2021 17:43:24 +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: <20210412091006.468557-1-leo.yan@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leo, I was looking at testing this on N1SDP and I thought I would try the round trip with perf inject and then perf report but saw that perf inject with SPE always results in an error (unrelated to your change) -> ./perf report -i per-thread-spe-time.inject.data 0x1328 [0x8]: failed to process type: 9 [Bad address] Error: failed to process sample Do you have any test suggestions other than looking at the raw data? Thanks James On 12/04/2021 12:10, Leo Yan wrote: > This patch set is to enable timestamp for Arm SPE trace. It reads out > TSC parameters from the TIME_CONV event, the parameters are used for > conversion between timer counter and kernel time and which is applied > for Arm SPE samples. > > This version dropped the change for adding hardware clock parameters > into auxtrace info, alternatively, it utilizes the TIME_CONV event to > extract the clock parameters which is used for timestamp calculation. > > This patch set can be clearly applied on perf/core branch with: > > commit 2c0cb9f56020 ("perf test: Add a shell test for 'perf stat --bpf-counters' new option") > > Ths patch series has been tested on Hisilicon D06 platform. > > Changes from v3: > * Let to be backwards-compatible for TIME_CONV event (Adrian). > > Changes from v2: > * Changed to use TIME_CONV event for extracting clock parameters (Al). > > Changes from v1: > * Rebased patch series on the latest perf/core branch; > * Fixed the patch for dumping TSC parameters to support both the > older and new auxtrace info format. > > > Leo Yan (6): > perf arm-spe: Remove unused enum value ARM_SPE_PER_CPU_MMAPS > perf arm-spe: Save clock parameters from TIME_CONV event > perf arm-spe: Convert event kernel time to counter value > perf arm-spe: Assign kernel time to synthesized event > perf arm-spe: Bail out if the trace is later than perf event > perf arm-spe: Don't wait for PERF_RECORD_EXIT event > > tools/perf/util/arm-spe.c | 74 +++++++++++++++++++++++++++++++++------ > tools/perf/util/arm-spe.h | 1 - > 2 files changed, 64 insertions(+), 11 deletions(-) >