mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Attempt to fix Windows Dartium #2
BUG= Review URL: https://codereview.chromium.org//1129903007 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45802 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
3ffb42cd22
commit
3f694c96ba
1 changed files with 28 additions and 30 deletions
|
@ -948,28 +948,10 @@ static void CollectSample(Isolate* isolate,
|
||||||
bool exited_dart_code,
|
bool exited_dart_code,
|
||||||
bool in_dart_code,
|
bool in_dart_code,
|
||||||
Sample* sample,
|
Sample* sample,
|
||||||
uword stack_lower,
|
ProfilerNativeStackWalker* native_stack_walker,
|
||||||
uword stack_upper,
|
ProfilerDartExitStackWalker* dart_exit_stack_walker,
|
||||||
uword pc,
|
ProfilerDartStackWalker* dart_stack_walker,
|
||||||
uword fp,
|
uword pc) {
|
||||||
uword sp) {
|
|
||||||
ProfilerNativeStackWalker nativeStackWalker(sample,
|
|
||||||
stack_lower,
|
|
||||||
stack_upper,
|
|
||||||
pc,
|
|
||||||
fp,
|
|
||||||
sp);
|
|
||||||
|
|
||||||
ProfilerDartExitStackWalker dartExitStackWalker(isolate, sample);
|
|
||||||
|
|
||||||
ProfilerDartStackWalker dartStackWalker(isolate,
|
|
||||||
sample,
|
|
||||||
stack_lower,
|
|
||||||
stack_upper,
|
|
||||||
pc,
|
|
||||||
fp,
|
|
||||||
sp);
|
|
||||||
|
|
||||||
#if defined(TARGET_OS_WINDOWS)
|
#if defined(TARGET_OS_WINDOWS)
|
||||||
// Use structured exception handling to trap guard page access on Windows.
|
// Use structured exception handling to trap guard page access on Windows.
|
||||||
__try {
|
__try {
|
||||||
|
@ -980,13 +962,13 @@ static void CollectSample(Isolate* isolate,
|
||||||
|
|
||||||
if (FLAG_profile_vm) {
|
if (FLAG_profile_vm) {
|
||||||
// Always walk the native stack collecting both native and Dart frames.
|
// Always walk the native stack collecting both native and Dart frames.
|
||||||
nativeStackWalker.walk();
|
native_stack_walker->walk();
|
||||||
} else if (exited_dart_code) {
|
} else if (exited_dart_code) {
|
||||||
// We have a valid exit frame info, use the Dart stack walker.
|
// We have a valid exit frame info, use the Dart stack walker.
|
||||||
dartExitStackWalker.walk();
|
dart_exit_stack_walker->walk();
|
||||||
} else if (in_dart_code) {
|
} else if (in_dart_code) {
|
||||||
// We are executing Dart code. We have frame pointers.
|
// We are executing Dart code. We have frame pointers.
|
||||||
dartStackWalker.walk();
|
dart_stack_walker->walk();
|
||||||
} else {
|
} else {
|
||||||
sample->set_vm_tag(VMTag::kEmbedderTagId);
|
sample->set_vm_tag(VMTag::kEmbedderTagId);
|
||||||
sample->SetAt(0, pc);
|
sample->SetAt(0, pc);
|
||||||
|
@ -1154,16 +1136,32 @@ void Profiler::RecordSampleInterruptCallback(
|
||||||
sample->set_fp(fp);
|
sample->set_fp(fp);
|
||||||
sample->set_lr(lr);
|
sample->set_lr(lr);
|
||||||
|
|
||||||
|
ProfilerNativeStackWalker native_stack_walker(sample,
|
||||||
|
stack_lower,
|
||||||
|
stack_upper,
|
||||||
|
pc,
|
||||||
|
fp,
|
||||||
|
sp);
|
||||||
|
|
||||||
|
ProfilerDartExitStackWalker dart_exit_stack_walker(isolate, sample);
|
||||||
|
|
||||||
|
ProfilerDartStackWalker dart_stack_walker(isolate,
|
||||||
|
sample,
|
||||||
|
stack_lower,
|
||||||
|
stack_upper,
|
||||||
|
pc,
|
||||||
|
fp,
|
||||||
|
sp);
|
||||||
|
|
||||||
// All memory access is done inside CollectSample.
|
// All memory access is done inside CollectSample.
|
||||||
CollectSample(isolate,
|
CollectSample(isolate,
|
||||||
exited_dart_code,
|
exited_dart_code,
|
||||||
in_dart_code,
|
in_dart_code,
|
||||||
sample,
|
sample,
|
||||||
stack_lower,
|
&native_stack_walker,
|
||||||
stack_upper,
|
&dart_exit_stack_walker,
|
||||||
pc,
|
&dart_stack_walker,
|
||||||
fp,
|
pc);
|
||||||
sp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dart
|
} // namespace dart
|
||||||
|
|
Loading…
Reference in a new issue