lkml.org 
[lkml]   [2015]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] perf: Fallback to JIT support for mmap'd non-ELF binaries.
Date
From: Peter Zijlstra <peterz@infradead.org>
Sent: Thursday, November 19, 2015 11:31 AM
To: Brian Robbins
Cc: Ingo Molnar; Arnaldo Carvalho de Melo; linux-kernel@vger.kernel.org; Stephane Eranian
Subject: Re: [PATCH] perf: Fallback to JIT support for mmap'd non-ELF binaries.

> On Thu, Nov 19, 2015 at 11:09:07AM -0800, Brian Robbins wrote:
> > Programs can execute code contained in files that don't conform
> > to the ELF standard. This is common for cross-platform runtimes
> > that support ahead-of-time compilation. In this case, perf is
> > unable to resolve addresses to symbolic names, as the format of
> > the mmap'd file is unknown to perf.

> I'm assuming you're using PECOFF? Why not teach perf to read those?

> Surely there's a library that can parse that stuff, it seems to me Wine
> for one needs fairly decent support for this, also GDB (and other
> toolchain bits) on Windows targets.

> Its just that I was hoping we could move towards getting rid of those
> /tmp files now that we have much better JIT support.

Hi Peter,

Thank you for the feedback. The file format is similar to PE, but is not identical. So, we would be implementing something very scoped, which doesn't feel right to me.

I am interested in the new JIT support, however my understanding from the information that I've read is that it requires kernel support in 4.x, though I can't seem to find where I read that. I want to make sure that this works on older kernels (3.x) as well.

The reason I went with this approach is because it is simple for runtimes to implement and has no requirement that perf understand the file format. I am open to feedback if there is a preferred solution that would still work for older kernels as well.

Thanks.
-Brian

\
 
 \ /
  Last update: 2015-11-20 01:01    [W:1.426 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site