Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2656142imu; Sat, 10 Nov 2018 21:01:12 -0800 (PST) X-Google-Smtp-Source: AJdET5cypWXhMACMiHgFzeE85DDffs7tSzqWsI5HVZmt/5YL/0EAFb9GLglQlhWjOQYp3plMN+8I X-Received: by 2002:a17:902:66e5:: with SMTP id e92-v6mr14743543plk.92.1541912472591; Sat, 10 Nov 2018 21:01:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541912472; cv=none; d=google.com; s=arc-20160816; b=uwzn0GsMeAxGruIvaa9uKgyxmAOWvc90u6slQCyWcZnVmiEGhB7PFPawd1jZScvJ4p HcMY4D0oS8UaJtF1hwIZlp5nHR1OMLYHNBCrUEN/zBzJV5SRiVtiRx5iZQ4xwdF6WptY rLbR8g57fI0eoB0YQLCq3nvjRl9QP3p6cfRagoNDDvn+La11LrKypuYEMfvnST6Mb+Kq dXRqlSPuxoxJ8eKSAOKgtfOU2gPe8I8UIdeOFUEjBVnOI/rLouz+SwutSiX8BXv7/nWQ k9glCHa6aTS4wVX1rPx0bW6z2DlpRja4g85FReQYIKYTEHW/4yZojDufI7/E/vFUbQhg Zpew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3ZR0GX6zV5AaJMlllNZlFYuW1k9FVmH5E45X0UbSiao=; b=DWYrZLkJGUjU8LFGA6/mFjoW5ai+DqcO/saDRD3o1/k0U5aXwyTkSnu231mhPfmBE3 ybS9IuDpGdjyMzetPrX4BP3VNxg0DKmZbaecHTQp6dPL+H294Hl1nu0A7IiJmWVnumwe Ns30kGf5+wLOdlU7vacMJJY+jLhEUA5GuPqhsbH82rW3Dot5CyxDtMV+TLRIraMv76N4 W2hZgOYijeYY+tr+328D88xuGUloBHFYMPvKpT73qWyawvPoMxoCABzlTvFT+vc1Cvmf wyVjmZmB5VZ58o3Isb4vTh7B/jzELlv56UqHgkALf9q935dM740hA/BN2oQRTFMXCWH4 1vFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AkrX3P7S; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7-v6si3416444plr.220.2018.11.10.21.00.44; Sat, 10 Nov 2018 21:01:12 -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=@linaro.org header.s=google header.b=AkrX3P7S; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727398AbeKKOrj (ORCPT + 99 others); Sun, 11 Nov 2018 09:47:39 -0500 Received: from mail-wr1-f54.google.com ([209.85.221.54]:41540 "EHLO mail-wr1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727184AbeKKOrj (ORCPT ); Sun, 11 Nov 2018 09:47:39 -0500 Received: by mail-wr1-f54.google.com with SMTP id v18-v6so5841653wrt.8 for ; Sat, 10 Nov 2018 21:00:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=3ZR0GX6zV5AaJMlllNZlFYuW1k9FVmH5E45X0UbSiao=; b=AkrX3P7SQXmtssqNKNhvpUjnF8+6pRvDZji8k/ICQLBrDdAP/2ZY2DDsqAKYg1gDMu qQjC6XTNt6LvVqN2CDqlgyDqmcymqe7GyTc9oi0sGHBUOBA9uqaMJJKtTo7AH8nRH0RQ yO4uuHL2UN5/427kAJGgV+EmijOHT9OEwmSvY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3ZR0GX6zV5AaJMlllNZlFYuW1k9FVmH5E45X0UbSiao=; b=PZnO0A5OJ7ya2KvVKKz74fVSi0U55pgBDj74u4COvfwhrH76vSnhfOFLDuUNvD4ftH yvP07j6/u2shrlNmpANNBvILoH8wkCmSY9vRo3Fcr9p+EJQzDVCZFGppiZnMK3ic2vQH 8xnXDg7W4nVfzJDFNkL182hARfK/tMNxVcVCKu/kAajNub2fOyKGW3UUt3Q+GyYQiRqk vF/J9heCRnLt/67v44h17TIDB9Tds28bDED5SqEDVu+cWQuVspgWbN8prjueSlEl3GNE feMwkWRF2gwdFslYjocJGHdddjyGuckgGXdzjQr746GdHe2pSz/3DUicqCQ7ieerI57I n2Ig== X-Gm-Message-State: AGRZ1gKVsiJoclgp6c4+fqjk2Ex2y5UW6gdqBX6DRkkKexmsIancJXzy f2m8u1/bPqTx3vZm6vUvRUA2HQ== X-Received: by 2002:adf:80c8:: with SMTP id 66-v6mr12951009wrl.57.1541912409657; Sat, 10 Nov 2018 21:00:09 -0800 (PST) Received: from localhost.localdomain ([209.250.228.18]) by smtp.gmail.com with ESMTPSA id t187-v6sm4463802wmt.45.2018.11.10.21.00.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Nov 2018 21:00:08 -0800 (PST) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mike Leach , Robert Walker , Al Grant , Coresight ML Cc: Leo Yan Subject: [PATCH v1 0/5] perf cs-etm: Correct packets handling Date: Sun, 11 Nov 2018 12:59:38 +0800 Message-Id: <1541912383-19915-1-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 also is dependency for another patch series for sample flags. 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 every trace buffer. Patch 0003 is used to support NO_SYNC packet, otherwise the trace decoding cannot reflect the tracing discontinuity caused by NO_SYNC packet. Patch 0004/0005 has been published in the patch series 'perf cs-etm: Add support for sample flags' before but at this time I move them into this patch series due these two patches are more relative with packets handling. Patch 0004 is used to generate branch sample for exception packets; and patch 0005 is to track the exception number. This patch series is applied on the acme's perf core branch [1] with the latest commit f1d23afaf677 ("perf bpf: Reduce the hardcoded .max_entries for pid_maps") and has one prerequisite from Rob's patch 'perf: Support for Arm A32/T32 instruction sets in CoreSight trace' [2]. 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 [1] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/log/?h=perf/core [2] http://archive.armlinux.org.uk/lurker/message/20181109.091126.9d69489d.en.html Leo Yan (5): perf cs-etm: Correct packets swapping in cs_etm__flush() perf cs-etm: Avoid stale branch samples when flush packet perf cs-etm: Support for NO_SYNC packet perf cs-etm: Generate branch sample for exception packet perf cs-etm: Track exception number tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 91 ++++++++++++++++++++++--- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 11 +-- tools/perf/util/cs-etm.c | 65 +++++++++++++++--- 3 files changed, 146 insertions(+), 21 deletions(-) -- 2.7.4