Do a GC pass prior to collecting a heap profile.
It seems that doing an extra GC pass results in less cluttered heap snapshots. Review URL: http://codereview.chromium.org/1949001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4580 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
4fdf57ace0
commit
3e54b5cbb0
@ -3646,6 +3646,8 @@ void V8::ResumeProfilerEx(int flags, int tag) {
|
||||
// those modules which haven't been started prior to making a
|
||||
// snapshot.
|
||||
|
||||
// Make a GC prior to taking a snapshot.
|
||||
i::Heap::CollectAllGarbage(false);
|
||||
// Reset snapshot flag and CPU module flags.
|
||||
flags &= ~(PROFILER_MODULE_HEAP_SNAPSHOT | PROFILER_MODULE_CPU);
|
||||
const int current_flags = i::Logger::GetActiveProfilerModules();
|
||||
|
Loading…
Reference in New Issue
Block a user