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

Issue 24744002: Pattern match on generated code to find edge counters. (Closed)

Created:
7 years, 2 months ago by Kevin Millikin (Google)
Modified:
7 years, 2 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Pattern match on generated code to find edge counters. In unoptimized code, use platform-specific pattern matching on generated code to find edge counter arrays. Previously we searched pointer offsets, but that does not work on platforms that encode the edge counters as indexes into an object pool (i.e., x64, ARM, MIPS). BUG= R=fschneider@google.com, zra@google.com Committed: https://code.google.com/p/dart/source/detail?r=28085

Patch Set 1 #

Total comments: 2

Patch Set 2 : Refactored as discussed. #

Total comments: 4

Patch Set 3 : Incorporated review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+542 lines, -322 lines) Patch
M runtime/vm/block_scheduler.cc View 3 chunks +3 lines, -18 lines 0 comments Download
M runtime/vm/code_patcher.h View 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher_arm.cc View 1 1 chunk +41 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher_ia32.cc View 1 2 chunks +34 lines, -1 line 0 comments Download
M runtime/vm/code_patcher_mips.cc View 1 1 chunk +41 lines, -0 lines 0 comments Download
M runtime/vm/code_patcher_x64.cc View 1 2 chunks +38 lines, -1 line 0 comments Download
M runtime/vm/compiler.cc View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph.h View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/flow_graph.cc View 1 chunk +8 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 2 chunks +26 lines, -1 line 0 comments Download
runtime/vm/flow_graph_compiler_arm.cc View 1 2 2 chunks +16 lines, -22 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 chunks +15 lines, -22 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 2 2 chunks +16 lines, -22 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 2 chunks +15 lines, -22 lines 0 comments Download
M runtime/vm/instructions_arm.h View 1 3 chunks +39 lines, -10 lines 0 comments Download
M runtime/vm/instructions_arm.cc View 1 4 chunks +70 lines, -53 lines 0 comments Download
M runtime/vm/instructions_mips.h View 1 3 chunks +39 lines, -10 lines 0 comments Download
M runtime/vm/instructions_mips.cc View 1 5 chunks +70 lines, -58 lines 0 comments Download
M runtime/vm/instructions_x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 2 chunks +16 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 2 chunks +11 lines, -27 lines 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 2 2 chunks +15 lines, -13 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 2 chunks +11 lines, -27 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Kevin Millikin (Google)
This change should reenable block reordering on x64 and fix it on ARM and MIPS ...
7 years, 2 months ago (2013-09-26 11:44:52 UTC) #1
srdjan
DBC: Instead of pattern matching, you could use PCDescriptors to mark counter locations. I think ...
7 years, 2 months ago (2013-09-26 18:37:08 UTC) #2
Kevin Millikin (Google)
On 2013/09/26 18:37:08, srdjan wrote: > DBC: > > Instead of pattern matching, you could ...
7 years, 2 months ago (2013-09-27 09:52:04 UTC) #3
Florian Schneider
Space cost is an issue. Considering that we already have the instruction decoding logic in, ...
7 years, 2 months ago (2013-09-30 08:55:38 UTC) #4
Kevin Millikin (Google)
> I think the assember will emit a multiple instruction (like on ARM) in that ...
7 years, 2 months ago (2013-09-30 09:16:17 UTC) #5
Kevin Millikin (Google)
I've refactored this: 1. Emit the deoptimization descriptor after the edge counters on all platforms. ...
7 years, 2 months ago (2013-09-30 13:59:35 UTC) #6
zra
arm/mips in FlowGraphCompiler::EmitEdgeCounter() lgtm. https://codereview.chromium.org/24744002/diff/9001/runtime/vm/code_patcher_mips.cc File runtime/vm/code_patcher_mips.cc (right): https://codereview.chromium.org/24744002/diff/9001/runtime/vm/code_patcher_mips.cc#newcode89 runtime/vm/code_patcher_mips.cc:89: // MIPS is complicated because ...
7 years, 2 months ago (2013-09-30 15:22:14 UTC) #7
sra1
https://codereview.chromium.org/24744002/diff/9001/runtime/vm/code_patcher_x64.cc File runtime/vm/code_patcher_x64.cc (right): https://codereview.chromium.org/24744002/diff/9001/runtime/vm/code_patcher_x64.cc#newcode274 runtime/vm/code_patcher_x64.cc:274: // 4c 01 58 17 addq [rax+0x17],r11 This is ...
7 years, 2 months ago (2013-09-30 16:23:06 UTC) #8
Florian Schneider
lgtm https://codereview.chromium.org/24744002/diff/9001/runtime/vm/intermediate_language_mips.cc File runtime/vm/intermediate_language_mips.cc (right): https://codereview.chromium.org/24744002/diff/9001/runtime/vm/intermediate_language_mips.cc#newcode3871 runtime/vm/intermediate_language_mips.cc:3871: 0); // No token position. Use Scanner::kDummyTokenIndex?
7 years, 2 months ago (2013-10-01 10:10:01 UTC) #9
Kevin Millikin (Google)
7 years, 2 months ago (2013-10-01 10:23:19 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 manually as r28085 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698