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

Unified Diff: src/profile-generator.h

Issue 259803002: Add timestamps to CPU profile samples. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix race Created 6 years, 8 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/cpu-profiler.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index 1f23ee20ffe5bf8827bb28de6800568814a02b61..52636507038ab0a609f92d25e39a7b23fcb12f00 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -199,7 +199,7 @@ class CpuProfile {
CpuProfile(const char* title, bool record_samples);
// Add pc -> ... -> main() call path to the profile.
- void AddPath(const Vector<CodeEntry*>& path);
+ void AddPath(TimeTicks timestamp, const Vector<CodeEntry*>& path);
void CalculateTotalTicksAndSamplingRate();
const char* title() const { return title_; }
@@ -207,6 +207,7 @@ class CpuProfile {
int samples_count() const { return samples_.length(); }
ProfileNode* sample(int index) const { return samples_.at(index); }
+ TimeTicks sample_timestamp(int index) const { return timestamps_.at(index); }
TimeTicks start_time() const { return start_time_; }
TimeTicks end_time() const { return end_time_; }
@@ -221,6 +222,7 @@ class CpuProfile {
TimeTicks start_time_;
TimeTicks end_time_;
List<ProfileNode*> samples_;
+ List<TimeTicks> timestamps_;
ProfileTree top_down_;
DISALLOW_COPY_AND_ASSIGN(CpuProfile);
@@ -305,7 +307,8 @@ class CpuProfilesCollection {
int column_number = v8::CpuProfileNode::kNoColumnNumberInfo);
// Called from profile generator thread.
- void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path);
+ void AddPathToCurrentProfiles(
+ TimeTicks timestamp, const Vector<CodeEntry*>& path);
// Limits the number of profiles that can be simultaneously collected.
static const int kMaxSimultaneousProfiles = 100;
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698