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
parent 4fdf57ac
......@@ -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();
......
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