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

Unified Diff: runtime/vm/profiler.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index b8827c58e7f1109068c6035ea041db8114e01ae2..3445cca29d34daa7971b302d36b644c8b6d0f54d 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -203,14 +203,14 @@ class ReturnAddressLocator : public ValueObject {
// Returns offset into code object.
intptr_t RelativePC() {
- ASSERT(pc() >= code_.EntryPoint());
- return static_cast<intptr_t>(pc() - code_.EntryPoint());
+ ASSERT(pc() >= code_.PayloadStart());
+ return static_cast<intptr_t>(pc() - code_.PayloadStart());
}
uint8_t* CodePointer(intptr_t offset) {
const intptr_t size = code_.Size();
ASSERT(offset < size);
- uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code_.EntryPoint());
+ uint8_t* code_pointer = reinterpret_cast<uint8_t*>(code_.PayloadStart());
code_pointer += offset;
return code_pointer;
}
@@ -1261,8 +1261,8 @@ CodeDescriptor::CodeDescriptor(const Code& code) : code_(code) {
}
-uword CodeDescriptor::Entry() const {
- return code_.EntryPoint();
+uword CodeDescriptor::Start() const {
+ return code_.PayloadStart();
}
@@ -1337,11 +1337,11 @@ void CodeLookupTable::Build(Thread* thread) {
for (intptr_t i = 0; i < length() - 1; i++) {
const CodeDescriptor* a = At(i);
const CodeDescriptor* b = At(i + 1);
- ASSERT(a->Entry() < b->Entry());
- ASSERT(FindCode(a->Entry()) == a);
- ASSERT(FindCode(b->Entry()) == b);
- ASSERT(FindCode(a->Entry() + a->Size() - 1) == a);
- ASSERT(FindCode(b->Entry() + b->Size() - 1) == b);
+ ASSERT(a->Start() < b->Start());
+ ASSERT(FindCode(a->Start()) == a);
+ ASSERT(FindCode(b->Start()) == b);
+ ASSERT(FindCode(a->Start() + a->Size() - 1) == a);
+ ASSERT(FindCode(b->Start() + b->Size() - 1) == b);
}
#endif
}
@@ -1362,7 +1362,7 @@ const CodeDescriptor* CodeLookupTable::FindCode(uword pc) const {
intptr_t step = count / 2;
current += step;
const CodeDescriptor* cd = At(current);
- if (pc >= cd->Entry()) {
+ if (pc >= cd->Start()) {
first = ++current;
count -= step + 1;
} else {
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698