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

Unified Diff: runtime/vm/code_patcher_ia32.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_arm64.cc ('k') | runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_ia32.cc
diff --git a/runtime/vm/code_patcher_ia32.cc b/runtime/vm/code_patcher_ia32.cc
index e1f54839c44a723a23eb81fb46670aded5a5d961..d0a4f07c921567cfdccb94d8509e193ee82b70e8 100644
--- a/runtime/vm/code_patcher_ia32.cc
+++ b/runtime/vm/code_patcher_ia32.cc
@@ -232,35 +232,6 @@ intptr_t CodePatcher::InstanceCallSizeInBytes() {
return InstanceCall::kPatternSize;
}
-
-// The expected code pattern of an edge counter in unoptimized code:
-// b8 imm32 mov EAX, immediate
-class EdgeCounter : public ValueObject {
- public:
- EdgeCounter(uword pc, const Code& ignored)
- : end_(pc - FlowGraphCompiler::EdgeCounterIncrementSizeInBytes()) {
- ASSERT(IsValid(end_));
- }
-
- static bool IsValid(uword end) {
- return (*reinterpret_cast<uint8_t*>(end - 5) == 0xb8);
- }
-
- RawObject* edge_counter() const {
- return *reinterpret_cast<RawObject**>(end_ - 4);
- }
-
- private:
- uword end_;
-};
-
-
-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_IA32
« no previous file with comments | « runtime/vm/code_patcher_arm64.cc ('k') | runtime/vm/code_patcher_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698