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

Unified Diff: src/cpu-profiler.cc

Issue 13454002: Allow recording individual samples in addition to the aggregated CPU profiles (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase 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/cpu-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index 15edc1ebdc0096b23eef5361d24c4f1613b6ebb4..043f58cbd81910466650a626ad90671c1d590a5b 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -260,13 +260,14 @@ void ProfilerEventsProcessor::Run() {
void CpuProfiler::StartProfiling(const char* title) {
ASSERT(Isolate::Current()->cpu_profiler() != NULL);
- Isolate::Current()->cpu_profiler()->StartCollectingProfile(title);
+ Isolate::Current()->cpu_profiler()->StartCollectingProfile(title, false);
}
-void CpuProfiler::StartProfiling(String* title) {
+void CpuProfiler::StartProfiling(String* title, bool record_samples) {
ASSERT(Isolate::Current()->cpu_profiler() != NULL);
- Isolate::Current()->cpu_profiler()->StartCollectingProfile(title);
+ Isolate::Current()->cpu_profiler()->StartCollectingProfile(
+ title, record_samples);
}
@@ -468,16 +469,17 @@ void CpuProfiler::ResetProfiles() {
profiles_ = new CpuProfilesCollection();
}
-void CpuProfiler::StartCollectingProfile(const char* title) {
- if (profiles_->StartProfiling(title, next_profile_uid_++)) {
+void CpuProfiler::StartCollectingProfile(const char* title,
+ bool record_samples) {
+ if (profiles_->StartProfiling(title, next_profile_uid_++, record_samples)) {
StartProcessorIfNotStarted();
}
processor_->AddCurrentStack();
}
-void CpuProfiler::StartCollectingProfile(String* title) {
- StartCollectingProfile(profiles_->GetName(title));
+void CpuProfiler::StartCollectingProfile(String* title, bool record_samples) {
+ StartCollectingProfile(profiles_->GetName(title), record_samples);
}
« no previous file with comments | « src/cpu-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698