From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,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 E6089C072B5 for ; Fri, 24 May 2019 17:35:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B736221850 for ; Fri, 24 May 2019 17:35:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XHmdTsjR" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391295AbfEXRfL (ORCPT ); Fri, 24 May 2019 13:35:11 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:43775 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391077AbfEXRfK (ORCPT ); Fri, 24 May 2019 13:35:10 -0400 Received: by mail-pg1-f193.google.com with SMTP id f25so5410123pgv.10 for ; Fri, 24 May 2019 10:35:10 -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=2HZ3k/jKy00KtbnPh50IWBP9tRSwh/NwMqnQ0RiJHoo=; b=XHmdTsjRZxyWcl0BiESRKUpcITtgnfIFNSwhltWBUaPNXOip2l2vafL53RMN4o1OWT 8XihDlq4nPB/anHG9dwBFN3wi3oJkG4a2ozumVpgWfzg2kH5nq1rQ6jN1+Ni6hRaZY81 Y8MeIMQZqqZtY4EcXgZNbHgHf9El7bHoyUVHtxLadzognn/Yhq6a6MEbcn0mZUp+Mtge FL9KNFQBjEaGPWRMxIUi9CDJVLM1S8MZcJMjnPCVb1y/wfjzWano9pBzCAbUOpWn8Dah Ra+IdFuHgC4urm3MUsgbyVA8bAIMQgDXs1UzFvTjsvdw/35zMTrQ5ssImr6HmdfpEC3i h16w== 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=2HZ3k/jKy00KtbnPh50IWBP9tRSwh/NwMqnQ0RiJHoo=; b=JUausZr69+n4r0PBCkIWLdVWN84hY9dqSBUaOAb2c5GppbtUnfKT+jPwsGCIERMZAR LYlG29KqF6og+fK1B4SzFpEXd+G+TtqirPsTyQWdx4iv8I/euU2mZnTQ+Eiutb7p/vuR Fx+EwbMxdW4HNYaQ7BY4QS+pzhz3/fdh97UleP0WtE/B5wK22x1f9XkyrACxog3N5YZa ElbdC02KEqBl+miQnVZYGAcxt9vxgbM5Lmj7u/rDS+Y+uHpVWRit8O6lVgckSj3Lvr8u ejIh01wQH3p+Vewtha/xe/FWEUuz3+/DEzCrPdgxiwmiAgzAymPiLU+ssRbXPlp11/Cu E4Dg== X-Gm-Message-State: APjAAAW2MGTfd1Zr3J9AZCHz7V06bEwcpHE2A8FylGbCYTxyDb0V0C8j 4EWHkpHy16cy413xcVO97BBRhw== X-Google-Smtp-Source: APXvYqw4pqYeVUQhf+zsUte6EUAM6fXmVy1JUE+SB56WGUiuCq2CqFVrEnXr9G07yqmTZ1HeUC4tqg== X-Received: by 2002:a17:90a:36d0:: with SMTP id t74mr10774523pjb.4.1558719309972; Fri, 24 May 2019 10:35:09 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id k13sm2809575pgr.90.2019.05.24.10.35.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 10:35:09 -0700 (PDT) From: Mathieu Poirier To: acme@kernel.org Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, suzuki.poulose@arm.com, leo.yan@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: [PATCH v2 00/17] perf tools: Coresight: Add CPU-wide trace support Date: Fri, 24 May 2019 11:34:51 -0600 Message-Id: <20190524173508.29044-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset adds support for CoreSight CPU-wide trace scenarios. More specifically it extends the work that was done for per thread scenarios to handle more than a single trace ID. It also temporally correlate traces based on timestamp generated by the tracers so that rendering by the perf mechanic is ordered. Everything is based on Arnaldo's perf/core branch (46d4c9a05285). I will send another revision when it is rebased to a 5.2 rc candidate. Before this set: # root@juno:/home/linaro# perf record -e cs_etm/@20070000.etr/ -C 2,3 sleep 1 failed to mmap with 12 (Cannot allocate memory) After this set: # root@juno:/home/linaro# perf record -e cs_etm/@20070000.etr/ -C 2,3 sleep 1 [ perf record: Captured and wrote 1.352 MB perf.data ] Regards, Mathieu Changes for V2: * Fixed error condition in function cs_etm_set_option() (Leo) * Fixed changelog spelling error (Leo). * Moved from calloc() to malloc() in cs_etm__etmq_get_traceid_queue() * Got rid of CS_ETM_PACKET_QUEUE_NR macro * Fixed indentation problem in function cs_etm__process_traceid_queue() (Leo). Mathieu Poirier (17): perf tools: Configure contextID tracing in CPU-wide mode perf tools: Configure timestsamp generation in CPU-wide mode perf tools: Configure SWITCH_EVENTS in CPU-wide mode perf tools: Add handling of itrace start events perf tools: Add handling of switch-CPU-wide events perf tools: Refactor error path in cs_etm_decoder__new() perf tools: Move packet queue out of decoder structure perf tools: Fix indentation in function cs_etm__process_decoder_queue() perf tools: Introduce the concept of trace ID queues perf tools: Get rid of unused cpu in struct cs_etm_queue perf tools: Move thread to traceid_queue perf tools: Move tid/pid to traceid_queue perf tools: Use traceID aware memory callback API perf tools: Add support for multiple traceID queues perf tools: Linking PE contextID with perf thread mechanic perf tools: Add notion of time to decoding code perf tools: Add support for CPU-wide trace scenarios tools/perf/Makefile.config | 3 + tools/perf/arch/arm/util/cs-etm.c | 186 ++- .../perf/util/cs-etm-decoder/cs-etm-decoder.c | 269 +++-- .../perf/util/cs-etm-decoder/cs-etm-decoder.h | 39 +- tools/perf/util/cs-etm.c | 1026 +++++++++++++---- tools/perf/util/cs-etm.h | 103 ++ 6 files changed, 1252 insertions(+), 374 deletions(-) -- 2.17.1