From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751832AbdG1NrE convert rfc822-to-8bit (ORCPT ); Fri, 28 Jul 2017 09:47:04 -0400 Received: from barracuda.ebox.ca ([96.127.255.19]:37157 "EHLO barracuda.ebox.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbdG1NrD (ORCPT ); Fri, 28 Jul 2017 09:47:03 -0400 X-Greylist: delayed 957 seconds by postgrey-1.27 at vger.kernel.org; Fri, 28 Jul 2017 09:47:03 EDT X-ASG-Debug-ID: 1501248659-0c856e65d42ae2df0001-xx1T2L X-Barracuda-Envelope-From: gbastien@versatic.net X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Message-ID: <597B3C92.7020607@versatic.net> X-Barracuda-RBL-IP: 192.168.69.101 Date: Fri, 28 Jul 2017 09:30:58 -0400 From: Genevieve Bastien User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: Jiri Olsa CC: linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Mathieu Desnoyers , Julien Desfossez , Francis Deslauriers , Jiri Olsa Subject: Re: [PATCH 1/3] perf tools: Add callchain to ctf conversion References: <20170727181205.24843-1-gbastien@versatic.net> <20170728092550.GE23238@krava> X-ASG-Orig-Subj: Re: [PATCH 1/3] perf tools: Add callchain to ctf conversion In-Reply-To: <20170728092550.GE23238@krava> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8BIT X-Barracuda-Connect: smtp.electronicbox.net[96.127.255.82] X-Barracuda-Start-Time: 1501248659 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2895 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.41408 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/28/2017 05:25 AM, Jiri Olsa wrote: > On Thu, Jul 27, 2017 at 02:12:03PM -0400, Geneviève Bastien wrote: >> The field perf_callchain, if available, is added to the sampling >> events during the CTF conversion. It is an array of u64 values. >> The perf_callchain_size field contains the size of the array. >> >> It will allow the analysis of sampling data in trace visualization tools >> like Trace Compass. Possible analyses with those data: dynamic >> flamegraphs, correlation with other tracing data like a userspace trace. >> >> Here follows a babeltrace CTF output of a trace with callchain: >> >> $ babeltrace ./myctftrace >> [17:38:45.672760285] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 7, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6 ] } >> [17:38:45.672777672] (+0.000017387) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 1, perf_callchain_size = 8, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770, [3] = 0xFFFFFFFF81006EC6, [4] = 0xFFFFFFFF8118245E, [5] = 0xFFFFFFFF810A9224, [6] = 0xFFFFFFFF8164A4C6, [7] = 0xFFFFFFFF8164ABAD ] } >> [17:38:45.672786700] (+0.000009028) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81063EE4, perf_tid = 25841, perf_pid = 25774, perf_period = 70, perf_callchain_size = 3, perf_callchain = [ [0] = 0xFFFFFFFFFFFFFF80, [1] = 0xFFFFFFFF81063EE4, [2] = 0xFFFFFFFF8100C770 ] } > missing one more hunk (attached) ;-) > > I guess there's no need to resend, Arnaldo could remove it, > anyway for patchset: > > Acked-by: Jiri Olsa Thanks Jiri, > Is there already tracecompas change to display callchains and mmaps? Almost, it is still a patch on gerrit [1] and missing a few features, like symbol resolution, but we plan to have it released in the coming weeks. Regards, Geneviève [1] https://git.eclipse.org/r/#/c/102015/ > > thanks, > jirka > > > --- > diff --git a/tools/perf/util/data-convert-bt.c b/tools/perf/util/data-convert-bt.c > index c47b0943ef88..2346cecb8ea2 100644 > --- a/tools/perf/util/data-convert-bt.c > +++ b/tools/perf/util/data-convert-bt.c > @@ -596,7 +596,6 @@ static int add_generic_values(struct ctf_writer *cw, > * PERF_SAMPLE_TIME - not needed as we have it in > * ctf event header > * PERF_SAMPLE_READ - TODO > - * PERF_SAMPLE_CALLCHAIN - TODO > * PERF_SAMPLE_RAW - tracepoint fields are handled separately > * PERF_SAMPLE_BRANCH_STACK - TODO > * PERF_SAMPLE_REGS_USER - TODO