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
// 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();