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

Issue 2457133002: [Courgette] Refactor: Add AssemblyProgram::DispatchInstructionLabels() to hide InstructionVector us… (Closed)

Created:
4 years, 1 month ago by huangs
Modified:
4 years, 1 month ago
Reviewers:
chrisha
CC:
chromium-reviews, wfh+watch_chromium.org, huangs+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Courgette] Refactor: Add AssemblyProgram::DispatchInstructionLabels() to hide InstructionVector usage. To reduce Courgette memory usage (and possibly solve installer crashes), we plan to make AssemblyProgram store instructions more efficiently. We start by hiding AssemblyProgram's InstructionVector usage from AdjustmentMethod and AdjustmentMethod2. Previously AdjustmentMethod[2] get AssemblyProgram's instruction vector, and loop over it to extract labels from abs32/rel32 instructions. This CL moves the loop into AssemblyProgram::DispatchInstructionLabels(). Callers now specify a map of handlers, without needing to know how instructions are stored in AssemblyProgram. Committed: https://crrev.com/99a5a8c3c7923a01d37a6d6d63203234d310e320 Cr-Commit-Position: refs/heads/master@{#428522}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rename 'Dispatch' to 'Handle'. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -58 lines) Patch
M courgette/adjustment_method.cc View 1 3 chunks +13 lines, -10 lines 0 comments Download
M courgette/adjustment_method_2.cc View 1 3 chunks +13 lines, -11 lines 0 comments Download
M courgette/assembly_program.h View 1 3 chunks +9 lines, -16 lines 0 comments Download
M courgette/assembly_program.cc View 1 1 chunk +8 lines, -21 lines 0 comments Download

Messages

Total messages: 13 (6 generated)
huangs
PTAL. Thanks!
4 years, 1 month ago (2016-10-28 18:49:25 UTC) #3
chrisha
I find the "hander" and "dispatch" terminology slightly inconsistent, but overall lgtm. https://codereview.chromium.org/2457133002/diff/1/courgette/assembly_program.h File courgette/assembly_program.h ...
4 years, 1 month ago (2016-10-28 20:39:14 UTC) #4
huangs
Thanks. Committing! https://codereview.chromium.org/2457133002/diff/1/courgette/assembly_program.h File courgette/assembly_program.h (right): https://codereview.chromium.org/2457133002/diff/1/courgette/assembly_program.h#newcode84 courgette/assembly_program.h:84: using LabelDispatcherMap = std::map<OP, LabelHandler>; On 2016/10/28 ...
4 years, 1 month ago (2016-10-28 21:48:13 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2457133002/20001
4 years, 1 month ago (2016-10-28 21:49:09 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-10-28 22:29:57 UTC) #10
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/99a5a8c3c7923a01d37a6d6d63203234d310e320 Cr-Commit-Position: refs/heads/master@{#428522}
4 years, 1 month ago (2016-10-28 22:31:41 UTC) #12
huangs
4 years, 1 month ago (2016-10-31 22:43:00 UTC) #13
Message was sent while issue was closed.
Oops the title and description should use "Handle", not "Dispatch".

Also, tracking bug is: http://crbug.com/660980

Powered by Google App Engine
This is Rietveld 408576698