• Home
Name Date Size #Lines LOC

..--

lib/03-May-2024-2,3531,820

sorters/03-May-2024-542532

subcommands/03-May-2024-1,141915

tests/03-May-2024-2,3302,230

visualizer/03-May-2024-4,5773,632

.gitignoreD03-May-202466 43

OWNERSD03-May-202423 21

PRESUBMIT.pyD03-May-20241.4 KiB4631

README.policyD03-May-20242.6 KiB5745

accumulate.pyD03-May-20249.3 KiB272205

dmprofD03-May-2024337 134

dmprof.pyD03-May-20242.4 KiB8262

download.shD03-May-2024298 83

graph.pyD03-May-20242.9 KiB10181

policies.jsonD03-May-2024714 3838

policy.android.browser.jsonD03-May-20248.1 KiB331330

policy.android.renderer.jsonD03-May-202415.7 KiB592591

policy.android.webview.jsonD03-May-202415.6 KiB599598

policy.l0.jsonD03-May-20243.4 KiB163162

policy.l1.jsonD03-May-20244.4 KiB205204

policy.l2.jsonD03-May-202413.9 KiB527526

policy.linux.browser.jsonD03-May-202410.2 KiB418417

policy.sourcefile.jsonD03-May-20244 KiB187186

policy.t0.jsonD03-May-20244.4 KiB206205

sorter.malloc-component.jsonD03-May-20247.6 KiB254253

sorter.malloc-type.jsonD03-May-2024744 3938

sorter.vm-map.jsonD03-May-20242.6 KiB108107

sorter.vm-sharing.jsonD03-May-2024363 2625

templates.jsonD03-May-20241.5 KiB5049

README.policy

1Policy files contains a classification policy for dmprof.py.
2
3Each line indicates a group to be classified and conditions for classifying
4in the following format.
5  Format: <group-name> <region-type> <pattern>
6
7<group-name> is a name for the group to be classified.  Same names can appear
8in the same policy file multiple times.  <region-type> represents a type of
9the memory region.  It's one of {malloc, mmap, default, optional}.  <pattern>
10is a Python-style regular expression to match with calling stack frames.
11
12For each memory chunks allocated by malloc, its calling stack frame of malloc
13is compared with these classification policies whose <region-type> is 'malloc'
14from the top.  If <pattern> of the policy matches the frame, the memory chunk
15is classified into <group-name>.  The same way for 'mmap'.
16
17Policy lines whose <region-type>s are 'optional' and 'default' are used by
18dmprof.py internally.  'optional' policies can be disabled by removing or
19commenting-out.
20
21
22Guidelines to write a new policy.
23
24Better policies would classify memory on a single layer, or simple combination
25of layers.  For example,
26- Large-level components (V8, WebKit, ...)
27- Mid-level components (Font, FileAPI, ...)
28- Low-level libraries (StringImpl, HashTable, ...)
29- Mid-level libraries (SharedBuf, XHR, ...)
30
31For example of combinations,
32- How about SharedBuf in Font API v.s. other APIs?
33- How about Strings in IndexedDB v.s. File APIs?
34
35
36Deprecated policies for references.
37
38total-vm                       optional        optional
39anonymous-vm                   optional        optional
40filemapped-vm                  optional        optional
41other-vm                       optional        optional
42vm-profiler                    optional        optional
43vm-total                       optional        optional
44mmap-v8-heap-new               mmap    .*v8::.*::ReserveInitialChunk.*
45mmap-v8-heap-coderange         mmap    .*v8::.*::CodeRange::Setup.*
46mmap-v8-heap-old-evacuate      mmap    .*v8::.*::OldSpace::.* v8::internal::ScavengingVisitor::EvacuateObject.*
47mmap-v8-heap-old               mmap    .*v8::.*::OldSpace::.*
48mmap-v8-heap-largeobj          mmap    .*v8::.*::LargeObjectChunk::New.*
49mmap-v8-heap-other             mmap    .*VirtualMemory.*
50mmap-v8-heap-other             mmap    .*v8::internal::OS::Allocate.*
51mmap-v8-nonheap                        mmap    .*v8::.*
52mmap-webkit                    mmap    .*(WTF::|WebCore::|blink::|WebKit::).*
53mmap-sqlite                    mmap    .*sqlite3MemMalloc.*
54mmap-pl-arena                  mmap    .*PL_ArenaAllocate.*
55mmap-sk                        mmap    .*sk_malloc_flags.*
56mmap-total-record-vm           default default
57