Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp825958imu; Thu, 13 Dec 2018 05:14:01 -0800 (PST) X-Google-Smtp-Source: AFSGD/WvsApIWF7CUNoKNmrQSBOjwhRtlqElgiE6HxN6bY/oLCWw7i4GsPzwMiJ42Deg/3ov/aJG X-Received: by 2002:a62:c583:: with SMTP id j125mr24295271pfg.37.1544706841720; Thu, 13 Dec 2018 05:14:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544706841; cv=none; d=google.com; s=arc-20160816; b=M2TxRIyKGw4EV4YutXLtmnh36NN1sVlNLI7JyyXFv6GdvZ9m/bIhzWzUQsGIVPThl/ NkLqO9yIUHbb7Bo5yCmhkqGBGH7EOmWObU7vjVIRNdwLk/9zPTHIO3NLy9vOwFXHhIfW 0tWP849QNpssLFRG8H81i8Ixx/VfVBEaE9Z0kpio4QUu9BOUAZupe2O3lWrh2mkgivzD CEKrG4EGEhUa35YrJlk57hpzUYu7j2vFQgWoTFK2rq/0SFiR/0bXKM1PoU1/QRqtuYIY 4hDslarwkLqP/Z44pIiWShXgAiYalLPGo6YW2cmxL0q+UVvN/Xy/icxEx6aQWDHPleBb 4eWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1g2mBXTD9imcjLFNvUaPHg1UOfIv8ZW3ip+CtQYsCyI=; b=ZeK1QZp6z3AuXe0vSKjaifHCUMHuE/37sTIpNGfvoPJCxes4HRJkGvnBQzFr2DuLY8 wYUp1kL8H9jrfdge90UTCLEKoWZdZviQ9aTgV2YlkhwArK4VerNalXNUeH12aCk6ygz4 Y2kBWeWi8og+IagjRH+DXxoIoP2pN5zs+hJFV/Xo2hNMr0OIe1OtYk5FcgcMSR05TDS3 X+3CCFm6Iq+XRxPb+UkPr+GOalVylj1mMosoe5Q7Cy6F1pDwW83ugc7T5c1fknD9B+EJ 3OV7mOFv11Ai0bevbO15+XscZjv0l66DgeRS3Ke11eAlBJPHRzgb923C4Z/oUYa5IAx7 hyEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O0EvGRf7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 144si1425963pga.322.2018.12.13.05.13.44; Thu, 13 Dec 2018 05:14:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O0EvGRf7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729319AbeLMNLT (ORCPT + 99 others); Thu, 13 Dec 2018 08:11:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:42364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729212AbeLMNLS (ORCPT ); Thu, 13 Dec 2018 08:11:18 -0500 Received: from quaco.ghostprotocols.net (unknown [190.15.121.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B76020849; Thu, 13 Dec 2018 13:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544706677; bh=vx3UfyT37qi7YNjRu6FHKzxpzFiS7e/mXCYEG0g4ggo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O0EvGRf7j3qprC/guCKh8qJ2x3DqCKeLCu65sohMDSc7UVFnoLeyqf6bd1d/GsLeT /KF+/n15b4SDoeSJlyfnDPIEcYYB3Y7FJ/XQefQAEONmH2e4/wPKIIrnk3ByWns2cl kvXCl9oZBFWPPoCkf9BE2P5V7ibLy8CXEThUGWas= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id EE48E41B1D; Thu, 13 Dec 2018 10:11:13 -0300 (-03) Date: Thu, 13 Dec 2018 10:11:13 -0300 From: Arnaldo Carvalho de Melo To: Mathieu Poirier Cc: Leo Yan , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel , Linux Kernel Mailing List , Coresight ML Subject: Re: [PATCH v3 0/8] perf cs-etm: Correct packets handling Message-ID: <20181213131113.GH21027@kernel.org> References: <1544513908-16805-1-git-send-email-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Dec 12, 2018 at 11:45:44AM -0700, Mathieu Poirier escreveu: > On Tue, 11 Dec 2018 at 00:40, Leo Yan wrote: > > > > perf cs-etm module converts decoder elements to packets and then we have > > more context crossing packets to generate synthenize samples, finally > > perf tool can faciliate samples for statistics and report the results. > > > > This patch series is to address several issues found related with > > packets handling and samples generation when worked firstly on branch > > sample flags support for Arm CoreSight trace data, so this patch series > > is dependency for sample flags setting, will send another dedicated > > patch series for sample flags later. > > > > In this patch series, the first two patches are mainly to fix issues in > > cs_etm__flush(): patch 0001 corrects packets swapping in cs_etm__flush() > > and this can fix the wrong branch sample caused by the missed packets > > swapping; patch 0002 is to fix the wrong samples generation with stale > > packets at the end of trace block. > > > > Patch 0003 and 0004 are for minor fixing; patch 0003 removes unused field > > 'cs_etm_decoder::trace_on', this can simplize the switch-case code for all > > discontinuity packet generation by using one code block; patch 0004 is to > > refactor enumeration cs_etm_sample_type. > > > > Patch 0005 is to rename CS_ETM_TRACE_ON to CS_ETM_DISCONTINUITY, we use > > a more general packet type to present trace discontinuity, so it can be > > used by TRACE_ON event, and also can be used by NO_SYNC and EO_TRACE > > elements. > > > > Patch 0006 is used to support NO_SYNC packet, otherwise the trace > > decoding cannot reflect the tracing discontinuity caused by NO_SYNC > > packet. > > > > Patch 0007 is used to support EO_TRACE packet, which also introduces > > the tracing discontinuity at the end of trace and we should save last > > trace data for it. > > > > Patch 0008 is used to generate branch sample for exception packets. > > > > Credit to Mike Leach and Robert Walker who made me clear for underlying > > mechanism for NO_SYNC/EO_TRACE elements, Mike also shared the detailed > > explanation for why we can treat NO_SYNC and TRACE_ON elements as the > > same, so except following Mike & Rob suggestion for trace discontinuity > > consolidation, most commit log of patches 0006/0007 also come from > > Mike's explanation. > > > > This patch series is applied directly on the acme's perf/core branch [1] > > with latest commit aaab25f03e9e ("perf trace: Allow selecting use the > > use of the ordered_events code"). > > > > With applying the dependency patch, this patch series has been tested > > for branch samples dumping with below command on Juno board: > > > > # perf script -F,-time,+ip,+sym,+dso,+addr,+symoff -k vmlinux > > Good day Arnaldo, > > I have reviewed all the changes in this set - please consider adding > to your next branch. Let me know if you want a pull request. Thanks, applied manually, pushing now to my tmp.perf/core branch, please take a look at the commit log messages to see if I didn't messed up anything. :-) - Arnaldo