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

Issue 1803253002: Improved iterator for persistent memory allocator. (Closed)

Created:
4 years, 9 months ago by bcwhite
Modified:
4 years, 8 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@refactor-hp
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improved iterator for persistent memory allocator. The previous "iterator" was just state that was updated by the main class which is not generally how iterators operate. New version creates self-contained objects that do the "getnext" completely on their own. Also fixed old bug with incorrect construction parameters for histograms in test. It never affected operation but generates VLOG messages and affects timing tests. BUG=546019 Committed: https://crrev.com/f246202df709348d727c4a47f256a3da1caa0bef Cr-Commit-Position: refs/heads/master@{#385467}

Patch Set 1 #

Patch Set 2 : rebased and fixed up a bit #

Total comments: 18

Patch Set 3 : addressd review comments by Alex #

Total comments: 12

Patch Set 4 : addressd more review comments by Alex #

Total comments: 2

Patch Set 5 : add some changes missed in previous upload (relaxed->release) #

Patch Set 6 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+441 lines, -262 lines) Patch
M base/metrics/histogram_unittest.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M base/metrics/persistent_histogram_allocator.h View 1 2 3 4 5 2 chunks +28 lines, -16 lines 0 comments Download
M base/metrics/persistent_histogram_allocator.cc View 1 2 3 4 5 5 chunks +33 lines, -43 lines 0 comments Download
M base/metrics/persistent_histogram_allocator_unittest.cc View 1 2 3 4 5 1 chunk +12 lines, -14 lines 0 comments Download
M base/metrics/persistent_memory_allocator.h View 1 2 3 4 5 2 chunks +55 lines, -22 lines 0 comments Download
M base/metrics/persistent_memory_allocator.cc View 1 2 3 4 5 13 chunks +136 lines, -80 lines 0 comments Download
M base/metrics/persistent_memory_allocator_unittest.cc View 1 2 3 4 5 14 chunks +145 lines, -48 lines 0 comments Download
M base/metrics/persistent_sample_map.cc View 1 2 3 4 5 2 chunks +26 lines, -32 lines 0 comments Download
M components/metrics/file_metrics_provider.cc View 1 chunk +3 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 33 (15 generated)
bcwhite
There's a fairly long history to the PersistentMemoryAllocator and its lock-free operation. Feel free to ...
4 years, 9 months ago (2016-03-18 03:34:44 UTC) #5
Ilya Sherman
Sorry for the delay -- I didn't quite get to this code review prior to ...
4 years, 9 months ago (2016-03-24 02:03:58 UTC) #7
bcwhite
>Sorry for the delay -- I didn't quite get to this code >review prior to ...
4 years, 9 months ago (2016-03-24 14:22:34 UTC) #8
bcwhite
Alex, would you mind taking a look at a small addition to the PersistentMemoryAllocator? I ...
4 years, 9 months ago (2016-03-24 14:24:41 UTC) #10
Alexander Potapenko
Looks mostly good. Sorry about the delay. https://codereview.chromium.org/1803253002/diff/120001/base/metrics/histogram_unittest.cc File base/metrics/histogram_unittest.cc (right): https://codereview.chromium.org/1803253002/diff/120001/base/metrics/histogram_unittest.cc#newcode618 base/metrics/histogram_unittest.cc:618: Histogram::FactoryGet(histogram_names[i], 1, ...
4 years, 8 months ago (2016-03-30 10:47:49 UTC) #11
bcwhite
I mistakenly deleted the patchset on which your comments were based but they've all been ...
4 years, 8 months ago (2016-03-30 15:32:35 UTC) #16
Alexander Potapenko
https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc File base/metrics/persistent_memory_allocator.cc (right): https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc#newcode136 base/metrics/persistent_memory_allocator.cc:136: last_record_.store(kReferenceQueue, std::memory_order_relaxed); std::memory_order_release https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc#newcode311 base/metrics/persistent_memory_allocator.cc:311: shared_meta()->freeptr.store(sizeof(SharedMetadata), For atomic stores, ...
4 years, 8 months ago (2016-03-30 16:34:56 UTC) #17
bcwhite
https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc File base/metrics/persistent_memory_allocator.cc (right): https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc#newcode136 base/metrics/persistent_memory_allocator.cc:136: last_record_.store(kReferenceQueue, std::memory_order_relaxed); On 2016/03/30 16:34:56, Alexander Potapenko wrote: > ...
4 years, 8 months ago (2016-03-30 17:46:52 UTC) #18
Alexander Potapenko
https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc File base/metrics/persistent_memory_allocator.cc (right): https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc#newcode311 base/metrics/persistent_memory_allocator.cc:311: shared_meta()->freeptr.store(sizeof(SharedMetadata), On 2016/03/30 17:46:52, bcwhite wrote: > On 2016/03/30 ...
4 years, 8 months ago (2016-03-30 17:50:56 UTC) #19
bcwhite
https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc File base/metrics/persistent_memory_allocator.cc (right): https://codereview.chromium.org/1803253002/diff/160001/base/metrics/persistent_memory_allocator.cc#newcode311 base/metrics/persistent_memory_allocator.cc:311: shared_meta()->freeptr.store(sizeof(SharedMetadata), On 2016/03/30 17:50:56, Alexander Potapenko wrote: > On ...
4 years, 8 months ago (2016-03-30 18:07:54 UTC) #20
Alexander Potapenko
https://codereview.chromium.org/1803253002/diff/180001/base/metrics/persistent_histogram_allocator_unittest.cc File base/metrics/persistent_histogram_allocator_unittest.cc (right): https://codereview.chromium.org/1803253002/diff/180001/base/metrics/persistent_histogram_allocator_unittest.cc#newcode104 base/metrics/persistent_histogram_allocator_unittest.cc:104: recovered = histogram_iter.GetNext(); So are there any actual multithreaded ...
4 years, 8 months ago (2016-03-30 18:22:21 UTC) #21
bcwhite
https://codereview.chromium.org/1803253002/diff/180001/base/metrics/persistent_histogram_allocator_unittest.cc File base/metrics/persistent_histogram_allocator_unittest.cc (right): https://codereview.chromium.org/1803253002/diff/180001/base/metrics/persistent_histogram_allocator_unittest.cc#newcode104 base/metrics/persistent_histogram_allocator_unittest.cc:104: recovered = histogram_iter.GetNext(); On 2016/03/30 18:22:21, Alexander Potapenko wrote: ...
4 years, 8 months ago (2016-03-30 19:51:12 UTC) #22
Alexander Potapenko
On 2016/03/30 19:51:12, bcwhite wrote: > https://codereview.chromium.org/1803253002/diff/180001/base/metrics/persistent_histogram_allocator_unittest.cc > File base/metrics/persistent_histogram_allocator_unittest.cc (right): > > https://codereview.chromium.org/1803253002/diff/180001/base/metrics/persistent_histogram_allocator_unittest.cc#newcode104 > ...
4 years, 8 months ago (2016-03-30 20:52:35 UTC) #23
bcwhite
On 2016/03/30 20:52:35, Alexander Potapenko wrote: > On 2016/03/30 19:51:12, bcwhite wrote: > > > ...
4 years, 8 months ago (2016-03-30 20:56:20 UTC) #24
Ilya Sherman
LGTM, thanks
4 years, 8 months ago (2016-03-30 22:08:31 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1803253002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1803253002/240001
4 years, 8 months ago (2016-04-06 15:34:03 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:240001)
4 years, 8 months ago (2016-04-06 15:39:11 UTC) #31
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 15:40:56 UTC) #33
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f246202df709348d727c4a47f256a3da1caa0bef
Cr-Commit-Position: refs/heads/master@{#385467}

Powered by Google App Engine
This is Rietveld 408576698