>>> Hi Ian,
>>>
I tried this as well with latest perf/core. The difference is that
>>> unresolved addresses currently look like:
>>>
>>> 0.00% java [JIT] tid 221782 [.] 0x451499a4
>>> 0.00% java [JIT] tid 221782 [.] 0x4514f3e8
>>
>/tmp/perf/perf record -k 1 -e cycles:u -o /tmp/perf.data java
>-agentpath:/tmp/perf/libperf-jvmti.so -XX:+PreserveFramePointer
>-XX:InitialCodeCacheSize=20M -XX:ReservedCodeCacheSize=1G -jar
>dacapo-9.12-bach.jar jython
Its also possible the `InitialCodeCacheSize=20M` argument is masking the
> I've been trying variants of:
>
> Before:
>/tmp/perf/perf record -k 1 -e cycles:u -o /tmp/perf.data java
>-agentpath:/tmp/perf/libperf-jvmti.so -XX:+PreserveFramePointer
>-XX:InitialCodeCacheSize=20M -XX:ReservedCodeCacheSize=1G -jar
>dacapo-9.12-bach.jar jython /tmp/perf/perf inject -i /tmp/p
>> ** Implemented solution
>>
>> This patch solves the issue by removing // anon mmap events for any
>> process which has a valid jit-.dump file.
>>
>> It tracks on a per process basis to handle the case where some running
>> apps support jit-.dump, but some only support perf-.map.
>>
>> It adds
From: Steve MacLean
**perf-.map and jit-.dump designs:
When a JIT generates code to be executed, it must allocate memory and
mark it executable using an mmap call.
*** perf-.map design
The perf-.map assumes that any sample recorded in an anonymous
memory page is JIT code. It then tries to
From: Steve MacLean
While a JIT is jitting code it will eventually need to commit more pages and
change these pages to executable permissions.
Typically the JIT will want these colocated to minimize branch displacements.
The kernel will coalesce these anonymous mapping with identical
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: 2657983b4c0d81632c6a73bae469951b0d341251
Gitweb:
https://git.kernel.org/tip/2657983b4c0d81632c6a73bae469951b0d341251
Author:Steve MacLean
AuthorDate:Sat, 28 Sep 2019 01:53:08
Committer
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: ee212d6ea20887c0ef352be8563ca13dbf965906
Gitweb:
https://git.kernel.org/tip/ee212d6ea20887c0ef352be8563ca13dbf965906
Author:Steve MacLean
AuthorDate:Sat, 28 Sep 2019 01:39:00
Committer
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: b59711e9b0d22fd47abfa00602fd8c365cdd3ab7
Gitweb:
https://git.kernel.org/tip/b59711e9b0d22fd47abfa00602fd8c365cdd3ab7
Author:Steve MacLean
AuthorDate:Sat, 28 Sep 2019 01:41:18
Committer
From: Steve MacLean
While a JIT is jitting code it will eventually need to commit more pages and
change these pages to executable permissions.
Typically the JIT will want these colocated to minimize branch displacements.
The kernel will coalesce these anonymous mapping with identical
> looks like Andi is right, I'm still getting malformed patch error
> the patch has extra characters '=20' and broken lines, like:
My apologies, I was trying to get by with an inappropriate mailer.
I have an sendmail account now, and will resend.
how-mmap-events | grep '//anon'
Repro:
This issue was discovered while testing the initial CoreCLR jitdump
implementation. https://github.com/dotnet/coreclr/pull/26897.
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Mark Rutland
Cc: Alexander Shishkin
Cc: Ji
SNIP
> I can't apply this one:
> patching file builtin-inject.c
> Hunk #1 FAILED at 263.
> 1 out of 1 hunk FAILED -- saving rejects to file builtin-inject.c.rej
I assume this is because I based my patches on the wrong tip.
> patching file util/jitdump.c
> patch: malformed patch at line 23
value. Specify that
the reader uses the value to detect endian mismatches.
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Mark Rutland
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Steve MacLean
how-mmap-events | grep '//anon'
Repro:
This issue was discovered while testing the initial CoreCLR jitdump
implementation. https://github.com/dotnet/coreclr/pull/26897.
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Mark Rutland
Cc: Alexander Shishkin
Cc: Ji
e.
Make both records emit the same filename based on the full 64 bit
code_index field.
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Mark Rutland
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Cc: linux-kernel@vger.kernel.org
Signed-off-by:
e [unknown] symbols were resolved.
Tested-by: Brian Robbins
Cc: Peter Zijlstra
Cc: Ingo Molnar
Cc: Arnaldo Carvalho de Melo
Cc: Mark Rutland
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Steve MacLean
---
tools/
>> An earlier version of this patch used:
>> after->start = map->end;
>> +after->pgoff += map->end - pos->start;
>>
>> Instead of the newer Functionally equivalent:
>> after->start = map->end;
>> +after->pgoff = pos-
>> after->start = map->end;
>> +after->pgoff = pos->map_ip(pos, map->end);
>
> So is this equivalent to what __split_vma() does in the kernel, i.e.:
>
>if (new_below)
>new->vm_end = addr;
>else {
>new->vm_start
symbol name resolution for any ip in the
after region.
Make maps__fixup_overlappings() correctly populate map.pgoff.
Add an assert that new mapping matches old mapping at the beginning of
the after map.
Signed-off-by: Steve MacLean
---
tools/perf/util/map.c | 3 +++
1 file changed, 3 insertions
20 matches
Mail list logo