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

Side by Side Diff: src/sampler.cc

Issue 504093002: Fix and re-enable test-api/InitializeAndDispose. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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
« no previous file with comments | « src/lithium.cc ('k') | src/v8.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/sampler.h" 5 #include "src/sampler.h"
6 6
7 #if V8_OS_POSIX && !V8_OS_CYGWIN 7 #if V8_OS_POSIX && !V8_OS_CYGWIN
8 8
9 #define USE_SIGNALS 9 #define USE_SIGNALS
10 10
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 Simulator* simulator_; 269 Simulator* simulator_;
270 }; 270 };
271 #endif // USE_SIMULATOR 271 #endif // USE_SIMULATOR
272 272
273 273
274 #if defined(USE_SIGNALS) 274 #if defined(USE_SIGNALS)
275 275
276 class SignalHandler : public AllStatic { 276 class SignalHandler : public AllStatic {
277 public: 277 public:
278 static void SetUp() { if (!mutex_) mutex_ = new base::Mutex(); } 278 static void SetUp() { if (!mutex_) mutex_ = new base::Mutex(); }
279 static void TearDown() { delete mutex_; } 279 static void TearDown() { delete mutex_; mutex_ = NULL; }
280 280
281 static void IncreaseSamplerCount() { 281 static void IncreaseSamplerCount() {
282 base::LockGuard<base::Mutex> lock_guard(mutex_); 282 base::LockGuard<base::Mutex> lock_guard(mutex_);
283 if (++client_count_ == 1) Install(); 283 if (++client_count_ == 1) Install();
284 } 284 }
285 285
286 static void DecreaseSamplerCount() { 286 static void DecreaseSamplerCount() {
287 base::LockGuard<base::Mutex> lock_guard(mutex_); 287 base::LockGuard<base::Mutex> lock_guard(mutex_);
288 if (--client_count_ == 0) Restore(); 288 if (--client_count_ == 0) Restore();
289 } 289 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 #endif // USE_SIMULATOR 738 #endif // USE_SIMULATOR
739 SampleStack(state); 739 SampleStack(state);
740 } 740 }
741 ResumeThread(profiled_thread); 741 ResumeThread(profiled_thread);
742 } 742 }
743 743
744 #endif // USE_SIGNALS 744 #endif // USE_SIGNALS
745 745
746 746
747 } } // namespace v8::internal 747 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698