Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3506997imm; Sun, 17 Jun 2018 22:11:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKqtdFnD4vGlB5WYjfTeFtQYC4/g1QTfg76C/BrNnD5Als6j17x4BY65NnAhzf75XBIP1XM X-Received: by 2002:a17:902:8645:: with SMTP id y5-v6mr12404694plt.334.1529298716579; Sun, 17 Jun 2018 22:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529298716; cv=none; d=google.com; s=arc-20160816; b=YVQBvgFRDruKPL3po3Z63Hy0K22rQiVgT9R4ekKCmfatfdC5cRTLCILZlQB303DTdU lONyPf5W2FwpBE4lNvR0d6v5jWTw1d4I5qGom0qn3+dm9tJ8Jeyj7In6WBQWQz3jt6Np qhwmPCZ9OwLkbK+2xMAnZp85igQySE9qXZoK6m61xtPDZdL5MHo6qjuJQISawNewYZh8 MQs4/ScqRWpXxyoPcBGRHYjh9NuQ6JKB2pOYbjF68mpG5NcLZnzmnMJZjr8Yd3ZL5WOF iwYWqCTnqAUOMPQMTysVQu7nMcW2a5N5IVUCUC8qEoCTCgCLg5oE+xlCQZC2zwb4Si/e QUiQ== 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:arc-authentication-results; bh=wv0RJDy6mIMdgxWKBBko5JPPQqEImMcrVm3QSpw1mvc=; b=IDlUOUzN9L8KutI9hWv6isxnSTJBqAH2F/jhe2XL5rU83tz4ulRmozikhtsRekSWzk hmHZehAUJRteTEcbpCl/P1CzoPhfEP1lvEOfMxBDxEoeNUoAb0691Ewx8p/K5p+vEC7B jJJcfCYiRdEXB32YrEUzjfKQ+K5eUiGne4YcItMZGPT/pkqP9A25W+N7eXEmGcwVJyuh nRQLkzww6mot8bLmh+jlh9K2pO3Cj/vVuLP4WJytRTwEVix9HVaGA1Dbffb5PndiVoaJ nQRLrYlxjlE1k+goJC5Q3DyRh8YYbfEeS6OHQyOqpg1NYP6+LKv0+6Vt3eKXwE1RHRe5 p6Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PDRV5d5R; 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 y7-v6si11245852pgo.81.2018.06.17.22.11.30; Sun, 17 Jun 2018 22:11:56 -0700 (PDT) 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=PDRV5d5R; 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 S1754152AbeFRFKe (ORCPT + 99 others); Mon, 18 Jun 2018 01:10:34 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:42253 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207AbeFRFKc (ORCPT ); Mon, 18 Jun 2018 01:10:32 -0400 Received: by mail-pg0-f65.google.com with SMTP id c10-v6so6960270pgu.9 for ; Sun, 17 Jun 2018 22:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=wv0RJDy6mIMdgxWKBBko5JPPQqEImMcrVm3QSpw1mvc=; b=PDRV5d5RedsQYNFTQtyqBpSx1+HJd/W0Sdd7jYDd8gnQgYmnLe1k+YnWS6AnsDAJ2j 2tLa2KGfwboQhJQlUPCr3avymqAfXF/ZtiOoiUBrB+fVZk9SRPVMDAGP+MiOoqlgxxTd AVqYpqNZiPjgV8k9P5yIV2gxsIF0LVP9BMch8= 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=wv0RJDy6mIMdgxWKBBko5JPPQqEImMcrVm3QSpw1mvc=; b=hQFQBwtyiOs4FhNihVOpxbh7lAb0MDm40vGUiZ8vkVIXN7xv0oCAM2BeljI+QlmBwZ z6iK94/L8vDHFZwy29ad7/JL5RqQJ7VaNXmf0rZn+1ai4TxfGtU8MzJmxZipNS1Upk5e zH6RKWHRMSkHz2wB/z+SzoQZggvr+/rsgQW19yCvxi/aobn8Y1cyJJ8rchD4yCwkf3SQ zWkEKODS/jOXx0OH1BI1MDft5Ewj79zP+bO5a7H9EQmrZZrVsJ+RgC5+f4m7HZQ/BhH4 F1yruBbFTu/de59x/wwuGPS4p27wZSBn/e7Jqao57xhgJlS2Su5GiUAg9alEeAC/f9vv yF2A== X-Gm-Message-State: APt69E1dNgWXyi6PkjdaUh4BTp3W9B690Lw8BXDGiKOl+FHXDwvBHw1o WirlFk2LZ1s/7jiAzHCaxu9ijA== X-Received: by 2002:a65:450c:: with SMTP id n12-v6mr9805708pgq.242.1529298632344; Sun, 17 Jun 2018 22:10:32 -0700 (PDT) Received: from localhost.localdomain (li1181-92.members.linode.com. [45.79.82.92]) by smtp.gmail.com with ESMTPSA id l15-v6sm29051710pfg.88.2018.06.17.22.10.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 17 Jun 2018 22:10:31 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mike Leach , Robert Walker , Kim Phillips Cc: Leo Yan Subject: [PATCH v1 0/6] perf cs-etm: Fix tracing packet handling and minor refactoring Date: Mon, 18 Jun 2018 13:09:53 +0800 Message-Id: <1529298599-3876-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 Due the current code is missing to handle cs-etm start tracing packet and CS_ETM_TRACE_ON packet, we fail to generate branch sample for them. This patch series is to fix cs-etm tracing packet handling: Patch 0001 is to add invalid address macro for readable coding; Patch 0002 is one minor fixing to return error code for instruction sample failure; Patches 0003~0006 are fixing patches for start tracing packet and CS_ETM_TRACE_ON packet. This patch series is applied on acme tree [1] on branch perf/core with latest commit: e238cf2e3d2e ("perf intel-pt: Fix packet decoding of CYC packets"). Also applied successfully this patch series on Linus tree on 4.18-rc1. This patch series has been verified on Hikey620 platform with below two commands: perf script --itrace=i10000il128 -F cpu,event,ip,addr,sym -k ./vmlinux perf script -F cpu,event,ip,addr,sym -k ./vmlinux [1] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git Leo Yan (6): perf cs-etm: Introduce invalid address macro perf cs-etm: Bail out immediately for instruction sample failure perf cs-etm: Fix start tracing packet handling perf cs-etm: Support dummy address value for CS_ETM_TRACE_ON packet perf cs-etm: Generate branch sample when receiving a CS_ETM_TRACE_ON packet perf cs-etm: Generate branch sample for CS_ETM_TRACE_ON packet tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 10 ++-- tools/perf/util/cs-etm-decoder/cs-etm-decoder.h | 1 + tools/perf/util/cs-etm.c | 71 +++++++++++++++++++++---- 3 files changed, 68 insertions(+), 14 deletions(-) -- 2.7.4