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

Unified Diff: runtime/vm/code_patcher_mips.cc

Issue 1343383003: VM: Store edge counters in one per-function array. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/code_patcher_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_mips.cc
diff --git a/runtime/vm/code_patcher_mips.cc b/runtime/vm/code_patcher_mips.cc
index aad4413603ba5e61c4f22e56a15febdd2b6ece07..09b06a2f249f55e3cb8eb47bbddb69150294ee7c 100644
--- a/runtime/vm/code_patcher_mips.cc
+++ b/runtime/vm/code_patcher_mips.cc
@@ -88,48 +88,6 @@ RawCode* CodePatcher::GetNativeCallAt(uword return_address,
return call.target();
}
-
-// This class pattern matches on a load from the object pool. Loading on
-// MIPS is complicated because it can take four possible different forms.
-// We match backwards from the end of the sequence so we can reuse the code
-// for matching object pool loads at calls.
-class EdgeCounter : public ValueObject {
- public:
- EdgeCounter(uword pc, const Code& code)
- : end_(pc - kAdjust),
- object_pool_(ObjectPool::Handle(code.GetObjectPool())) {
- // An IsValid predicate is complicated and duplicates the code in the
- // decoding function. Instead we rely on decoding the pattern which
- // will assert partial validity.
- }
-
- RawObject* edge_counter() const {
- Register ignored;
- intptr_t index;
- InstructionPattern::DecodeLoadWordFromPool(end_, &ignored, &index);
- ASSERT(ignored == T0);
- return object_pool_.ObjectAt(index);
- }
-
- private:
- // The object pool load is followed by the fixed-size edge counter
- // incrementing code:
- // lw r9, 11(r8)
- // addiu r9, r9, 2
- // sw r9, 11(r8)
- static const intptr_t kAdjust = 3 * Instr::kInstrSize;
-
- uword end_;
- const ObjectPool& object_pool_;
-};
-
-
-RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) {
- ASSERT(code.ContainsInstructionAt(pc));
- EdgeCounter counter(pc, code);
- return counter.edge_counter();
-}
-
} // namespace dart
#endif // defined TARGET_ARCH_MIPS
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698