Shared memory analysis

86 views
Skip to first unread message

Dai Mikurube

unread,
Jun 24, 2013, 5:47:56 AM6/24/13
to dmprof
Hi,

The trial version for shared memory analysis is now available in dmprof landed at https://codereview.chromium.org/16158009/. It may not work precisely (because of (A) described below). Please give it a try, and give me your feedback.


The usage is:

1) Run Chromium with DEEP_HEAP_PROFILE_PAGEFRAME=2 (or heapprof.deep.pageframe=2 for Android) and dump heap profiles.

2) Run dmprof for the dumped files like following:
$ dmprof json <target-first-dump> [other-first-dumps...]
For example,
dmprof json x.rel.08926.0001.heap x.rel.08895.0001.heap x.rel.08897.0001.heap x.rel.08975.0001.heap x.rel.08993.0001.heap ...
to analyze x.rel.08926.0001.heap.


Note that:

A) The benchmarking program MUST dumps heap profiles for ALL processes almost SIMULTANEOUSLY. Otherwise, the result might be broken. We may need to add some APIs as bulach@ did for the browser process in http://crrev.com/202087.

B) Currently, there is only one rule in "l2" to breakdown by memory sharing. "unhooked-file-nonexec-others", "unhooked-file-nonexec-group" and "unhooked-file-nonexec". To write more rules, follow the description below .

----------
If the rule includes "sharedwith", it will be broken down by memory sharing. It should have "private and/or group and/or others". (Look at policy.l2.json.)

"private" means only the process itself, "group" means shared but only by chrome-related probed processes and "others" means shared with non-chrome processes.  For example,

    "sharedwith": "private"
    "sharedwith": "others" (matches ONLY pages which are shared with non-chrome processes)
    "sharedwith": "private,group" (matches pages which are "not shared with non-chrome processes")
----------

--
Dai MIKURUBE

Dai Mikurube

unread,
Jul 4, 2013, 3:56:46 AM7/4/13
to dmprof
Hi,

Did anyone try this? I wonder I could have feedback to verify it's actually working well and understand where to improve. Thanks! :)
--
Dai MIKURUBE

Marcus Bulach

unread,
Jul 4, 2013, 11:58:30 AM7/4/13
to Dai Mikurube, dmprof
Hi Dai,

First, apologies for the long delay: we were all travelling last week.. :(
Second: thanks!!! This works great!!! :)
I'll just send you patch expanding the android policies, and will start a separate discussions with the new findings: very interesting data!!

Thanks,
Marcus



--
You received this message because you are subscribed to the Google Groups "dmprof" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dmprof+un...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/dmprof/CAA_M4H6Nw%3De2nZ2HS5La95DoPTjFL4UOnS8wt_Bh0ZbJL7PeRA%40mail.gmail.com.
 
 

Dai Mikurube

unread,
Jul 5, 2013, 3:21:53 AM7/5/13
to Marcus Bulach, dmprof
Thanks, Marcus.

Sorry if I hurried you. The actual use-cases and feedback help me very much to improve the tool. :)

Especially for this memory sharing analysis, I was not very sure that it works for practical use-cases.  I always welcome your feedback.
--
Dai MIKURUBE
Reply all
Reply to author
Forward
0 new messages