From patchwork Tue Feb 9 09:58:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 12077641 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=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 8402FC433E0 for ; Tue, 9 Feb 2021 10:00:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C1AE64EC3 for ; Tue, 9 Feb 2021 10:00:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C1AE64EC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=wLTgZoHkaOOSacfthu7meT61Qv5sFDYNum72cQePLkM=; b=aee/yoV3yiSbxo1er2gPGL/QHg PMsJ/LY2VYENc+pXg3hbSoQk/7NYXsQ9m+CPKs9WnP/42i5SXRG2sblXl0TkSAtKRDrDAOnKrx7rn L6GROSwjjilLA1h9uPnEVS8KPSh+KuqdDwZEeirOkwn391nRlxf3ecuNWJOFLX0nOUM5x1g1v5Ef2 QyHDHuXhh04de52I2f8YMzHni1Yx6vUO+9PWfNFUJUDxMKTVW8MIYDFgcH2O0FmTAygbVmShG0xva pcYZ37cX8RChvpWooDrD82HKO6zqFb/l8DetJt3ZASE6m8Azfve3wc5WDITZCOwt5QURcDwde2/9i pDOYiSXA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9Pnl-0001lm-4e; Tue, 09 Feb 2021 09:59:21 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9Pnh-0001kb-VG for linux-arm-kernel@lists.infradead.org; Tue, 09 Feb 2021 09:59:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ACF09101E; Tue, 9 Feb 2021 01:59:15 -0800 (PST) Received: from e121896.arm.com (unknown [10.57.44.191]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3118B3F73B; Tue, 9 Feb 2021 01:59:11 -0800 (PST) From: James Clark To: coresight@lists.linaro.org Subject: [RFC PATCH 0/5] Split Coresight decode by aux records Date: Tue, 9 Feb 2021 11:58:52 +0200 Message-Id: <20210209095857.28419-1-james.clark@arm.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210209_045918_062550_488F18F9 X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , branislav.rankov@arm.com, al.grant@arm.com, denik@chromium.org, Mathieu Poirier , Alexander Shishkin , Jiri Olsa , John Garry , linux-kernel@vger.kernel.org, James Clark , Leo Yan , Namhyung Kim , Will Deacon , linux-arm-kernel@lists.infradead.org, Mike Leach Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The following patches fix opening perf.data files that have timestamps (ordered data), aren't recorded with --per-thread, and that have discontinuous data in a single aux trace buffer. I have some open questions: * Can cs_etm__update_queues() be removed from cs_etm__flush_events()? * Why does the second commit start making some files process correctly? * Is it ok to wait for the flush to start processing? Previously processing happened when the first aux record was delivered to cs_etm__process_event(). * Do the aux records need to be saved into a new buffer or can they be pulled from elsewhere? I also have some further changes to make to make per-thread mode work where the cpu field of the sample is set to -1. And when there are no timestamps cs_etm__process_timeless_queues() is used, which is a completely different code path. Thanks James James Clark (5): perf cs-etm: Split up etm queue setup function perf cs-etm: Only search timestamp in current sample's queue. perf cs-etm: Save aux records in each etm queue perf cs-etm: don't process queues until cs_etm__flush_events perf cs-etm: split decode by aux records. tools/perf/util/cs-etm.c | 200 +++++++++++++++++++++++---------------- 1 file changed, 121 insertions(+), 79 deletions(-)