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

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

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 years, 10 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-mark-compact.cc ('k') | test/cctest/test-spaces.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 // 2 //
3 // Tests of profiles generator and utilities. 3 // Tests of profiles generator and utilities.
4 4
5 #ifdef ENABLE_LOGGING_AND_PROFILING 5 #ifdef ENABLE_LOGGING_AND_PROFILING
6 6
7 #include "v8.h" 7 #include "v8.h"
8 #include "profile-generator-inl.h" 8 #include "profile-generator-inl.h"
9 #include "cctest.h" 9 #include "cctest.h"
10 #include "../include/v8-profiler.h" 10 #include "../include/v8-profiler.h"
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 const char* name) { 750 const char* name) {
751 for (int i = 0; i < parent->children()->length(); ++i) { 751 for (int i = 0; i < parent->children()->length(); ++i) {
752 const ProfileNode* child = parent->children()->at(i); 752 const ProfileNode* child = parent->children()->at(i);
753 if (strcmp(child->entry()->name(), name) == 0) return child; 753 if (strcmp(child->entry()->name(), name) == 0) return child;
754 } 754 }
755 return NULL; 755 return NULL;
756 } 756 }
757 757
758 758
759 TEST(RecordStackTraceAtStartProfiling) { 759 TEST(RecordStackTraceAtStartProfiling) {
760 // This test does not pass with inlining enabled since inlined functions
761 // don't appear in the stack trace.
762 i::FLAG_use_inlining = false;
763
760 if (env.IsEmpty()) { 764 if (env.IsEmpty()) {
761 v8::HandleScope scope; 765 v8::HandleScope scope;
762 const char* extensions[] = { "v8/profiler" }; 766 const char* extensions[] = { "v8/profiler" };
763 v8::ExtensionConfiguration config(1, extensions); 767 v8::ExtensionConfiguration config(1, extensions);
764 env = v8::Context::New(&config); 768 env = v8::Context::New(&config);
765 } 769 }
766 v8::HandleScope scope; 770 v8::HandleScope scope;
767 env->Enter(); 771 env->Enter();
768 772
769 CHECK_EQ(0, CpuProfiler::GetProfilesCount()); 773 CHECK_EQ(0, CpuProfiler::GetProfilesCount());
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 CHECK(collection.StartProfiling(title.start(), i + 1)); // UID must be > 0. 810 CHECK(collection.StartProfiling(title.start(), i + 1)); // UID must be > 0.
807 titles[i] = title.start(); 811 titles[i] = title.start();
808 } 812 }
809 CHECK(!collection.StartProfiling( 813 CHECK(!collection.StartProfiling(
810 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1)); 814 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1));
811 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) 815 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i)
812 i::DeleteArray(titles[i]); 816 i::DeleteArray(titles[i]);
813 } 817 }
814 818
815 #endif // ENABLE_LOGGING_AND_PROFILING 819 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698