* Why the distinction between regular anon regions and hugepage anon regions for PERF_RECORD_MMAP entries?
@ 2015-01-10 3:27 William Cohen
2015-01-13 15:30 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: William Cohen @ 2015-01-10 3:27 UTC (permalink / raw)
To: linux-perf-users
Hi All,
Earlier this week I was examining why operf was not properly mapping samples from anonymous regions to Java methods when the JVM was using the older hugepage page mechanism which has a static pool of pages when the machine sets up. I tracked the problem down to the the PERF_RECORD_MMAP entries being different between regular and hugepages.
A hugepage PERF_RECORD_MMAP entry from "perf report -D" when hugepages were used:
0x125d60 [0x58]: event: 1
.
. ... raw event: size 88 bytes
. 0000: 01 00 00 00 02 00 58 00 36 29 00 00 37 29 00 00 ......X.6)..7)..
. 0010: 00 00 c0 aa aa 2a 00 00 00 00 00 03 00 00 00 00 .....*..........
. 0020: 00 00 00 00 00 00 00 00 2f 61 6e 6f 6e 5f 68 75 ......../anon_hu
. 0030: 67 65 70 61 67 65 20 28 64 65 6c 65 74 65 64 29 gepage (deleted)
. 0040: 00 00 00 00 00 00 00 00 36 29 00 00 37 29 00 00 ........6)..7)..
. 0050: cd 0f 4c 7e a7 b2 00 00 ..L~....
.
196432448196557 0x125d60 [0x58]: PERF_RECORD_MMAP 10550/10551: [0x2aaaaac00000(0x3000000) @ 0]: /anon_hugepage (deleted)
Below is a PERF_RECORD_MMAP for normal page sized pages anonymous region:
0xd8 [0x50]: event: 1
.
. ... raw event: size 80 bytes
. 0000: 01 00 00 00 01 00 50 00 ff ff ff ff 00 00 00 00 ......P.........
...skipping...
. 0020: 00 00 00 a9 f9 7f 00 00 2f 2f 61 6e 6f 6e 00 00 ........//anon..
. 0030: 3f 2a 00 00 40 2a 00 00 68 f9 4a f5 20 b3 00 00 ?*..@*..h.J. ...
.
196954135656808 0x1873c8 [0x40]: PERF_RECORD_MMAP 10815/10816: [0x7ff9a9000000(0x270000) @ 0x7ff9a9000000]: //anon
Why the distinction between the two memory mappings in this manner? Why not just generate same output for the hugepage PERF_RECORD_MMAP? Also why does it include the " (deleted)" suffix for the hugepage entry? I don't think that the mapping had been removed when that entry was generated?
-Will
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Why the distinction between regular anon regions and hugepage anon regions for PERF_RECORD_MMAP entries?
2015-01-10 3:27 Why the distinction between regular anon regions and hugepage anon regions for PERF_RECORD_MMAP entries? William Cohen
@ 2015-01-13 15:30 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2015-01-13 15:30 UTC (permalink / raw)
To: William Cohen, linux-perf-users
On 1/9/15 8:27 PM, William Cohen wrote:
> Hi All,
>
> Earlier this week I was examining why operf was not properly mapping samples from anonymous regions to Java methods when the JVM was using the older hugepage page mechanism which has a static pool of pages when the machine sets up. I tracked the problem down to the the PERF_RECORD_MMAP entries being different between regular and hugepages.
>
> A hugepage PERF_RECORD_MMAP entry from "perf report -D" when hugepages were used:
>
> 0x125d60 [0x58]: event: 1
> .
> . ... raw event: size 88 bytes
> . 0000: 01 00 00 00 02 00 58 00 36 29 00 00 37 29 00 00 ......X.6)..7)..
> . 0010: 00 00 c0 aa aa 2a 00 00 00 00 00 03 00 00 00 00 .....*..........
> . 0020: 00 00 00 00 00 00 00 00 2f 61 6e 6f 6e 5f 68 75 ......../anon_hu
> . 0030: 67 65 70 61 67 65 20 28 64 65 6c 65 74 65 64 29 gepage (deleted)
> . 0040: 00 00 00 00 00 00 00 00 36 29 00 00 37 29 00 00 ........6)..7)..
> . 0050: cd 0f 4c 7e a7 b2 00 00 ..L~....
> .
> 196432448196557 0x125d60 [0x58]: PERF_RECORD_MMAP 10550/10551: [0x2aaaaac00000(0x3000000) @ 0]: /anon_hugepage (deleted)
>
>
> Below is a PERF_RECORD_MMAP for normal page sized pages anonymous region:
>
> 0xd8 [0x50]: event: 1
> .
> . ... raw event: size 80 bytes
> . 0000: 01 00 00 00 01 00 50 00 ff ff ff ff 00 00 00 00 ......P.........
> ...skipping...
> . 0020: 00 00 00 a9 f9 7f 00 00 2f 2f 61 6e 6f 6e 00 00 ........//anon..
> . 0030: 3f 2a 00 00 40 2a 00 00 68 f9 4a f5 20 b3 00 00 ?*..@*..h.J. ...
> .
> 196954135656808 0x1873c8 [0x40]: PERF_RECORD_MMAP 10815/10816: [0x7ff9a9000000(0x270000) @ 0x7ff9a9000000]: //anon
>
>
> Why the distinction between the two memory mappings in this manner? Why not just generate same output for the hugepage PERF_RECORD_MMAP? Also why does it include the " (deleted)" suffix for the hugepage entry? I don't think that the mapping had been removed when that entry was generated?
perf is just passing on the information given to it.
The "anon" versus "anon_hugepage" comes from the filename used in the
mapping (e.g, see references to HUGETLB_ANON_FILE for the latter). And
as I recall file references for hugepages are typically deleted after
opening so that the pages are released even if the process terminates
abnormally.
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-13 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 3:27 Why the distinction between regular anon regions and hugepage anon regions for PERF_RECORD_MMAP entries? William Cohen
2015-01-13 15:30 ` David Ahern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.