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

Unified Diff: runtime/vm/code_patcher_x64.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_mips.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_x64.cc
diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc
index 416e15058160cd48e9b895fd7a2d5d3048dc6a29..d0ac739b3869ffcf38a174bcac36f8a7b7c6d392 100644
--- a/runtime/vm/code_patcher_x64.cc
+++ b/runtime/vm/code_patcher_x64.cc
@@ -268,38 +268,6 @@ RawCode* CodePatcher::GetNativeCallAt(uword return_address,
return call.target();
}
-
-// The expected code pattern of an edge counter in unoptimized code:
-// 49 8b 87 imm32 mov RAX, [PP + offset]
-class EdgeCounter : public ValueObject {
- public:
- EdgeCounter(uword pc, const Code& code)
- : end_(pc - FlowGraphCompiler::EdgeCounterIncrementSizeInBytes()),
- object_pool_(ObjectPool::Handle(code.GetObjectPool())) {
- ASSERT(IsValid(end_));
- }
-
- static bool IsValid(uword end) {
- uint8_t* bytes = reinterpret_cast<uint8_t*>(end - 7);
- return (bytes[0] == 0x49) && (bytes[1] == 0x8b) && (bytes[2] == 0x87);
- }
-
- RawObject* edge_counter() const {
- return object_pool_.ObjectAt(IndexFromPPLoad(end_ - 4));
- }
-
- private:
- 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_X64
« no previous file with comments | « runtime/vm/code_patcher_mips.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698