|
|
Created:
3 years, 8 months ago by brucedawson Modified:
3 years, 8 months ago CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan, zturner Target Ref:
refs/heads/master Project:
v8 Visibility:
Public. |
DescriptionReduce VC++ padding in IncrementalMarking class
IncrementalMarking has nine bytes of padding in 32-bit and 64-bit
builds. Fixing 32-bit builds just requires moving the one-byte
incremental_marking_job_ member. Fixing 64-bit requires moving the
four-byte state_ member. This change reduces the padding to one byte.
On 64-bit this reduces its size from 152 to 144. This also fits heap
granularity better. On 32-bit it goes from 96 to 88 bytes.
The initial padding was found with llvm-pdbdump.exe. The fix was
verified by compiling v8/src/assembler.cc with the undocumented
/d1reportSingleClassLayout option, like this:
/d1reportSingleClassLayoutIncrementalMarking
The savings should apply on all platforms, or at worst should make no
difference except for improving alignment.
Thanks to zturner@ for some llvm-pdbdump improvements.
BUG=chromium:710933
Review-Url: https://codereview.chromium.org/2808473003
Cr-Commit-Position: refs/heads/master@{#44698}
Committed: https://chromium.googlesource.com/v8/v8/+/f4a57545e8b89fb2bbf23d6724d2654f368601eb
Patch Set 1 #Patch Set 2 : Reorder initialization #
Messages
Total messages: 25 (15 generated)
brucedawson@chromium.org changed reviewers: + bradnelson@chromium.org
I don't know if this object is allocated enough to matter. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. To some extent this was just a test of the techniques needed. If there are v8 classes which there are many instances of I can audit them for alignment/padding.
Description was changed from ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. ========== to ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. ==========
lgtm Any concerns hpayer?
Description was changed from ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. ========== to ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. BUG=710933 ==========
The CQ bit was checked by brucedawson@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/39198)
Description was changed from ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. BUG=710933 ========== to ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. BUG=chromium:710933 ==========
brucedawson@chromium.org changed reviewers: + hpayer@chromium.org
hpayer@ - PTAL?
The CQ bit was checked by brucedawson@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Okay, it passes the try bots now. Previously the compiler was warning that the constructor initialization order was inconsistent with the class order, and I hadn't noticed the failures. I've fixed that now. BTW, I guess this is another reason to like inline member initialization, since then the two places don't need to be manually synchronized. PTAL hpayer@
LGTM, sorry, was OOO. It will not make a difference for V8 overall since these objects are not used a lot. It may however make sense to look into other objects.
On 2017/04/18 16:10:19, Hannes Payer wrote: > LGTM, sorry, was OOO. > > It will not make a difference for V8 overall since these objects are not used a > lot. It may however make sense to look into other objects. Understood. If you have any recommendations on what types or classes of types would gain the most from having their packing optimized then please let me know - perhaps add comments to bug 710933?
The CQ bit was checked by brucedawson@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from bradnelson@chromium.org Link to the patchset: https://codereview.chromium.org/2808473003/#ps20001 (title: "Reorder initialization")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1492539023528350, "parent_rev": "26bc5906295100300252463e2f5914279e30970f", "commit_rev": "f4a57545e8b89fb2bbf23d6724d2654f368601eb"}
Message was sent while issue was closed.
Description was changed from ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. BUG=chromium:710933 ========== to ========== Reduce VC++ padding in IncrementalMarking class IncrementalMarking has nine bytes of padding in 32-bit and 64-bit builds. Fixing 32-bit builds just requires moving the one-byte incremental_marking_job_ member. Fixing 64-bit requires moving the four-byte state_ member. This change reduces the padding to one byte. On 64-bit this reduces its size from 152 to 144. This also fits heap granularity better. On 32-bit it goes from 96 to 88 bytes. The initial padding was found with llvm-pdbdump.exe. The fix was verified by compiling v8/src/assembler.cc with the undocumented /d1reportSingleClassLayout option, like this: /d1reportSingleClassLayoutIncrementalMarking The savings should apply on all platforms, or at worst should make no difference except for improving alignment. Thanks to zturner@ for some llvm-pdbdump improvements. BUG=chromium:710933 Review-Url: https://codereview.chromium.org/2808473003 Cr-Commit-Position: refs/heads/master@{#44698} Committed: https://chromium.googlesource.com/v8/v8/+/f4a57545e8b89fb2bbf23d6724d2654f368... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/v8/v8/+/f4a57545e8b89fb2bbf23d6724d2654f368... |