From patchwork Wed Jul 11 07:45:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 141682 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp4803393ljj; Wed, 11 Jul 2018 00:46:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcmrQbpUwHRZsZrn7m1h/m5WyO4jh/9cKXWplJfL8JRK278CvQO9e/aotaGWvweKU/OaEB4 X-Received: by 2002:a17:902:bf0b:: with SMTP id bi11-v6mr27101619plb.25.1531295176466; Wed, 11 Jul 2018 00:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531295176; cv=none; d=google.com; s=arc-20160816; b=JHDc2jWowdZY3COZUIhiogyPRCX568AJ42LLTQ2FZKxg6KkW51oLmn8MzmpE9nEnGp WG26f4dEUNPtOb1VZZdNzjP5QG8m7ygWW+8gr525eYSZwwMq8S3//mjTMo5oiuhK549i DIk8On6TPbleBjUacomTaE3vZdX7TLmQ5x1zMcoMvDfHqBrUArcwepsLsOpfUYF3HyFT DXzt4g86ujaMYRDEOhGRgoZZSXSETUKGWfUerEtZYkoWUbN6RY/Y0qJ8oS/qh+bRTyVj V+LyaBW128B4LBzz031yge3ua+QU8dFE0yRHpp1xSqyBIGzJi9VGyi7yEgTlhIoGk0Cu Vzaw== 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=+eJSGIhaEeunDTeFMdqnAm1Tmh4ORKRMaDAXSv12rXI=; b=GnYtdzDdb/dmg5j8Uk3JbKXLxR4oXnyi9kMW1cSk5mfH5b2cLdgXbdLYUIIiOhCqYA vVU+VoCh4EzTHD+SKPowZEQQDyKF/6lmMMH2QHgzYl3evhdU+3v1MBnccN2w9pbQLfet 4t4EtIrxZecUuzSg4MyAZ/hVu1u7UoA/aATKdXH0juX8uhx8ul3Xo78BnMEkDwoBd7wS z/uX+t2ty/MW+sS64dBvj54OauQcFiGUCgpvFI+/j1piWGNQce8v8rVi7SE4eBWd9BKq ky6FrbF/V6ra4mkUCMrVn0ECdTrHQbiiQrwiwgOqAHqJj7Q8zizgtaBKx9Bzj0J2MS0n 5a4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V8lt5oap; 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 d64-v6si19334521pfc.31.2018.07.11.00.46.16; Wed, 11 Jul 2018 00:46:16 -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=V8lt5oap; 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 S1726472AbeGKHtL (ORCPT + 22 others); Wed, 11 Jul 2018 03:49:11 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33365 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726205AbeGKHtK (ORCPT ); Wed, 11 Jul 2018 03:49:10 -0400 Received: by mail-pf0-f193.google.com with SMTP id b17-v6so17880012pfi.0 for ; Wed, 11 Jul 2018 00:46:13 -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=+eJSGIhaEeunDTeFMdqnAm1Tmh4ORKRMaDAXSv12rXI=; b=V8lt5oapV8uMZpW+uuQOGPTPSPELgstXNzxAZZoEWnTqsqIlZr5AWUsV2EcpwqacYZ zvOpsEvuIHTsPwDDU75Jbxu4PMMLchx59Qc1lHW5vjPSMXzDW3sVPs0wvzY7EsqocCDH T5DQ/OEqHKPRyj7/K9Xuy9oGA/G+J1XwS1yJY= 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=+eJSGIhaEeunDTeFMdqnAm1Tmh4ORKRMaDAXSv12rXI=; b=A7qRqUrs+tuQv+wND5JH17U+N8/95VxktBr6yJZUc486Eif9j5cE8gQDiO0bP45uy0 MZ1Sv1rnp74JUsxkG6PvvsbiWn6jQnDyv35/J6CHhgXW4TcEec3g0FJOQSDacRgOiV5Q 2VoSP7pMiziuoN2y47vomjGVMlxz36SxDNr2iByW7GBRnGjqF+fiR4oSAuMIlk+j7yD4 7Xnnd6MVkV/pfWOaTxOjG8F0dqRMHWT1Q5yA+STb/LvT3VnvN25QC81CpqBDij+EEkqU NzUlsQBDwmS4kVcZJ94QVDM86a/uFTc9KZg/4prL2DQMRq3tFUEDN4dxKVi1d+Ek6gp5 zYnA== X-Gm-Message-State: APt69E0exOJHCMicFYQYkGE9Wfn9Cq6bxnMVNqo3B9p3YnGEB+DwBJ/M 148J6o5wp/xpPO8OpNZMLSvZ1g== X-Received: by 2002:aa7:82d9:: with SMTP id f25-v6mr28717815pfn.218.1531295172867; Wed, 11 Jul 2018 00:46:12 -0700 (PDT) Received: from localhost.localdomain (li1192-169.members.linode.com. [45.79.93.169]) by smtp.gmail.com with ESMTPSA id 16-v6sm9260374pfp.6.2018.07.11.00.46.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jul 2018 00:46:12 -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 v2 0/6] perf cs-etm: Fix tracing packet handling and minor refactoring Date: Wed, 11 Jul 2018 15:45:39 +0800 Message-Id: <1531295145-596-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 to Linus tree on 4.18-rc4 with latest commit: 1e09177acae3 ("Merge tag 'mips_fixes_4.18_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux"). 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 Changes from v1: * Rebased on Linus mainline kernel 4.18-rc4; * Added Mathieu 'reviewed' tags in patches. 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