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

Issue 2010243003: Move hashmap into base/. (Closed)

Created:
4 years, 6 months ago by lpy
Modified:
4 years, 6 months ago
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Move hashmap into src/base. We ported hashmap.h into libsampler as a workaround before, so the main focus of this patch is to reduce code duplication. This patch moves the hashmap into src/base as well as creates DefaultAllocationPolicy using malloc and free. BUG=v8:5050 LOG=n Committed: https://crrev.com/2fd55667a63a1428e9501336e5cd97f5431aa607 Cr-Commit-Position: refs/heads/master@{#36873}

Patch Set 1 #

Patch Set 2 : lower similarity #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : Create default allocation policy #

Patch Set 6 : rebase #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -1028 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 3 chunks +1 line, -3 lines 0 comments Download
M src/address-map.h View 1 2 3 4 5 chunks +12 lines, -11 lines 0 comments Download
M src/address-map.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/simulator-arm.h View 1 2 3 4 5 chunks +7 lines, -9 lines 0 comments Download
M src/arm/simulator-arm.cc View 1 2 3 4 6 chunks +8 lines, -16 lines 0 comments Download
M src/arm64/simulator-arm64.h View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M src/arm64/simulator-arm64.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/ast/ast.h View 1 2 3 4 2 chunks +8 lines, -6 lines 0 comments Download
M src/ast/ast.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/ast/ast-value-factory.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M src/ast/ast-value-factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ast/scopes.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + src/base/hashmap.h View 1 2 3 4 15 chunks +40 lines, -46 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M src/compilation-cache.h View 1 chunk +1 line, -1 line 0 comments Download
M src/d8.h View 4 chunks +7 lines, -7 lines 0 comments Download
M src/debug/debug.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/gdb-jit.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M src/hashmap.h View 1 2 3 4 1 chunk +0 lines, -356 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 3 chunks +5 lines, -6 lines 0 comments Download
M src/heap/heap-inl.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 4 chunks +4 lines, -4 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M src/heap/spaces.cc View 1 2 3 4 5 6 3 chunks +4 lines, -6 lines 0 comments Download
M src/isolate.h View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
D src/libsampler/hashmap.h View 1 chunk +0 lines, -278 lines 0 comments Download
D src/libsampler/utils.h View 1 chunk +0 lines, -27 lines 0 comments Download
M src/libsampler/v8-sampler.cc View 1 2 3 4 5 5 chunks +8 lines, -8 lines 0 comments Download
M src/mips/simulator-mips.h View 1 2 3 4 5 chunks +7 lines, -9 lines 0 comments Download
M src/mips/simulator-mips.cc View 1 2 3 4 6 chunks +8 lines, -16 lines 0 comments Download
M src/mips64/simulator-mips64.h View 1 2 3 4 5 chunks +7 lines, -9 lines 0 comments Download
M src/mips64/simulator-mips64.cc View 1 2 3 4 6 chunks +8 lines, -14 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/preparse-data.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/preparse-data.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/parsing/preparser.cc View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M src/parsing/scanner.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/parsing/scanner.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ppc/simulator-ppc.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/profiler/allocation-tracker.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/profiler/allocation-tracker.cc View 2 chunks +3 lines, -5 lines 0 comments Download
M src/profiler/heap-snapshot-generator.h View 5 chunks +6 lines, -6 lines 0 comments Download
M src/profiler/heap-snapshot-generator.cc View 1 2 3 4 5 6 16 chunks +25 lines, -37 lines 0 comments Download
M src/profiler/profile-generator.h View 3 chunks +4 lines, -4 lines 0 comments Download
M src/profiler/profile-generator.cc View 5 chunks +7 lines, -7 lines 0 comments Download
M src/profiler/strings-storage.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/profiler/strings-storage.cc View 4 chunks +8 lines, -7 lines 0 comments Download
M src/s390/simulator-s390.h View 1 2 3 4 5 chunks +7 lines, -9 lines 0 comments Download
M src/s390/simulator-s390.cc View 1 2 3 4 5 6 6 chunks +8 lines, -11 lines 0 comments Download
M src/snapshot/partial-serializer.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/snapshot/serializer.h View 3 chunks +12 lines, -11 lines 0 comments Download
M src/snapshot/serializer-common.h View 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/serializer-common.cc View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
M src/typing-asm.cc View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 3 chunks +1 line, -3 lines 0 comments Download
M src/wasm/asm-wasm-builder.cc View 1 2 3 4 5 6 3 chunks +7 lines, -5 lines 0 comments Download
M src/wasm/wasm-js.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/zone.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 8 chunks +12 lines, -12 lines 0 comments Download
M test/cctest/test-hashmap.cc View 5 chunks +7 lines, -5 lines 0 comments Download
M test/cctest/test-heap-profiler.cc View 6 chunks +6 lines, -7 lines 0 comments Download

Messages

Total messages: 35 (13 generated)
lpy
PTAL.
4 years, 6 months ago (2016-05-27 21:10:48 UTC) #2
Benedikt Meurer
Looks like Chrome switched to std::unordered_map (according to base/containers/hash_tables.h). So it should be fine for ...
4 years, 6 months ago (2016-05-28 17:51:00 UTC) #3
lpy
On 2016/05/28 17:51:00, Benedikt Meurer wrote: > Looks like Chrome switched to std::unordered_map (according to ...
4 years, 6 months ago (2016-05-28 18:22:49 UTC) #4
Benedikt Meurer
Aye, makes sense. Thanks for the explanation. Can you put that as a comment on ...
4 years, 6 months ago (2016-05-29 18:07:03 UTC) #5
Michael Starzinger
LGTM.
4 years, 6 months ago (2016-05-30 08:11:56 UTC) #6
Yang
LGTM, with some comments. https://codereview.chromium.org/2010243003/diff/60001/src/base/hashmap.cc File src/base/hashmap.cc (right): https://codereview.chromium.org/2010243003/diff/60001/src/base/hashmap.cc#newcode115 src/base/hashmap.cc:115: HashMapImpl::Entry* HashMapImpl::LookupOrInsert(void* key, uint32_t hash) ...
4 years, 6 months ago (2016-05-30 09:19:04 UTC) #7
lpy
On 2016/05/30 09:19:04, Yang wrote: > LGTM, with some comments. > > https://codereview.chromium.org/2010243003/diff/60001/src/base/hashmap.cc > File ...
4 years, 6 months ago (2016-05-31 20:05:42 UTC) #8
lpy
I made a few changes, yang@ could you please take a look?
4 years, 6 months ago (2016-06-01 00:20:12 UTC) #10
lpy
On 2016/06/01 00:20:12, lpy wrote: > I made a few changes, yang@ could you please ...
4 years, 6 months ago (2016-06-08 08:43:42 UTC) #11
Yang
On 2016/06/08 08:43:42, lpy wrote: > On 2016/06/01 00:20:12, lpy wrote: > > I made ...
4 years, 6 months ago (2016-06-08 08:49:16 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2010243003/100001
4 years, 6 months ago (2016-06-08 17:47:48 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/16777)
4 years, 6 months ago (2016-06-08 17:53:00 UTC) #17
lpy
+ bradnelson@ for src/wasm/ owner review. + adamk@ for src/parsing/ owner review. bradnelson@, adamk@, PTAL.
4 years, 6 months ago (2016-06-08 18:39:14 UTC) #19
lpy
4 years, 6 months ago (2016-06-08 18:39:37 UTC) #21
adamk
lgtm for parser
4 years, 6 months ago (2016-06-08 20:31:59 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2010243003/120001
4 years, 6 months ago (2016-06-09 06:04:50 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/16804)
4 years, 6 months ago (2016-06-09 06:10:42 UTC) #27
bradnelson
lgtm on wasm parts.
4 years, 6 months ago (2016-06-09 17:49:27 UTC) #28
lpy
Thanks for reviewing this patch.
4 years, 6 months ago (2016-06-09 17:51:30 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2010243003/120001
4 years, 6 months ago (2016-06-09 17:55:23 UTC) #31
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 6 months ago (2016-06-09 17:58:19 UTC) #33
commit-bot: I haz the power
4 years, 6 months ago (2016-06-09 18:00:40 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/2fd55667a63a1428e9501336e5cd97f5431aa607
Cr-Commit-Position: refs/heads/master@{#36873}

Powered by Google App Engine
This is Rietveld 408576698