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

Issue 1325653003: Type change in StackSamplingProfiler from void* to uintptr_t. (Closed)

Created:
5 years, 3 months ago by sydli
Modified:
5 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@UMA2_refactor
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

All instances of addresses as void* are changed to uintptr_t in StackSamplingProfiler. These addresses should not be dereferenced, so uintptr_t is a better type for recorded instruction pointers. Additionally, this change will allow IPC macros to use these structures in the future. BUG=517958 Committed: https://crrev.com/f192d05e967d328c2118a6b5636c09c80a051c97 Cr-Commit-Position: refs/heads/master@{#349254}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Split type change into separate CL and addressed comments. #

Patch Set 3 : void* --> uintptr_t #

Patch Set 4 : Accidentally removed const qualifiers from unittest. #

Total comments: 5

Patch Set 5 : Moved IPC structures into content/common and merged with dependent CL. #

Total comments: 13

Patch Set 6 : Addressed wittman's comments. #

Total comments: 6

Patch Set 7 : Nits and compiles. #

Total comments: 1

Patch Set 8 : Rebase and CL now only includes type changes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -58 lines) Patch
M base/profiler/native_stack_sampler_win.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M base/profiler/stack_sampling_profiler.h View 1 2 3 4 5 6 7 2 chunks +8 lines, -4 lines 0 comments Download
M base/profiler/stack_sampling_profiler.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -5 lines 0 comments Download
M base/profiler/stack_sampling_profiler_unittest.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -3 lines 0 comments Download
M components/metrics/call_stack_profile_metrics_provider.h View 1 2 3 4 5 1 chunk +3 lines, -1 line 0 comments Download
M components/metrics/call_stack_profile_metrics_provider_unittest.cc View 1 2 3 4 5 17 chunks +41 lines, -43 lines 0 comments Download

Messages

Total messages: 38 (7 generated)
sydli
+erikchen and +wittman for review. PTAL-- especially unsure about uintptr_t casts made to satisfy IPC ...
5 years, 3 months ago (2015-08-31 20:16:14 UTC) #2
Mike Wittman
> messages for stack sampling profiler to sample on non-browser processes, > then send collected ...
5 years, 3 months ago (2015-08-31 20:57:57 UTC) #3
erikchen
https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h#newcode72 base/profiler/stack_sampling_profiler.h:72: uintptr_t base_address; On 2015/08/31 20:57:57, Mike Wittman wrote: > ...
5 years, 3 months ago (2015-08-31 21:15:17 UTC) #4
erikchen
lgtm with nits https://codereview.chromium.org/1325653003/diff/1/content/browser/profiler_message_filter.h File content/browser/profiler_message_filter.h (right): https://codereview.chromium.org/1325653003/diff/1/content/browser/profiler_message_filter.h#newcode11 content/browser/profiler_message_filter.h:11: #include "base/profiler/stack_sampling_profiler.h" Should we forward declare ...
5 years, 3 months ago (2015-08-31 21:17:28 UTC) #5
Mike Wittman
https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h#newcode67 base/profiler/stack_sampling_profiler.h:67: Module(const void* base_address, const std::string& id, The |base_address| parameter ...
5 years, 3 months ago (2015-08-31 21:42:00 UTC) #6
sydli
Worried that uintptr_t change might affect functionality, so broke it off into a separate CL: ...
5 years, 3 months ago (2015-09-01 00:29:59 UTC) #7
Mike Wittman
https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h#newcode72 base/profiler/stack_sampling_profiler.h:72: uintptr_t base_address; On 2015/09/01 00:29:59, sydli wrote: > On ...
5 years, 3 months ago (2015-09-01 00:41:57 UTC) #8
sydli
On 2015/09/01 00:41:57, Mike Wittman wrote: > https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h > File base/profiler/stack_sampling_profiler.h (right): > > https://codereview.chromium.org/1325653003/diff/1/base/profiler/stack_sampling_profiler.h#newcode72 ...
5 years, 3 months ago (2015-09-01 01:00:45 UTC) #9
Mike Wittman
assuming this compiles, lgtm with a few nits https://codereview.chromium.org/1325653003/diff/60001/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/1325653003/diff/60001/base/profiler/stack_sampling_profiler.cc#newcode87 base/profiler/stack_sampling_profiler.cc:87: : ...
5 years, 3 months ago (2015-09-01 01:42:16 UTC) #10
sydli
Since there's no need for a base/ refactor, moved that CL into this one. Defined ...
5 years, 3 months ago (2015-09-03 16:21:15 UTC) #12
Mike Wittman
https://codereview.chromium.org/1325653003/diff/60001/components/metrics/call_stack_profile_metrics_provider_unittest.cc File components/metrics/call_stack_profile_metrics_provider_unittest.cc (right): https://codereview.chromium.org/1325653003/diff/60001/components/metrics/call_stack_profile_metrics_provider_unittest.cc#newcode470 components/metrics/call_stack_profile_metrics_provider_unittest.cc:470: 0x1000, Frame::kUnknownModuleIndex))); On 2015/09/03 16:21:15, sydli wrote: > On ...
5 years, 3 months ago (2015-09-03 16:58:04 UTC) #13
sydli
Done-- sorry about the format. Should I reformat after reviews? https://codereview.chromium.org/1325653003/diff/80001/components/metrics/call_stack_profile_metrics_provider.h File components/metrics/call_stack_profile_metrics_provider.h (right): https://codereview.chromium.org/1325653003/diff/80001/components/metrics/call_stack_profile_metrics_provider.h#newcode21 ...
5 years, 3 months ago (2015-09-03 17:18:13 UTC) #14
Mike Wittman
lgtm with nit with the latest changes On 2015/09/03 17:18:13, sydli wrote: > Done-- sorry ...
5 years, 3 months ago (2015-09-03 18:16:36 UTC) #15
robliao
lgtm https://codereview.chromium.org/1325653003/diff/100001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/1325653003/diff/100001/base/profiler/native_stack_sampler_win.cc#newcode308 base/profiler/native_stack_sampler_win.cc:308: reintrepret_cast<uintptr_t>(instruction_pointers[i]), reint[re]pret -> reinterpret
5 years, 3 months ago (2015-09-03 21:46:45 UTC) #16
robliao
https://codereview.chromium.org/1325653003/diff/100001/content/common/profiled_stack_state.h File content/common/profiled_stack_state.h (right): https://codereview.chromium.org/1325653003/diff/100001/content/common/profiled_stack_state.h#newcode35 content/common/profiled_stack_state.h:35: ProfiledStackState(); You can make this private with a friend ...
5 years, 3 months ago (2015-09-03 22:25:59 UTC) #17
sydli
Nits. Tests look green so sending out for OWNER review. +cpu for base/ changes, +asvitkine ...
5 years, 3 months ago (2015-09-09 17:08:46 UTC) #19
Alexei Svitkine (slow)
lgtm https://codereview.chromium.org/1325653003/diff/120001/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/1325653003/diff/120001/base/profiler/stack_sampling_profiler.cc#newcode87 base/profiler/stack_sampling_profiler.cc:87: StackSamplingProfiler::Module::Module(const uintptr_t base_address, Nit: Remove the const qualifier.
5 years, 3 months ago (2015-09-09 17:15:54 UTC) #20
Tom Sepez
Shouldn't there be a corresponding GN file for the gyp changes? Messages LGTM. Please CC ...
5 years, 3 months ago (2015-09-09 17:26:36 UTC) #21
sydli
On 2015/09/09 17:26:36, Tom Sepez wrote: > Shouldn't there be a corresponding GN file for ...
5 years, 3 months ago (2015-09-09 18:42:57 UTC) #22
Avi (use Gerrit)
lgtm
5 years, 3 months ago (2015-09-09 19:36:49 UTC) #23
jam
drive-by: this is a (google) chrome feature. why is there code in content? one problem ...
5 years, 3 months ago (2015-09-14 17:22:50 UTC) #24
sydli
On 2015/09/14 17:22:50, jam wrote: > drive-by: this is a (google) chrome feature. why is ...
5 years, 3 months ago (2015-09-14 17:31:35 UTC) #25
jam
On 2015/09/14 17:31:35, sydli wrote: > On 2015/09/14 17:22:50, jam wrote: > > drive-by: this ...
5 years, 3 months ago (2015-09-14 18:19:21 UTC) #26
cpu_(ooo_6.6-7.5)
base/ code lgtm. Please make sure jam@ is ok with your approach before landing. Alternatively ...
5 years, 3 months ago (2015-09-14 20:59:33 UTC) #27
sydli
On 2015/09/14 20:59:33, cpu wrote: > base/ code lgtm. Please make sure jam@ is ok ...
5 years, 3 months ago (2015-09-16 19:15:42 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1325653003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1325653003/140001
5 years, 3 months ago (2015-09-16 19:19:11 UTC) #31
Mike Wittman
On 2015/09/16 19:15:42, sydli wrote: > On 2015/09/14 20:59:33, cpu wrote: > > base/ code ...
5 years, 3 months ago (2015-09-16 19:21:03 UTC) #33
sydli
On 2015/09/16 19:21:03, Mike Wittman wrote: > On 2015/09/16 19:15:42, sydli wrote: > > On ...
5 years, 3 months ago (2015-09-16 19:22:08 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1325653003/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1325653003/140001
5 years, 3 months ago (2015-09-16 20:43:15 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 3 months ago (2015-09-16 22:25:05 UTC) #37
commit-bot: I haz the power
5 years, 3 months ago (2015-09-16 22:25:50 UTC) #38
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/f192d05e967d328c2118a6b5636c09c80a051c97
Cr-Commit-Position: refs/heads/master@{#349254}

Powered by Google App Engine
This is Rietveld 408576698