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

Side by Side Diff: test/cctest/test-profile-generator.cc

Issue 1407533004: [turbofan] Fix various issues with --turbo-inlining enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/cctest/test-sampler-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 const ProfileNode* child = parent->children()->at(i); 489 const ProfileNode* child = parent->children()->at(i);
490 if (strcmp(child->entry()->name(), name) == 0) return child; 490 if (strcmp(child->entry()->name(), name) == 0) return child;
491 } 491 }
492 return NULL; 492 return NULL;
493 } 493 }
494 494
495 495
496 TEST(RecordStackTraceAtStartProfiling) { 496 TEST(RecordStackTraceAtStartProfiling) {
497 // This test does not pass with inlining enabled since inlined functions 497 // This test does not pass with inlining enabled since inlined functions
498 // don't appear in the stack trace. 498 // don't appear in the stack trace.
499 i::FLAG_turbo_inlining = false;
499 i::FLAG_use_inlining = false; 500 i::FLAG_use_inlining = false;
500 501
501 v8::HandleScope scope(CcTest::isolate()); 502 v8::HandleScope scope(CcTest::isolate());
502 v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION); 503 v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
503 v8::Context::Scope context_scope(env); 504 v8::Context::Scope context_scope(env);
504 505
505 CpuProfiler* profiler = CcTest::i_isolate()->cpu_profiler(); 506 CpuProfiler* profiler = CcTest::i_isolate()->cpu_profiler();
506 CHECK_EQ(0, profiler->GetProfilesCount()); 507 CHECK_EQ(0, profiler->GetProfilesCount());
507 CompileRun( 508 CompileRun(
508 "function c() { startProfiling(); }\n" 509 "function c() { startProfiling(); }\n"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 v8::String::Utf8Value function_name(child->GetFunctionName()); 565 v8::String::Utf8Value function_name(child->GetFunctionName());
565 if (strcmp(*function_name, name) == 0) return child; 566 if (strcmp(*function_name, name) == 0) return child;
566 } 567 }
567 return NULL; 568 return NULL;
568 } 569 }
569 570
570 571
571 TEST(ProfileNodeScriptId) { 572 TEST(ProfileNodeScriptId) {
572 // This test does not pass with inlining enabled since inlined functions 573 // This test does not pass with inlining enabled since inlined functions
573 // don't appear in the stack trace. 574 // don't appear in the stack trace.
575 i::FLAG_turbo_inlining = false;
574 i::FLAG_use_inlining = false; 576 i::FLAG_use_inlining = false;
575 577
576 v8::HandleScope scope(CcTest::isolate()); 578 v8::HandleScope scope(CcTest::isolate());
577 v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION); 579 v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
578 v8::Context::Scope context_scope(env); 580 v8::Context::Scope context_scope(env);
579 581
580 v8::CpuProfiler* profiler = env->GetIsolate()->GetCpuProfiler(); 582 v8::CpuProfiler* profiler = env->GetIsolate()->GetCpuProfiler();
581 i::CpuProfiler* iprofiler = reinterpret_cast<i::CpuProfiler*>(profiler); 583 i::CpuProfiler* iprofiler = reinterpret_cast<i::CpuProfiler*>(profiler);
582 CHECK_EQ(0, iprofiler->GetProfilesCount()); 584 CHECK_EQ(0, iprofiler->GetProfilesCount());
583 v8::Local<v8::Script> script_a = 585 v8::Local<v8::Script> script_a =
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 CHECK(const_cast<v8::CpuProfileNode*>(current)); 717 CHECK(const_cast<v8::CpuProfileNode*>(current));
716 718
717 current = PickChild(current, "TryFinally"); 719 current = PickChild(current, "TryFinally");
718 CHECK(const_cast<v8::CpuProfileNode*>(current)); 720 CHECK(const_cast<v8::CpuProfileNode*>(current));
719 CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason())); 721 CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason()));
720 722
721 current = PickChild(current, "Debugger"); 723 current = PickChild(current, "Debugger");
722 CHECK(const_cast<v8::CpuProfileNode*>(current)); 724 CHECK(const_cast<v8::CpuProfileNode*>(current));
723 CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason())); 725 CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason()));
724 } 726 }
OLDNEW
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | test/cctest/test-sampler-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698