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

Unified Diff: runtime/vm/profiler.cc

Issue 1247783002: Make array allocation stub shared between isolates. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index b674952c42fdb22f89c94cddca4d18967a8a0734..8dc13094703f21b0f186ba4810a0319081f42e56 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -464,7 +464,7 @@ class ProfilerDartStackWalker : public ValueObject {
}
ASSERT(ValidFramePointer());
uword return_pc = InitialReturnAddress();
- if (StubCode::InInvocationStubForIsolate(isolate_, return_pc)) {
+ if (StubCode::InInvocationStub(return_pc)) {
// Edge case- we have called out from the Invocation Stub but have not
// created the stack frame of the callee. Attempt to locate the exit
// frame before walking the stack.
@@ -488,16 +488,14 @@ class ProfilerDartStackWalker : public ValueObject {
if (!ValidFramePointer()) {
return false;
}
- if (StubCode::InInvocationStubForIsolate(isolate_,
- reinterpret_cast<uword>(pc_))) {
+ if (StubCode::InInvocationStub(reinterpret_cast<uword>(pc_))) {
// In invocation stub.
return NextExit();
}
// In regular Dart frame.
uword* new_pc = CallerPC();
// Check if we've moved into the invocation stub.
- if (StubCode::InInvocationStubForIsolate(isolate_,
- reinterpret_cast<uword>(new_pc))) {
+ if (StubCode::InInvocationStub(reinterpret_cast<uword>(new_pc))) {
// New PC is inside invocation stub, skip.
return NextExit();
}
@@ -827,8 +825,7 @@ void Profiler::RecordAllocation(Isolate* isolate, intptr_t cid) {
}
ASSERT(isolate != Dart::vm_isolate());
- const bool exited_dart_code = (isolate->stub_code() != NULL) &&
- (isolate->top_exit_frame_info() != 0) &&
+ const bool exited_dart_code = (isolate->top_exit_frame_info() != 0) &&
(isolate->vm_tag() != VMTag::kDartTagId);
if (!exited_dart_code) {
@@ -883,11 +880,9 @@ void Profiler::RecordSampleInterruptCallback(
ASSERT(isolate != Dart::vm_isolate());
- const bool exited_dart_code = (isolate->stub_code() != NULL) &&
- (isolate->top_exit_frame_info() != 0) &&
+ const bool exited_dart_code = (isolate->top_exit_frame_info() != 0) &&
(isolate->vm_tag() != VMTag::kDartTagId);
- const bool in_dart_code = (isolate->stub_code() != NULL) &&
- (isolate->top_exit_frame_info() == 0) &&
+ const bool in_dart_code = (isolate->top_exit_frame_info() == 0) &&
(isolate->vm_tag() == VMTag::kDartTagId);
uintptr_t sp = 0;

Powered by Google App Engine
This is Rietveld 408576698