Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp1475525pxb; Fri, 10 Sep 2021 06:49:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzz+RSSFDkWBpK/rxMF4TIclQtiPtLvdtrIYL6gRl0mHXBmNwR9GGCRtwk7Os9OAsOkZAS X-Received: by 2002:a17:906:36d6:: with SMTP id b22mr9409870ejc.387.1631281771168; Fri, 10 Sep 2021 06:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631281771; cv=none; d=google.com; s=arc-20160816; b=HJ4/BpNOMuQNXAz063sIQ6PC+wfpN/7bZnoJM+fv8Jvq5XdmM9oNUa0LkPgAOaLx8d 13k1KDL0hwq4CwF6GMXCoMoqzIBZjH/O2VlEZmrWehW0RcSxWPS7p7tp4yOomt++q5qk Aj8S9F2WW+OdRRVV1MLsXz65qHYv6UbrkH86dMp2JjeZIF542OuWqMlOQp2fvbX8El+L imf24vj73y9g2Vx6WdxL/ZXmiaFmkTC+MZki0caV1H9X9D3cXkhan95fMrC8Z1FmJzjL RioLcxiQwi102ug10Cnh+mnqYCN+CHeeQLyz6P64qVugq/cjibo2ayvS6teJA/vHJbQE 94Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fB5XBk0+IApRncztKvggTjo0bXfYBe81XjCIqoAiDEY=; b=QSgufRihL/EVH3xRUbxP5bIgm3SHNkc2KdxwfRfec6H8tN0kHaNZkYB8vmzbh4b/Pm hecbrEAOF3Me07mlGslJfZbsYEQJ08dLDnqqYHQwySb3wYjJZ6RS3y9XBRdPQoXQ0EEt aZGQkstMZrFyuQOewqDrNpm4eV7FSl1IykIaLevmRPWhLUB3W+b97X4PYow9y+Ic3W/9 LBzfTmELiSoK+6lvdtDOg9iob72Tpd0Zk9gA1kzzcSW5sTECOdE80l4kvopmHxDOOQ4A vSC4s1QTOrYCnehiUmiSSihV9LmiOhaPW3rIKtxWziL5mkPwi2DhcjvDSbPdF2SzjI7c iNPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ly3dYUer; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si5234947edq.329.2021.09.10.06.49.04; Fri, 10 Sep 2021 06:49:31 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ly3dYUer; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233554AbhIJNsb (ORCPT + 99 others); Fri, 10 Sep 2021 09:48:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:53512 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231963AbhIJNsb (ORCPT ); Fri, 10 Sep 2021 09:48:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AFC59611CC; Fri, 10 Sep 2021 13:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631281640; bh=3QyDRaCV9CAvwJPnWSiuVlmX8dhIt+DdBDA4L4zPqj0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ly3dYUerrTLnrmnBMDJtNLxd8NKCRW8G3JGZmv98Ay1RhxAEPm0/djg4NoHgbSEQy roP93wNlDAhwVtdCC7la/efztKbLu5zdFISMmgOUhnyJSSHR5cdacW20VUqTqUYfpw j+JwpH4V0PrIZd7dipk4csFJAUoASoJOZjyQ0ocWEEl4rpEbG1TR50BLmQTDbAXyTH swD9vBnpE5mjPRYbxr3ZvAPSL4fInjcHOf8BC41/CSHJ3MO2ij0yvtR6hxYMo2ECpu tIeRTOrfCA0WHfT9gckxsZRsM697jRVPuTcSmZbaoLjI7oRkmtTg6lewryGWqM3a08 HBTJgcw+ri4AQ== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 99E6A4038F; Fri, 10 Sep 2021 10:47:16 -0300 (-03) Date: Fri, 10 Sep 2021 10:47:16 -0300 From: Arnaldo Carvalho de Melo To: Kim Phillips Cc: Arnaldo Carvalho de Melo , Alexander Shishkin , Boris Ostrovsky , Ian Rogers , Ingo Molnar , Jiri Olsa , Joao Martins , Konrad Rzeszutek Wilk , Mark Rutland , Michael Petlan , Namhyung Kim , Peter Zijlstra , Robert Richter , Stephane Eranian , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 0/3] perf report: Add support to print a textual representation of IBS raw sample data Message-ID: References: <20210817221509.88391-1-kim.phillips@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Sep 09, 2021 at 04:58:12PM -0500, Kim Phillips escreveu: > Hi Arnaldo, > > Can you please take a look at applying this series? Its kernel-side > dependent series has already been applied and is in Linus' master. Sure, I'm now trying to fix this: CC /tmp/build/perf/util/amd-sample-raw.o util/amd-sample-raw.c: In function ‘evlist__amd_sample_raw’: util/amd-sample-raw.c:125:42: error: ‘ bytes’ directive output may be truncated writing 6 bytes into a region of size between 4 and 7 [-Werror=format-truncation=] 125 | " OpMemWidth %2d bytes", 1 << (reg.op_mem_width - 1)); | ^~~~~~ In file included from /usr/include/stdio.h:866, from util/amd-sample-raw.c:7: /usr/include/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 21 and 24 bytes into a destination of size 21 71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 72 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/util/amd-sample-raw.o] Error 1 > Thanks, > > Kim > > On 8/17/21 5:15 PM, Kim Phillips wrote: > > Hello Linux perf tools users and maintainers, > > > > The first patch in this series prepares the perf tool to support > > retrieving cpuid and pmu_mappings data when in report mode, > > information that is needed to accurately decode IBS data. > > > > The second patch adds a header file tools/arch/x86/include/asm/amd-ibs.h > > from a separate kernel-side submittion [1]. > > > > The third patch allows the tool to print a textual representation > > of the sample data recorded by IBS. > > > > [1] https://lore.kernel.org/lkml/20210817221048.88063-9-kim.phillips@amd.com > > > > Kim Phillips (3): > > perf env: Add perf_env__cpuid, perf_env__{nr_}pmu_mappings > > perf report: Add tools/arch/x86/include/asm/amd-ibs.h > > perf report: Add support to print a textual representation of IBS raw > > sample data > > > > tools/arch/x86/include/asm/amd-ibs.h | 132 ++++++++++++ > > tools/perf/check-headers.sh | 1 + > > tools/perf/util/Build | 1 + > > tools/perf/util/amd-sample-raw.c | 290 +++++++++++++++++++++++++++ > > tools/perf/util/env.c | 78 +++++++ > > tools/perf/util/env.h | 5 + > > tools/perf/util/sample-raw.c | 8 + > > tools/perf/util/sample-raw.h | 6 +- > > 8 files changed, 520 insertions(+), 1 deletion(-) > > create mode 100644 tools/arch/x86/include/asm/amd-ibs.h > > create mode 100644 tools/perf/util/amd-sample-raw.c > > > > Cc: Alexander Shishkin > > Cc: Arnaldo Carvalho de Melo > > Cc: Boris Ostrovsky > > Cc: Ian Rogers > > Cc: Ingo Molnar > > Cc: Jiri Olsa > > Cc: Joao Martins > > Cc: Konrad Rzeszutek Wilk > > Cc: Mark Rutland > > Cc: Michael Petlan > > Cc: Namhyung Kim > > Cc: Peter Zijlstra > > Cc: Robert Richter > > Cc: Stephane Eranian > > Cc: linux-kernel@vger.kernel.org > > Cc: linux-perf-users@vger.kernel.org > > -- - Arnaldo