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

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

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-platform-win32.cc ('k') | test/cctest/test-regexp.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2))); 49 CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
50 CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1))); 50 CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
51 { 51 {
52 v8::HandleScope hs; 52 v8::HandleScope hs;
53 v8::Local<v8::String> token3(v8::String::New("3")); 53 v8::Local<v8::String> token3(v8::String::New("3"));
54 CHECK_EQ(2, te.GetTokenId(*v8::Utils::OpenHandle(*token3))); 54 CHECK_EQ(2, te.GetTokenId(*v8::Utils::OpenHandle(*token3)));
55 CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2))); 55 CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
56 CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1))); 56 CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
57 } 57 }
58 CHECK(!i::TokenEnumeratorTester::token_removed(&te)->at(2)); 58 CHECK(!i::TokenEnumeratorTester::token_removed(&te)->at(2));
59 i::Heap::CollectAllGarbage(false); 59 HEAP->CollectAllGarbage(false);
60 CHECK(i::TokenEnumeratorTester::token_removed(&te)->at(2)); 60 CHECK(i::TokenEnumeratorTester::token_removed(&te)->at(2));
61 CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2))); 61 CHECK_EQ(1, te.GetTokenId(*v8::Utils::OpenHandle(*token2)));
62 CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1))); 62 CHECK_EQ(0, te.GetTokenId(*v8::Utils::OpenHandle(*token1)));
63 } 63 }
64 64
65 65
66 TEST(ProfileNodeFindOrAddChild) { 66 TEST(ProfileNodeFindOrAddChild) {
67 ProfileNode node(NULL, NULL); 67 ProfileNode node(NULL, NULL);
68 CodeEntry entry1(i::Logger::FUNCTION_TAG, "", "aaa", "", 0, 68 CodeEntry entry1(i::Logger::FUNCTION_TAG, "", "aaa", "", 0,
69 TokenEnumerator::kNoSecurityToken); 69 TokenEnumerator::kNoSecurityToken);
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 CHECK(collection.StartProfiling(title.start(), i + 1)); // UID must be > 0. 819 CHECK(collection.StartProfiling(title.start(), i + 1)); // UID must be > 0.
820 titles[i] = title.start(); 820 titles[i] = title.start();
821 } 821 }
822 CHECK(!collection.StartProfiling( 822 CHECK(!collection.StartProfiling(
823 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1)); 823 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1));
824 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) 824 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i)
825 i::DeleteArray(titles[i]); 825 i::DeleteArray(titles[i]);
826 } 826 }
827 827
828 #endif // ENABLE_LOGGING_AND_PROFILING 828 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW
« no previous file with comments | « test/cctest/test-platform-win32.cc ('k') | test/cctest/test-regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698