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

Issue 2873433004: Replace SharedMemory::UniqueID usages with SharedMemoryHandle's guid (Closed)

Created:
3 years, 7 months ago by hajimehoshi
Modified:
3 years, 7 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, gavinp+memory_chromium.org, vmpstr+watch_chromium.org, erikchen
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace SharedMemory::UniqueID usages with SharedMemoryHandle's guid Shared memory's unique IDs are required to dump memory usages and before this CL, files' inode values are used for them on POSIX. The problem was that this was not portable. This CL replaces the current unique id with the new shared memory handler's GUID introduced at crrev/2859843002, which is available on any platforms. Note that passing GUID across mojo is not implemented so the current shared memory usages on memory-infra are still not accurate. Mojo fix will be done in the future. BUG=604726, 713763 TEST=n/a Review-Url: https://codereview.chromium.org/2873433004 Cr-Commit-Position: refs/heads/master@{#474579} Committed: https://chromium.googlesource.com/chromium/src/+/e370c17ca1827988dd84a545bb728f9b6699d42d

Patch Set 1 #

Patch Set 2 : Add shared_memory.cc #

Patch Set 3 : Fix browser tests error #

Total comments: 8

Patch Set 4 : Address on reviews #

Total comments: 8

Patch Set 5 : Address on reviews #

Patch Set 6 : (rebase) #

Total comments: 9

Patch Set 7 : Address on reviews #

Total comments: 13

Patch Set 8 : Address on reviews #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -83 lines) Patch
M base/memory/shared_memory.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -15 lines 0 comments Download
M base/memory/shared_memory_posix.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -19 lines 0 comments Download
M base/memory/shared_memory_tracker.h View 1 2 3 4 5 6 7 3 chunks +6 lines, -15 lines 0 comments Download
M base/memory/shared_memory_tracker.cc View 1 2 3 4 5 6 7 3 chunks +29 lines, -34 lines 0 comments Download

Messages

Total messages: 60 (38 generated)
hajimehoshi
PTAL
3 years, 7 months ago (2017-05-09 09:09:51 UTC) #2
danakj
https://codereview.chromium.org/2873433004/diff/40001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/40001/base/memory/shared_memory_tracker.cc#newcode33 base/memory/shared_memory_tracker.cc:33: AutoLock hold(usages_lock_); wdyt of copying the usages_ into a ...
3 years, 7 months ago (2017-05-09 14:54:18 UTC) #17
hajimehoshi
Thank you! https://codereview.chromium.org/2873433004/diff/40001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/40001/base/memory/shared_memory_tracker.cc#newcode33 base/memory/shared_memory_tracker.cc:33: AutoLock hold(usages_lock_); On 2017/05/09 14:54:18, danakj wrote: ...
3 years, 7 months ago (2017-05-10 05:55:22 UTC) #18
Primiano Tucci (use gerrit)
looks almost good, but as-is it's racy :) see comments inline +erikchen fyi https://codereview.chromium.org/2873433004/diff/40001/base/memory/shared_memory_tracker.cc File ...
3 years, 7 months ago (2017-05-10 18:33:55 UTC) #23
erikchen
https://codereview.chromium.org/2873433004/diff/60001/base/memory/shared_memory.h File base/memory/shared_memory.h (right): https://codereview.chromium.org/2873433004/diff/60001/base/memory/shared_memory.h#newcode222 base/memory/shared_memory.h:222: base::UnguessableToken GetGUID() const; Please avoid adding this method to ...
3 years, 7 months ago (2017-05-10 20:14:17 UTC) #25
hajimehoshi
Thank you! https://codereview.chromium.org/2873433004/diff/60001/base/memory/shared_memory.cc File base/memory/shared_memory.cc (right): https://codereview.chromium.org/2873433004/diff/60001/base/memory/shared_memory.cc#newcode9 base/memory/shared_memory.cc:9: base::UnguessableToken SharedMemory::GetGUID() const { On 2017/05/10 18:33:55, ...
3 years, 7 months ago (2017-05-11 10:26:00 UTC) #26
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc#newcode41 base/memory/shared_memory_tracker.cc:41: auto guid = std::get<0>(usage); const auto&? https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc#newcode45 base/memory/shared_memory_tracker.cc:45: if ...
3 years, 7 months ago (2017-05-11 15:10:43 UTC) #35
erikchen
https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc#newcode37 base/memory/shared_memory_tracker.cc:37: for (auto& usage : usages_) The C++ style guide ...
3 years, 7 months ago (2017-05-11 21:54:41 UTC) #36
hajimehoshi
https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc#newcode37 base/memory/shared_memory_tracker.cc:37: for (auto& usage : usages_) On 2017/05/11 21:54:40, erikchen ...
3 years, 7 months ago (2017-05-12 09:27:32 UTC) #39
hajimehoshi
https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc#newcode52 base/memory/shared_memory_tracker.cc:52: if (local_dump) On 2017/05/12 09:27:31, hajimehoshi wrote: > On ...
3 years, 7 months ago (2017-05-17 10:13:35 UTC) #42
Primiano Tucci (use gerrit)
On 2017/05/17 10:13:35, hajimehoshi wrote: > https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc > File base/memory/shared_memory_tracker.cc (right): > > https://codereview.chromium.org/2873433004/diff/100001/base/memory/shared_memory_tracker.cc#newcode52 > ...
3 years, 7 months ago (2017-05-19 17:39:39 UTC) #43
hajimehoshi
On 2017/05/19 17:39:39, Primiano (slow - traveling) wrote: > On 2017/05/17 10:13:35, hajimehoshi wrote: > ...
3 years, 7 months ago (2017-05-22 07:10:47 UTC) #44
hajimehoshi
https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (left): https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc#oldcode56 base/memory/shared_memory_tracker.cc:56: sizes[usage.second.unique_id] += usage.second.size; I found that this implementation (before ...
3 years, 7 months ago (2017-05-22 08:32:01 UTC) #45
erikchen
lgtm https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (left): https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc#oldcode56 base/memory/shared_memory_tracker.cc:56: sizes[usage.second.unique_id] += usage.second.size; On 2017/05/22 08:32:01, hajimehoshi wrote: ...
3 years, 7 months ago (2017-05-22 16:19:31 UTC) #46
hajimehoshi
ping danakj@, primiano@ Thank you! On 2017/05/22 16:19:31, erikchen wrote: > lgtm > > https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc ...
3 years, 7 months ago (2017-05-23 23:37:51 UTC) #47
Primiano Tucci (use gerrit)
This CL LGTM (not a base owner though) with minor comments. > I was wondering ...
3 years, 7 months ago (2017-05-24 11:23:37 UTC) #48
danakj
LGTM https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc#newcode34 base/memory/shared_memory_tracker.cc:34: std::vector<std::tuple<base::UnguessableToken, uintptr_t, size_t>> usages; no base:: inside base, ...
3 years, 7 months ago (2017-05-24 16:39:45 UTC) #49
hajimehoshi
Thank you! https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc File base/memory/shared_memory_tracker.cc (right): https://codereview.chromium.org/2873433004/diff/120001/base/memory/shared_memory_tracker.cc#newcode34 base/memory/shared_memory_tracker.cc:34: std::vector<std::tuple<base::UnguessableToken, uintptr_t, size_t>> usages; On 2017/05/24 16:39:45, ...
3 years, 7 months ago (2017-05-25 00:33:30 UTC) #50
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/2873433004/140001
3 years, 7 months ago (2017-05-25 00:34:33 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/302731)
3 years, 7 months ago (2017-05-25 04:15:46 UTC) #55
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/2873433004/140001
3 years, 7 months ago (2017-05-25 05:04:10 UTC) #57
commit-bot: I haz the power
3 years, 7 months ago (2017-05-25 06:12:37 UTC) #60
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/e370c17ca1827988dd84a545bb72...

Powered by Google App Engine
This is Rietveld 408576698