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

Unified Diff: src/profile-generator.cc

Issue 12475016: Maintain API compatibility with older versions of V8. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index ce07213b029403646a4f14d8086fc5269f57c6b3..2bf1724715f066932617f13ceca013d714aa93d2 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -296,7 +296,6 @@ ProfileTree::ProfileTree()
"",
0,
TokenEnumerator::kNoSecurityToken),
- next_node_id_(1),
root_(new ProfileNode(this, &root_entry_)) {
}
@@ -307,7 +306,7 @@ ProfileTree::~ProfileTree() {
}
-ProfileNode* ProfileTree::AddPathFromEnd(const Vector<CodeEntry*>& path) {
+void ProfileTree::AddPathFromEnd(const Vector<CodeEntry*>& path) {
ProfileNode* node = root_;
for (CodeEntry** entry = path.start() + path.length() - 1;
entry != path.start() - 1;
@@ -317,7 +316,6 @@ ProfileNode* ProfileTree::AddPathFromEnd(const Vector<CodeEntry*>& path) {
}
}
node->IncrementSelfTicks();
- return node;
}
@@ -469,8 +467,7 @@ void ProfileTree::ShortPrint() {
void CpuProfile::AddPath(const Vector<CodeEntry*>& path) {
- ProfileNode* top_frame_node = top_down_.AddPathFromEnd(path);
- if (record_samples_) samples_.Add(top_frame_node);
+ top_down_.AddPathFromEnd(path);
}
@@ -486,7 +483,7 @@ void CpuProfile::SetActualSamplingRate(double actual_sampling_rate) {
CpuProfile* CpuProfile::FilteredClone(int security_token_id) {
ASSERT(security_token_id != TokenEnumerator::kNoSecurityToken);
- CpuProfile* clone = new CpuProfile(title_, uid_, false);
+ CpuProfile* clone = new CpuProfile(title_, uid_);
clone->top_down_.FilteredClone(&top_down_, security_token_id);
return clone;
}
@@ -612,8 +609,7 @@ CpuProfilesCollection::~CpuProfilesCollection() {
}
-bool CpuProfilesCollection::StartProfiling(const char* title, unsigned uid,
- bool record_samples) {
+bool CpuProfilesCollection::StartProfiling(const char* title, unsigned uid) {
ASSERT(uid > 0);
current_profiles_semaphore_->Wait();
if (current_profiles_.length() >= kMaxSimultaneousProfiles) {
@@ -627,12 +623,17 @@ bool CpuProfilesCollection::StartProfiling(const char* title, unsigned uid,
return false;
}
}
- current_profiles_.Add(new CpuProfile(title, uid, record_samples));
+ current_profiles_.Add(new CpuProfile(title, uid));
current_profiles_semaphore_->Signal();
return true;
}
+bool CpuProfilesCollection::StartProfiling(String* title, unsigned uid) {
+ return StartProfiling(GetName(title), uid);
+}
+
+
CpuProfile* CpuProfilesCollection::StopProfiling(int security_token_id,
const char* title,
double actual_sampling_rate) {
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698