add blink_disable_partition_allocator for memory profiler.

PartitionAlloc manages memory chunks which are pre-allocated
and re-assigned to the caller which requests memory allocation.
so the top point of stack unwinding is always inside PartitionAlloc
in blink. this can make profiler know wrong allocation point.

if this gyp flag is set, blink uses base allocator.
so that it can show exact callstack where actual allocation is
requested.

Bug=None

Review URL: https://codereview.chromium.org/399333002

git-svn-id: svn://svn.chromium.org/blink/trunk@178419 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent b3563843
...@@ -39,6 +39,10 @@ ...@@ -39,6 +39,10 @@
# If set to 1 together with blink_gc_plugin, the Blink GC plugin will dump # If set to 1 together with blink_gc_plugin, the Blink GC plugin will dump
# points-to graph files for each compilation unit. # points-to graph files for each compilation unit.
'blink_gc_plugin_dump_graph%': 0, 'blink_gc_plugin_dump_graph%': 0,
# If set to 1, the Blink will use the base allocator instead of
# PartitionAlloc. so that the top of stack-unwinding becomes the caller
# which requests memory allocation in blink.
'blink_disable_partition_allocator%': 0,
}, },
'targets': [ 'targets': [
{ {
...@@ -109,6 +113,11 @@ ...@@ -109,6 +113,11 @@
'OTHER_CFLAGS': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'], 'OTHER_CFLAGS': ['<!@(../../../tools/clang/scripts/blink_gc_plugin_flags.sh enable-oilpan=<(enable_oilpan) dump-graph=<(blink_gc_plugin_dump_graph))'],
}, },
}], }],
['blink_disable_partition_allocator==1', {
'defines': [
'MEMORY_TOOL_REPLACES_ALLOCATOR',
],
}],
], ],
}, },
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment