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

Side by Side Diff: src/sampler.cc

Issue 365863003: Reland^2 r22105 "Remove static initializer from isolate" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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/mksnapshot.cc ('k') | test/cctest/cctest.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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 void SignalHandler::HandleProfilerSignal(int signal, siginfo_t* info, 325 void SignalHandler::HandleProfilerSignal(int signal, siginfo_t* info,
326 void* context) { 326 void* context) {
327 #if V8_OS_NACL 327 #if V8_OS_NACL
328 // As Native Client does not support signal handling, profiling 328 // As Native Client does not support signal handling, profiling
329 // is disabled. 329 // is disabled.
330 return; 330 return;
331 #else 331 #else
332 USE(info); 332 USE(info);
333 if (signal != SIGPROF) return; 333 if (signal != SIGPROF) return;
334 Isolate* isolate = Isolate::UncheckedCurrent(); 334 Isolate* isolate = Isolate::UncheckedReentrantCurrent();
335 if (isolate == NULL || !isolate->IsInitialized() || !isolate->IsInUse()) { 335 if (isolate == NULL || !isolate->IsInitialized() || !isolate->IsInUse()) {
336 // We require a fully initialized and entered isolate. 336 // We require a fully initialized and entered isolate.
337 return; 337 return;
338 } 338 }
339 if (v8::Locker::IsActive() && 339 if (v8::Locker::IsActive() &&
340 !isolate->thread_manager()->IsLockedByCurrentThread()) { 340 !isolate->thread_manager()->IsLockedByCurrentThread()) {
341 return; 341 return;
342 } 342 }
343 343
344 Sampler* sampler = isolate->logger()->sampler(); 344 Sampler* sampler = isolate->logger()->sampler();
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 #endif // USE_SIMULATOR 728 #endif // USE_SIMULATOR
729 SampleStack(state); 729 SampleStack(state);
730 } 730 }
731 ResumeThread(profiled_thread); 731 ResumeThread(profiled_thread);
732 } 732 }
733 733
734 #endif // USE_SIGNALS 734 #endif // USE_SIGNALS
735 735
736 736
737 } } // namespace v8::internal 737 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mksnapshot.cc ('k') | test/cctest/cctest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698