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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 372CBC433E0 for ; Thu, 21 Jan 2021 13:46:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0FAA23444 for ; Thu, 21 Jan 2021 13:46:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729560AbhAUNpj (ORCPT ); Thu, 21 Jan 2021 08:45:39 -0500 Received: from mga11.intel.com ([192.55.52.93]:4383 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731284AbhAUNj5 (ORCPT ); Thu, 21 Jan 2021 08:39:57 -0500 IronPort-SDR: 4ZKaunXOMN67AbL6vcE+doKPgf55JmSiBxftQwy11Reaxi3PZKkHBvrhsdCbMgFSSg0lAfTk// lJah4RCVk7bQ== X-IronPort-AV: E=McAfee;i="6000,8403,9870"; a="175762032" X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="175762032" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2021 05:39:00 -0800 IronPort-SDR: 3XudVQHQ8K9uErqPdMO293SZWfsaHmy6Oj9dem3nM4Kd+a83gWtzmNB11ffd5ayP0wtYUuYU9q v81FWlO6oN/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,364,1602572400"; d="scan'208";a="385311757" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.149]) ([10.237.72.149]) by orsmga008.jf.intel.com with ESMTP; 21 Jan 2021 05:38:57 -0800 Subject: Re: [PATCH] perf evlist: Fix id index for heterogeneous systems To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , linux-kernel@vger.kernel.org, Jin Yao References: <20210121125446.11287-1-adrian.hunter@intel.com> <20210121131901.GA345740@kernel.org> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: Date: Thu, 21 Jan 2021 15:39:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20210121131901.GA345740@kernel.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 On 21/01/21 3:19 pm, Arnaldo Carvalho de Melo wrote: > Em Thu, Jan 21, 2021 at 02:54:46PM +0200, Adrian Hunter escreveu: >> perf_evlist__set_sid_idx() updates perf_sample_id with the evlist map >> index, cpu number and tid. It is passed indexes to the evsel's cpu and >> thread maps, but references the evlist's maps instead. That results in >> using incorrect cpu numbers on heterogeneous systems. Fix by using evsel >> maps. >> >> The id index (PERF_RECORD_ID_INDEX) is used by AUX area tracing when in >> sampling mode. Having an incorrect cpu number causes the trace data to >> be attributed to the wrong cpu, and can result in decoder errors because >> the trace data is then associated with the wrong process. > > Can you please provide a Fixes: tag so that the stable@kernel.org guys > can apply where appropriate? Oops sorry missed that. Here it is: Fixes: 3c659eedada2 ("perf tools: Add id index")