From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755342AbbJAJR6 (ORCPT ); Thu, 1 Oct 2015 05:17:58 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:34509 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752701AbbJAJR4 (ORCPT ); Thu, 1 Oct 2015 05:17:56 -0400 Date: Thu, 1 Oct 2015 11:17:36 +0200 From: Peter Zijlstra To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, acme@redhat.com, mingo@elte.hu, ak@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, cel@us.ibm.com, dsahern@gmail.com, adrian.hunter@intel.com, johnmccutchan@google.com, brendan.d.gregg@gmail.com Subject: Re: [PATCH v7 0/4] perf: add support for profiling jitted code Message-ID: <20151001091736.GO2881@worktop.programming.kicks-ass.net> References: <1443681949-6534-1-git-send-email-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443681949-6534-1-git-send-email-eranian@google.com> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > 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 for doing this.