All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: "linux-perf-users@vger.kernel.org" <linux-perf-users@vger.kernel.org>
Subject: Why the distinction between regular anon regions and hugepage anon regions for PERF_RECORD_MMAP entries?
Date: Fri, 09 Jan 2015 22:27:12 -0500	[thread overview]
Message-ID: <54B09C10.6090008@redhat.com> (raw)

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

             reply	other threads:[~2015-01-10  3:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-10  3:27 William Cohen [this message]
2015-01-13 15:30 ` Why the distinction between regular anon regions and hugepage anon regions for PERF_RECORD_MMAP entries? David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B09C10.6090008@redhat.com \
    --to=wcohen@redhat.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.