Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1277)

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 2461003002: [profiler] Emit runtime call stats into sampling profile (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index a45ca6b759b78190a3d6d75dc97a6fb65cdefc6e..484737e28933fbf9d6f02e8947054a5cea03f3f8 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -71,10 +71,11 @@ static const char* reason(const i::DeoptimizeReason reason) {
}
TEST(StartStop) {
- CpuProfilesCollection profiles(CcTest::i_isolate());
- ProfileGenerator generator(&profiles);
+ i::Isolate* isolate = CcTest::i_isolate();
+ CpuProfilesCollection profiles(isolate);
+ ProfileGenerator generator(isolate, &profiles);
std::unique_ptr<ProfilerEventsProcessor> processor(
- new ProfilerEventsProcessor(CcTest::i_isolate(), &generator,
+ new ProfilerEventsProcessor(isolate, &generator,
v8::base::TimeDelta::FromMicroseconds(100)));
processor->Start();
processor->StopSynchronously();
@@ -157,10 +158,9 @@ TEST(CodeEvents) {
i::AbstractCode* args4_code = CreateCode(&env);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(profiles);
- ProfilerEventsProcessor* processor =
- new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
- v8::base::TimeDelta::FromMicroseconds(100));
+ ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
+ ProfilerEventsProcessor* processor = new ProfilerEventsProcessor(
+ isolate, generator, v8::base::TimeDelta::FromMicroseconds(100));
CpuProfiler profiler(isolate, profiles, generator, processor);
profiles->StartProfiling("", false);
processor->Start();
@@ -226,7 +226,7 @@ TEST(TickEvents) {
i::AbstractCode* frame3_code = CreateCode(&env);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(profiles);
+ ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
ProfilerEventsProcessor* processor =
new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
v8::base::TimeDelta::FromMicroseconds(100));
@@ -299,7 +299,7 @@ TEST(Issue1398) {
i::AbstractCode* code = CreateCode(&env);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(profiles);
+ ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
ProfilerEventsProcessor* processor =
new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
v8::base::TimeDelta::FromMicroseconds(100));
@@ -1073,7 +1073,7 @@ static void TickLines(bool optimize) {
CHECK(code_address);
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate);
- ProfileGenerator* generator = new ProfileGenerator(profiles);
+ ProfileGenerator* generator = new ProfileGenerator(isolate, profiles);
ProfilerEventsProcessor* processor =
new ProfilerEventsProcessor(CcTest::i_isolate(), generator,
v8::base::TimeDelta::FromMicroseconds(100));

Powered by Google App Engine
This is Rietveld 408576698