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

Side by Side Diff: src/profiler/sampler.cc

Issue 1752173003: Additional fixes for external callback logging in profiler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test-log-stack-tracer.cc Created 4 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 unified diff | Download patch
« no previous file with comments | « src/profiler/sampler.h ('k') | test/cctest/test-log.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/profiler/sampler.h" 5 #include "src/profiler/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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 pc = 0; 676 pc = 0;
677 return; 677 return;
678 } 678 }
679 679
680 ExternalCallbackScope* scope = isolate->external_callback_scope(); 680 ExternalCallbackScope* scope = isolate->external_callback_scope();
681 Address handler = Isolate::handler(isolate->thread_local_top()); 681 Address handler = Isolate::handler(isolate->thread_local_top());
682 // If there is a handler on top of the external callback scope then 682 // If there is a handler on top of the external callback scope then
683 // we have already entrered JavaScript again and the external callback 683 // we have already entrered JavaScript again and the external callback
684 // is not the top function. 684 // is not the top function.
685 if (scope && scope->scope_address() < handler) { 685 if (scope && scope->scope_address() < handler) {
686 external_callback = scope->callback(); 686 external_callback_entry = *scope->callback_entrypoint_address();
687 has_external_callback = true; 687 has_external_callback = true;
688 } else { 688 } else {
689 // sp register may point at an arbitrary place in memory, make 689 // sp register may point at an arbitrary place in memory, make
690 // sure MSAN doesn't complain about it. 690 // sure MSAN doesn't complain about it.
691 MSAN_MEMORY_IS_INITIALIZED(regs.sp, sizeof(Address)); 691 MSAN_MEMORY_IS_INITIALIZED(regs.sp, sizeof(Address));
692 // Sample potential return address value for frameless invocation of 692 // Sample potential return address value for frameless invocation of
693 // stubs (we'll figure out later, if this value makes sense). 693 // stubs (we'll figure out later, if this value makes sense).
694 tos = Memory::Address_at(reinterpret_cast<Address>(regs.sp)); 694 tos = Memory::Address_at(reinterpret_cast<Address>(regs.sp));
695 has_external_callback = false; 695 has_external_callback = false;
696 } 696 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 SampleStack(state); 870 SampleStack(state);
871 } 871 }
872 ResumeThread(profiled_thread); 872 ResumeThread(profiled_thread);
873 } 873 }
874 874
875 #endif // USE_SIGNALS 875 #endif // USE_SIGNALS
876 876
877 877
878 } // namespace internal 878 } // namespace internal
879 } // namespace v8 879 } // namespace v8
OLDNEW
« no previous file with comments | « src/profiler/sampler.h ('k') | test/cctest/test-log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698