summaryrefslogtreecommitdiff
path: root/deps/v8/src/cpu-profiler.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-08-12 10:11:03 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-08-12 10:11:03 -0700
commit083ee0f8b7a8d98d51bf2debf47d68117f13087f (patch)
treea82e78989562eaf41da7963fe0c80d8f1af94c6d /deps/v8/src/cpu-profiler.cc
parent9acd76ed6e020fa540f64eabf4bdb33513795924 (diff)
downloadnode-new-083ee0f8b7a8d98d51bf2debf47d68117f13087f.tar.gz
Upgrade V8 to 2.3.7
Diffstat (limited to 'deps/v8/src/cpu-profiler.cc')
-rw-r--r--deps/v8/src/cpu-profiler.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/deps/v8/src/cpu-profiler.cc b/deps/v8/src/cpu-profiler.cc
index c8d29f8cf5..3e554ccebd 100644
--- a/deps/v8/src/cpu-profiler.cc
+++ b/deps/v8/src/cpu-profiler.cc
@@ -476,7 +476,7 @@ void CpuProfiler::StartProcessorIfNotStarted() {
CpuProfile* CpuProfiler::StopCollectingProfile(const char* title) {
const double actual_sampling_rate = generator_->actual_sampling_rate();
- StopProcessorIfLastProfile();
+ StopProcessorIfLastProfile(title);
CpuProfile* result =
profiles_->StopProfiling(TokenEnumerator::kNoSecurityToken,
title,
@@ -491,14 +491,15 @@ CpuProfile* CpuProfiler::StopCollectingProfile(const char* title) {
CpuProfile* CpuProfiler::StopCollectingProfile(Object* security_token,
String* title) {
const double actual_sampling_rate = generator_->actual_sampling_rate();
- StopProcessorIfLastProfile();
+ const char* profile_title = profiles_->GetName(title);
+ StopProcessorIfLastProfile(profile_title);
int token = token_enumerator_->GetTokenId(security_token);
- return profiles_->StopProfiling(token, title, actual_sampling_rate);
+ return profiles_->StopProfiling(token, profile_title, actual_sampling_rate);
}
-void CpuProfiler::StopProcessorIfLastProfile() {
- if (profiles_->is_last_profile()) {
+void CpuProfiler::StopProcessorIfLastProfile(const char* title) {
+ if (profiles_->IsLastProfile(title)) {
reinterpret_cast<Sampler*>(Logger::ticker_)->Stop();
processor_->Stop();
processor_->Join();