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

Side by Side Diff: src/api.cc

Issue 2128613004: Move SimulatorHelper into V8 out of profiler clients. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | src/log.cc » ('j') | src/log.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7562 matching lines...) Expand 10 before | Expand all | Expand 10 after
7573 isolate->heap()->CollectCodeStatistics(); 7573 isolate->heap()->CollectCodeStatistics();
7574 7574
7575 code_statistics->code_and_metadata_size_ = isolate->code_and_metadata_size(); 7575 code_statistics->code_and_metadata_size_ = isolate->code_and_metadata_size();
7576 code_statistics->bytecode_and_metadata_size_ = 7576 code_statistics->bytecode_and_metadata_size_ =
7577 isolate->bytecode_and_metadata_size(); 7577 isolate->bytecode_and_metadata_size();
7578 return true; 7578 return true;
7579 } 7579 }
7580 7580
7581 void Isolate::GetStackSample(const RegisterState& state, void** frames, 7581 void Isolate::GetStackSample(const RegisterState& state, void** frames,
7582 size_t frames_limit, SampleInfo* sample_info) { 7582 size_t frames_limit, SampleInfo* sample_info) {
7583 #if defined(USE_SIMULATOR) 7583 if (TickSample::GetStackSample(this, state, TickSample::kSkipCEntryFrame,
7584 RegisterState regs; 7584 frames, frames_limit, sample_info))
7585 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7586 if (!i::SimulatorHelper::FillRegisters(isolate, &regs)) {
7587 sample_info->frames_count = 0;
7588 sample_info->vm_state = OTHER;
7589 sample_info->external_callback_entry = nullptr;
7590 return; 7585 return;
Yang 2016/07/08 08:40:46 brackets around this please :)
alph 2016/07/08 21:47:42 Done.
7591 } 7586 sample_info->frames_count = 0;
7592 #else 7587 sample_info->vm_state = OTHER;
7593 const RegisterState& regs = state; 7588 sample_info->external_callback_entry = nullptr;
7594 #endif
7595 TickSample::GetStackSample(this, regs, TickSample::kSkipCEntryFrame, frames,
7596 frames_limit, sample_info);
7597 } 7589 }
7598 7590
7599 size_t Isolate::NumberOfPhantomHandleResetsSinceLastCall() { 7591 size_t Isolate::NumberOfPhantomHandleResetsSinceLastCall() {
7600 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7592 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7601 size_t result = isolate->global_handles()->NumberOfPhantomHandleResets(); 7593 size_t result = isolate->global_handles()->NumberOfPhantomHandleResets();
7602 isolate->global_handles()->ResetNumberOfPhantomHandleResets(); 7594 isolate->global_handles()->ResetNumberOfPhantomHandleResets();
7603 return result; 7595 return result;
7604 } 7596 }
7605 7597
7606 void Isolate::SetEventLogger(LogEventCallback that) { 7598 void Isolate::SetEventLogger(LogEventCallback that) {
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
8937 Address callback_address = 8929 Address callback_address =
8938 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8930 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8939 VMState<EXTERNAL> state(isolate); 8931 VMState<EXTERNAL> state(isolate);
8940 ExternalCallbackScope call_scope(isolate, callback_address); 8932 ExternalCallbackScope call_scope(isolate, callback_address);
8941 callback(info); 8933 callback(info);
8942 } 8934 }
8943 8935
8944 8936
8945 } // namespace internal 8937 } // namespace internal
8946 } // namespace v8 8938 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/log.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698