[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABPqkBRD1eNEn1oexFTBApM5YJBrPx9HAA4LczX9P=31dPnf_g@mail.gmail.com>
Date: Sun, 4 Oct 2015 12:52:13 -0700
From: Stephane Eranian <eranian@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
"mingo@...e.hu" <mingo@...e.hu>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Rose Belcher <cel@...ibm.com>, David Ahern <dsahern@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
John Mccutchan <johnmccutchan@...gle.com>,
Brendan Gregg <brendan.d.gregg@...il.com>
Subject: Re: [PATCH v7 0/4] perf: add support for profiling jitted code
Hi Peter,
On Thu, Oct 1, 2015 at 2:17 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Thu, Oct 01, 2015 at 08:45:44AM +0200, Stephane Eranian wrote:
>> This patch series extends perf record/report/annotate to enable
>> profiling of jitted (just-in-time compiled) code. The current
>> perf tool provides very limited support for profiling jitted
>> code for some runtime environments. But the support is experimental
>> and cannot be used in complex environments. It relies on files
>> in /tmp, for instance. It does not support annotate mode or
>> rejitted code.
>>
>> This patch series adds a better way of profiling jitted code
>> with the following advantages:
>> - support any jitted code environment (some with modifications)
>> - support Java runtime with JVMTI interface with no modifications
>> - provides a portable JVMTI agent library
>> - known to support V8 runtime
>> - known to support DART runtime
>> - supports code rejitting and code movements
>> - no files in /tmp
>> - meta-data file is unique to each run
>> - no changes to perf report/annotate
>> - support per-thread and system-wide profiling
>> - support monitoring of multiple simultaneous Jit runtimes
>> - source level view in perf annotate
>>
>> The support is based on cooperation with the runtime. For Java runtimes,
>> supporting the JVMTI interface, there is no change necessary. For other
>> runtimes, modifications are necessary to emit the meta-data to support
>> symbolization, annotation, source lines correlation of the samples.
>> Those modifications are relatively straighforward, some have been
>> implemented in V8 and DART.
>
> Do V8 and DART come with these bits or will that be a future
> contribution?
>
I think both had this working some time ago. I have not had a chance to
verify if this new version still works. I did not change the format of
the jitdump
file, so if they use the same clock source for their timestamp as perf
record, it
should still work. All of this hinges on the fact that V8 & DART developers run
with 4.1 to get your clock changes.
>> This will also generate an ELF image for each jitted function. The
>> injected MMAP records will point to these ELF images. The reasoning
>> behind using ELF images is that it makes processing for perf report
>> and annotate automatic and transparent. It also makes it easier to
>> package and analyze on a remote machine. Binutils tools can decode
>> the ELF images easily.
>
> The generation of ELF files is really nice!
>
> All in all this looks really nice.
>
Thanks!
> Thanks for doing this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists