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

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

Issue 7310025: Remove support for logging into a memory buffer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't add runtime test-only functions Created 9 years, 5 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
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
6
7 #include "v8.h" 5 #include "v8.h"
8 #include "profile-generator-inl.h" 6 #include "profile-generator-inl.h"
9 #include "cctest.h" 7 #include "cctest.h"
10 #include "../include/v8-profiler.h" 8 #include "../include/v8-profiler.h"
11 9
12 namespace i = v8::internal; 10 namespace i = v8::internal;
13 11
14 using i::CodeEntry; 12 using i::CodeEntry;
15 using i::CodeMap; 13 using i::CodeMap;
16 using i::CpuProfile; 14 using i::CpuProfile;
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 i::Vector<char> title = i::Vector<char>::New(16); 815 i::Vector<char> title = i::Vector<char>::New(16);
818 i::OS::SNPrintF(title, "%d", i); 816 i::OS::SNPrintF(title, "%d", i);
819 CHECK(collection.StartProfiling(title.start(), i + 1)); // UID must be > 0. 817 CHECK(collection.StartProfiling(title.start(), i + 1)); // UID must be > 0.
820 titles[i] = title.start(); 818 titles[i] = title.start();
821 } 819 }
822 CHECK(!collection.StartProfiling( 820 CHECK(!collection.StartProfiling(
823 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1)); 821 "maximum", CpuProfilesCollection::kMaxSimultaneousProfiles + 1));
824 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i) 822 for (int i = 0; i < CpuProfilesCollection::kMaxSimultaneousProfiles; ++i)
825 i::DeleteArray(titles[i]); 823 i::DeleteArray(titles[i]);
826 } 824 }
827
828 #endif // ENABLE_LOGGING_AND_PROFILING
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698