Revision f230a1cf deps/v8/test/cctest/test-profile-generator.cc
deps/v8/test/cctest/test-profile-generator.cc | ||
---|---|---|
399 | 399 |
|
400 | 400 |
TEST(RecordTickSample) { |
401 | 401 |
TestSetup test_setup; |
402 |
CpuProfilesCollection profiles(CcTest::i_isolate()->heap());
|
|
402 |
CpuProfilesCollection profiles(CcTest::heap()); |
|
403 | 403 |
profiles.StartProfiling("", 1, false); |
404 | 404 |
ProfileGenerator generator(&profiles); |
405 | 405 |
CodeEntry* entry1 = profiles.NewCodeEntry(i::Logger::FUNCTION_TAG, "aaa"); |
... | ... | |
465 | 465 |
|
466 | 466 |
TEST(SampleIds) { |
467 | 467 |
TestSetup test_setup; |
468 |
CpuProfilesCollection profiles(CcTest::i_isolate()->heap());
|
|
468 |
CpuProfilesCollection profiles(CcTest::heap()); |
|
469 | 469 |
profiles.StartProfiling("", 1, true); |
470 | 470 |
ProfileGenerator generator(&profiles); |
471 | 471 |
CodeEntry* entry1 = profiles.NewCodeEntry(i::Logger::FUNCTION_TAG, "aaa"); |
... | ... | |
513 | 513 |
|
514 | 514 |
TEST(NoSamples) { |
515 | 515 |
TestSetup test_setup; |
516 |
CpuProfilesCollection profiles(CcTest::i_isolate()->heap());
|
|
516 |
CpuProfilesCollection profiles(CcTest::heap()); |
|
517 | 517 |
profiles.StartProfiling("", 1, false); |
518 | 518 |
ProfileGenerator generator(&profiles); |
519 | 519 |
CodeEntry* entry1 = profiles.NewCodeEntry(i::Logger::FUNCTION_TAG, "aaa"); |
... | ... | |
605 | 605 |
// don't appear in the stack trace. |
606 | 606 |
i::FLAG_use_inlining = false; |
607 | 607 |
|
608 |
v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
|
608 |
v8::Isolate* isolate = CcTest::isolate();
|
|
609 | 609 |
v8::HandleScope scope(isolate); |
610 | 610 |
const char* extensions[] = { "v8/profiler" }; |
611 | 611 |
v8::ExtensionConfiguration config(1, extensions); |
612 | 612 |
v8::Local<v8::Context> context = v8::Context::New(isolate, &config); |
613 | 613 |
context->Enter(); |
614 | 614 |
|
615 |
CpuProfiler* profiler = i::Isolate::Current()->cpu_profiler();
|
|
615 |
CpuProfiler* profiler = CcTest::i_isolate()->cpu_profiler();
|
|
616 | 616 |
CHECK_EQ(0, profiler->GetProfilesCount()); |
617 | 617 |
CompileRun( |
618 | 618 |
"function c() { startProfiling(); }\n" |
... | ... | |
652 | 652 |
|
653 | 653 |
|
654 | 654 |
TEST(Issue51919) { |
655 |
CpuProfilesCollection collection(CcTest::i_isolate()->heap());
|
|
655 |
CpuProfilesCollection collection(CcTest::heap()); |
|
656 | 656 |
i::EmbeddedVector<char*, |
657 | 657 |
CpuProfilesCollection::kMaxSimultaneousProfiles> titles; |
658 | 658 |
for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) { |
... | ... | |
744 | 744 |
"function lazy_func_at_6th_line() {}"; |
745 | 745 |
|
746 | 746 |
int GetFunctionLineNumber(LocalContext* env, const char* name) { |
747 |
CpuProfiler* profiler = i::Isolate::Current()->cpu_profiler();
|
|
747 |
CpuProfiler* profiler = CcTest::i_isolate()->cpu_profiler();
|
|
748 | 748 |
CodeMap* code_map = profiler->generator()->code_map(); |
749 | 749 |
i::Handle<i::JSFunction> func = v8::Utils::OpenHandle( |
750 | 750 |
*v8::Local<v8::Function>::Cast( |
... | ... | |
761 | 761 |
|
762 | 762 |
CcTest::InitializeVM(); |
763 | 763 |
LocalContext env; |
764 |
i::Isolate* isolate = i::Isolate::Current();
|
|
764 |
i::Isolate* isolate = CcTest::i_isolate();
|
|
765 | 765 |
TestSetup test_setup; |
766 | 766 |
|
767 | 767 |
i::HandleScope scope(isolate); |
Also available in: Unified diff