Revision: 15547
Author:   [email protected]
Date:     Mon Jul  8 04:26:15 2013
Log: Collect garbage at the beginning of cctest/test-cpu-profiler/FunctionCallSample

That way, we don't end up collecting all samples in the garbage
collector when the i18n extension is loaded.

BUG=v8:2745
[email protected]

Review URL: https://codereview.chromium.org/18714006
http://code.google.com/p/v8/source/detail?r=15547

Modified:
 /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc

=======================================
--- /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Sun Jul 7 04:42:30 2013 +++ /branches/bleeding_edge/test/cctest/test-cpu-profiler.cc Mon Jul 8 04:26:15 2013
@@ -40,6 +40,7 @@
 using i::CpuProfile;
 using i::CpuProfiler;
 using i::CpuProfilesCollection;
+using i::Heap;
 using i::ProfileGenerator;
 using i::ProfileNode;
 using i::ProfilerEventsProcessor;
@@ -995,6 +996,9 @@
   LocalContext env;
   v8::HandleScope scope(env->GetIsolate());

+ // Collect garbage that might have be generated while installing extensions.
+  HEAP->CollectAllGarbage(Heap::kNoGCFlags);
+
   v8::Script::Compile(v8::String::New(call_function_test_source))->Run();
   v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
       env->Global()->Get(v8::String::New("start")));

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to