Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753869AbbBRRcB (ORCPT ); Wed, 18 Feb 2015 12:32:01 -0500 Received: from mail-we0-f182.google.com ([74.125.82.182]:41309 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753529AbbBRRbu (ORCPT ); Wed, 18 Feb 2015 12:31:50 -0500 Date: Wed, 18 Feb 2015 18:31:45 +0100 From: Ingo Molnar To: Stephane Eranian Cc: linux-kernel@vger.kernel.org, acme@redhat.com, peterz@infradead.org, mingo@elte.hu, ak@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, cel@us.ibm.com, sukadev@linux.vnet.ibm.com, sonnyrao@chromium.org, johnmccutchan@google.com, dsahern@gmail.com, adrian.hunter@intel.com, pawell.moll@arm.com, Pekka Enberg Subject: Re: [PATCH v2 0/4] perf: add support for profiling jitted code Message-ID: <20150218173145.GB31174@gmail.com> References: <1424280109-9801-1-git-send-email-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424280109-9801-1-git-send-email-eranian@google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2599 Lines: 70 * Stephane Eranian wrote: > The current support only works when the runtime is > monitored from start to finish: perf record java > --agenpath:libpfmjvmti.so my_class. Could we add '--agenpath:libpfmjvmti.so' automatically if a binary called 'java' is recorded? ( With a --nojavajit flag to not do that, should someone feel like having a 'java' executable that doesn't accept the --agenpath flag, or so? Assuming the major JVMs accept the --agenpath flag. ) > Once the run is completed, the jitdump file needs to be > injected into the perf.data file. This is accomplished by > using the perf inject command. This will also generate an > ELF image for each jitted function. The inject MMAP > records will point to those 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. So it would be nice if this part was automatic, i.e. if I could just profile a java run with the regular perf profiling flow. > The reporting is unchanged, simply invoke perf report or > perf annotate on the modified perf.data file. The jitted > code will appear symbolized and the assembly view will > display the instruction level profile! > > As an added bonus, the series includes support for > demangling function signature from OpenJDK. Cool! > Furthermore, we believe there is a way to skip the perf > inject phase and have perf report/annotate directly > inject the MMAP records on the fly during processing of > the perf.data file. Perf report would also generate the > ELF files if necessary. Such optimization, would make > using this extension seamless in system-wide mode and > larger environments. This will be added in a later update > as well. I think angling for seemless operation is really important. > To use the new feature: > - compile and install the perf_posix_clock.ko module: > - make modules (say M to PERF_CLOCK config option) > - make modules_install; > - modprobe perf_posix_clock > - dmesg should say: perf_clock clock registered > - compile perf > - cd tools/perf/jvmti; make; install wherever is appropriate Will 'make -C tools/perf install' DTRT, or is the last step needed separately? Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/