Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1476102ybi; Thu, 30 May 2019 18:47:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDehFS2XLls7iWoRagtxccHnEqOlOIJ8AWW1I8Hmw4zu1FlLnpdGvfS9S9GOvcuGuZ/5XD X-Received: by 2002:a17:902:e104:: with SMTP id cc4mr6586914plb.254.1559267236949; Thu, 30 May 2019 18:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559267236; cv=none; d=google.com; s=arc-20160816; b=OStwrE+WHIcFdm4zGRmQzwH0ZkMvOSnP6WH8hBGdqNpLxlTPLO/ifsCTG9PdoEbDzE IoSgqrQSAbHmIfTVqjCWhGkzm+hX6bT0jKoss3m59u4k0/O0aCvRL+H5EQa6oi2bw2yb Vgf0ilxwlVXqk/uPQ6+CWa1oTDwc8K3aqC7O7O5SC9vLAxYgVJTyEVDBRb0OmS/EcBlI 1DFU4X6iiqm1FPB8p7I6PXvTWElg8NJL+s4PJaOY6zyhhwyUa0Ks/XXM4Nyi2Bs65Re+ vKKUuvEexohI9RnXz6d2BS3LMdD/Zfn3D6kaKxqEEk3soXn+aO3Pg6vDkoLViKgtmaMC aywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1kzmeVVPqkiMo/xI5ELAii6GxtReXpmBzBpH3mrY8QU=; b=fXb9jrFwkaZF5wQAUNFDHguJudU9LnwBuRF0L27zTG5g/0uqaIJLCLUWMQ/BDvRPdg 0H2fOA7gps4ULadlpRnshqLTH5YaotSsDX4txwYvd6JbbmH/BFd7D9xsjR+TCMQIFXW0 8RcCRKRTk01PHqEi0G+TTpN3dcjy/bQ4ihTjg87yO72Xa80v6u3kDeRl9+y66TJq+WfP yEVOvR0mKamvYKhVSo9/8rdyF+z8LHpahefW2hUeACpOhHwM6fmfDUDO6F7xCzcwcz0v ibAcPsTPOr18Uiwlo3ay8fDpa3Mhh2z1MwGQFAocsth+Z70G0pRl3EJBeUMn+bkxYTpa 8qNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JnWtYVGH; 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 r25si3994224pgb.439.2019.05.30.18.47.00; Thu, 30 May 2019 18:47: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=JnWtYVGH; 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 S1726728AbfEaBpq (ORCPT + 99 others); Thu, 30 May 2019 21:45:46 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46462 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726576AbfEaBpq (ORCPT ); Thu, 30 May 2019 21:45:46 -0400 Received: by mail-ot1-f65.google.com with SMTP id j49so7594991otc.13 for ; Thu, 30 May 2019 18:45:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=1kzmeVVPqkiMo/xI5ELAii6GxtReXpmBzBpH3mrY8QU=; b=JnWtYVGH0MFiUg+7spw56SogTuH9sew5/6iuwbW1odSs5B/8yLAMh+Noi5XLF8Qts3 B+j9J29T2N0pVYGuMcnd9+s24dbSagFCVD1TwJHj5mrL2IOcoR1ZxWf8BkZza+PLwRCd YbxipGZyJV3h/9fVfBXeU8ZrATwVF9Epm0gWFrEv96de2Z+PMnc8sY7ZKQoZMsKZ0t1v 3WYtwJBtAZcy2osKwkklfLnCOQL5xFHRiR3x1Q2dkOFJKaMUTapHODEYnnGXoFz1ZoGF eLJJg0jth+9D5EXrdoHrGLOar4Gcy8ebtgknbk4wuXi8k/m4qYpCQ3A/YKTKdwpuuvt4 bTwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=1kzmeVVPqkiMo/xI5ELAii6GxtReXpmBzBpH3mrY8QU=; b=R+vlP8FpTbpquLzj38/aFrtxsKg5fxJJ3kx9Y/Is6GpOdAku5wNsYUbUouSFuOeyfq YP8M5whZbZvKNrgWxCOVxiOLDopFMXO7j4JKwTTjNz6iBxtrJqnIx50cRkAzMVLoDgZ7 bFqydHRmB+JuKiXJIKRzdbd0wZpD7z525qp7BkQUOO7d3BjvWH8solVB0/52G5MrzfK7 s8/+ac0VKDabI8XGOOT1oxYdQwOuWrtoZLBMh8nxiMSaNNmpnNrRCh0b6W2WjeeMyvsQ OAMMTIp80fHPT4lIdO1AKccpDV41hZEbUvjM984gxH2NJSVKKSKgjET75xoKJuKLAJ4w xHbg== X-Gm-Message-State: APjAAAVhRSLOHt0R0ZBYW1g47uig7NynhxTDK0YtChAuVumuJoWGPflh KsFcZ6kl15tDvXv2Xy+qZcbT3Q== X-Received: by 2002:a9d:7c85:: with SMTP id q5mr4621731otn.31.1559267145525; Thu, 30 May 2019 18:45:45 -0700 (PDT) Received: from leoy-ThinkPad-X240s (li808-42.members.linode.com. [104.237.132.42]) by smtp.gmail.com with ESMTPSA id n2sm1525287otl.7.2019.05.30.18.45.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 May 2019 18:45:43 -0700 (PDT) Date: Fri, 31 May 2019 09:45:34 +0800 From: Leo Yan To: Mathieu Poirier Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, suzuki.poulose@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Subject: Re: [PATCH v2 00/17] perf tools: Coresight: Add CPU-wide trace support Message-ID: <20190531014534.GA5121@leoy-ThinkPad-X240s> References: <20190524173508.29044-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190524173508.29044-1-mathieu.poirier@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 11:34:51AM -0600, Mathieu Poirier wrote: > 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 ] I have tested this patch set on Juno and DB410c boards, FWIW: Tested-by: Leo Yan > 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 >