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