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

Issue 2444143002: Add process lifetime annotations to stack samples. (Closed)

Created:
4 years, 1 month ago by bcwhite
Modified:
4 years ago
CC:
Aaron Boodman, abarth-chromium, asvitkine+watch_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add process lifetime annotations to stack samples. Annotations are passed in the proto along with the stack frames so analysis can correlate with other things happening on the system. BUG=657012 Committed: https://crrev.com/30c14f27cf63a48b082efe67ae29bb6e4282cbd7 Cr-Commit-Position: refs/heads/master@{#434273}

Patch Set 1 #

Total comments: 24

Patch Set 2 : addressed review comments by wittman #

Total comments: 6

Patch Set 3 : added comments and fixed some build problems #

Total comments: 2

Patch Set 4 : addressed review comments by wittman #

Total comments: 6

Patch Set 5 : use bare function-pointer callback; added test #

Total comments: 10

Patch Set 6 : addressed comments by wittman #

Patch Set 7 : updated proto to pass individual repeated enumeration values #

Total comments: 16

Patch Set 8 : addressed review comments and added test #

Total comments: 3

Patch Set 9 : restored lost changes #

Patch Set 10 : convert between C++ enum and proto enum; rewrote test to be extensible and readable #

Patch Set 11 : fixed non-windows constant #

Total comments: 29

Patch Set 12 : addressed comments by asvitkine #

Patch Set 13 : rebased #

Patch Set 14 : addressed review comments and finished converting tests #

Total comments: 32

Patch Set 15 : addressed review comments & git cl format base #

Total comments: 2

Patch Set 16 : use shorter integer for ProfilesGenerator #

Patch Set 17 : rebased #

Patch Set 18 : switch from #define generator array to builder class #

Total comments: 9

Patch Set 19 : abandon generator for on-the-fly Profiles creation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+798 lines, -425 lines) Patch
M base/profiler/native_stack_sampler.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M base/profiler/native_stack_sampler_posix.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M base/profiler/native_stack_sampler_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +18 lines, -6 lines 0 comments Download
M base/profiler/stack_sampling_profiler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +47 lines, -2 lines 0 comments Download
M base/profiler/stack_sampling_profiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +76 lines, -1 line 0 comments Download
M base/profiler/stack_sampling_profiler_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 chunks +75 lines, -43 lines 0 comments Download
M components/metrics/call_stack_profile_metrics_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +14 lines, -0 lines 0 comments Download
M components/metrics/call_stack_profile_metrics_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +47 lines, -1 line 0 comments Download
M components/metrics/call_stack_profile_metrics_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 chunks +429 lines, -356 lines 0 comments Download
M components/metrics/proto/call_stack_profile.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M components/metrics/proto/execution_context.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +26 lines, -0 lines 0 comments Download
M components/metrics/public/cpp/call_stack_profile.typemap View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/metrics/public/cpp/call_stack_profile_struct_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +26 lines, -1 line 0 comments Download
M components/metrics/public/cpp/call_stack_profile_struct_traits_unittest.cc View 1 2 3 4 2 chunks +14 lines, -14 lines 0 comments Download
M components/metrics/public/interfaces/call_stack_profile_collector.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 192 (146 generated)
Mike Wittman
https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc#newcode84 base/profiler/stack_sampling_profiler.cc:84: void ChangeAtomicFlags(volatile subtle::Atomic32* flags, Same comment about volatile. https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc#newcode192 ...
4 years, 1 month ago (2016-10-24 22:28:14 UTC) #6
bcwhite
https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc#newcode84 base/profiler/stack_sampling_profiler.cc:84: void ChangeAtomicFlags(volatile subtle::Atomic32* flags, On 2016/10/24 22:28:14, Mike Wittman ...
4 years, 1 month ago (2016-10-25 14:45:24 UTC) #20
Alexei Svitkine (slow)
https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h#newcode272 base/profiler/stack_sampling_profiler.h:272: static subtle::Atomic32 current_activities_; Do we need to use atomics ...
4 years, 1 month ago (2016-10-25 14:49:08 UTC) #21
bcwhite
https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h#newcode272 base/profiler/stack_sampling_profiler.h:272: static subtle::Atomic32 current_activities_; On 2016/10/25 14:49:08, Alexei Svitkine (slow) ...
4 years, 1 month ago (2016-10-25 15:02:22 UTC) #24
Alexei Svitkine (slow)
https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h#newcode272 base/profiler/stack_sampling_profiler.h:272: static subtle::Atomic32 current_activities_; On 2016/10/25 15:02:22, bcwhite wrote: > ...
4 years, 1 month ago (2016-10-25 15:25:58 UTC) #25
bcwhite
https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/2444143002/diff/60001/base/profiler/stack_sampling_profiler.h#newcode272 base/profiler/stack_sampling_profiler.h:272: static subtle::Atomic32 current_activities_; On 2016/10/25 15:25:58, Alexei Svitkine (slow) ...
4 years, 1 month ago (2016-10-25 16:22:26 UTC) #31
Mike Wittman
https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc#newcode192 base/profiler/stack_sampling_profiler.cc:192: sample.current_activities = subtle::NoBarrier_Load(&current_activities_); On 2016/10/25 14:45:23, bcwhite wrote: > ...
4 years, 1 month ago (2016-10-25 17:24:23 UTC) #32
Mike Wittman
https://codereview.chromium.org/2444143002/diff/100001/base/profiler/stack_sampling_profiler.h File base/profiler/stack_sampling_profiler.h (right): https://codereview.chromium.org/2444143002/diff/100001/base/profiler/stack_sampling_profiler.h#newcode70 base/profiler/stack_sampling_profiler.h:70: FirstNonEmptyPaint, One other thing: being in //base, the profiler ...
4 years, 1 month ago (2016-10-25 17:47:45 UTC) #33
bcwhite
https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc#newcode192 base/profiler/stack_sampling_profiler.cc:192: sample.current_activities = subtle::NoBarrier_Load(&current_activities_); On 2016/10/25 17:24:22, Mike Wittman wrote: ...
4 years, 1 month ago (2016-10-25 21:10:43 UTC) #38
Mike Wittman
https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/1/base/profiler/stack_sampling_profiler.cc#newcode192 base/profiler/stack_sampling_profiler.cc:192: sample.current_activities = subtle::NoBarrier_Load(&current_activities_); On 2016/10/25 21:10:42, bcwhite wrote: > ...
4 years, 1 month ago (2016-10-26 16:28:17 UTC) #41
bcwhite
https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: annotator.Run(); On 2016/10/26 16:28:17, Mike Wittman wrote: > Invoking ...
4 years, 1 month ago (2016-10-26 18:30:44 UTC) #42
Mike Wittman
https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: annotator.Run(); On 2016/10/26 18:30:43, bcwhite wrote: > On 2016/10/26 ...
4 years, 1 month ago (2016-10-26 19:41:14 UTC) #43
bcwhite
https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: annotator.Run(); > That would work, but it would couple ...
4 years, 1 month ago (2016-10-26 20:02:10 UTC) #44
Mike Wittman
https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: annotator.Run(); On 2016/10/26 20:02:10, bcwhite wrote: > > If ...
4 years, 1 month ago (2016-10-26 20:20:37 UTC) #45
bcwhite
On 2016/10/26 20:20:37, Mike Wittman wrote: > https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc > File base/profiler/native_stack_sampler_win.cc (right): > > https://codereview.chromium.org/2444143002/diff/120001/base/profiler/native_stack_sampler_win.cc#newcode358 ...
4 years, 1 month ago (2016-11-02 15:41:39 UTC) #56
Mike Wittman
Thanks! https://codereview.chromium.org/2444143002/diff/180001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/180001/base/profiler/native_stack_sampler_win.cc#newcode417 base/profiler/native_stack_sampler_win.cc:417: AnnotateCallback annotator_; const https://codereview.chromium.org/2444143002/diff/180001/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/180001/base/profiler/stack_sampling_profiler.cc#newcode328 ...
4 years, 1 month ago (2016-11-02 17:14:39 UTC) #59
bcwhite
I've updated the .proto to define the enumeration and changed the field to repeated enumerations. ...
4 years, 1 month ago (2016-11-02 20:10:45 UTC) #78
Mike Wittman
On 2016/11/02 20:10:45, bcwhite wrote: > I've updated the .proto to define the enumeration and ...
4 years, 1 month ago (2016-11-02 21:44:04 UTC) #81
bcwhite
> Using proto-generated types in public interfaces is a > no-no in Chrome because it ...
4 years, 1 month ago (2016-11-03 18:29:50 UTC) #89
Mike Wittman
It looks like the changes other than the metrics provider did not make it into ...
4 years, 1 month ago (2016-11-03 21:15:39 UTC) #92
bcwhite
Odd about the missing changes. They're in my editor buffers (saved) but not in git. ...
4 years, 1 month ago (2016-11-03 21:51:10 UTC) #95
Mike Wittman
https://codereview.chromium.org/2444143002/diff/260001/components/metrics/proto/execution_context.proto File components/metrics/proto/execution_context.proto (right): https://codereview.chromium.org/2444143002/diff/260001/components/metrics/proto/execution_context.proto#newcode63 components/metrics/proto/execution_context.proto:63: METRICS_COLLECTION = 0; On 2016/11/03 21:51:10, bcwhite wrote: > ...
4 years, 1 month ago (2016-11-03 23:11:03 UTC) #96
bcwhite
https://codereview.chromium.org/2444143002/diff/260001/components/metrics/proto/execution_context.proto File components/metrics/proto/execution_context.proto (right): https://codereview.chromium.org/2444143002/diff/260001/components/metrics/proto/execution_context.proto#newcode63 components/metrics/proto/execution_context.proto:63: METRICS_COLLECTION = 0; On 2016/11/03 23:11:03, Mike Wittman - ...
4 years, 1 month ago (2016-11-04 14:03:45 UTC) #99
bcwhite
I've created a local enum of phases/activities updated the metrics provider to support conversion between ...
4 years, 1 month ago (2016-11-06 20:09:24 UTC) #102
Alexei Svitkine (slow)
Seems there's some red bots. Let me know when you've resolved those and I can ...
4 years, 1 month ago (2016-11-07 17:33:29 UTC) #110
bcwhite
On 2016/11/07 17:33:29, Alexei Svitkine (very slow) wrote: > Seems there's some red bots. Let ...
4 years, 1 month ago (2016-11-07 22:11:16 UTC) #115
Alexei Svitkine (slow)
https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: (*annotator)(sample); This requires the annotator to not be null. ...
4 years, 1 month ago (2016-11-07 23:22:08 UTC) #116
bcwhite
https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: (*annotator)(sample); On 2016/11/07 23:22:07, Alexei Svitkine (very slow) wrote: ...
4 years, 1 month ago (2016-11-08 01:02:36 UTC) #119
Alexei Svitkine (slow)
https://codereview.chromium.org/2444143002/diff/380001/components/metrics/call_stack_profile_metrics_provider.cc File components/metrics/call_stack_profile_metrics_provider.cc (right): https://codereview.chromium.org/2444143002/diff/380001/components/metrics/call_stack_profile_metrics_provider.cc#newcode270 components/metrics/call_stack_profile_metrics_provider.cc:270: ++bit, new_phases >>= 1) { On 2016/11/08 01:02:36, bcwhite ...
4 years, 1 month ago (2016-11-14 18:26:39 UTC) #128
bcwhite
https://codereview.chromium.org/2444143002/diff/380001/components/metrics/call_stack_profile_metrics_provider.cc File components/metrics/call_stack_profile_metrics_provider.cc (right): https://codereview.chromium.org/2444143002/diff/380001/components/metrics/call_stack_profile_metrics_provider.cc#newcode270 components/metrics/call_stack_profile_metrics_provider.cc:270: ++bit, new_phases >>= 1) { On 2016/11/14 18:26:39, Alexei ...
4 years, 1 month ago (2016-11-16 18:27:44 UTC) #139
Alexei Svitkine (slow)
lgtm % comment https://codereview.chromium.org/2444143002/diff/480001/base/profiler/stack_sampling_profiler.cc File base/profiler/stack_sampling_profiler.cc (right): https://codereview.chromium.org/2444143002/diff/480001/base/profiler/stack_sampling_profiler.cc#newcode219 base/profiler/stack_sampling_profiler.cc:219: native_sampler_->RecordStackSample(&sample); Nit: Remove this change since ...
4 years, 1 month ago (2016-11-16 19:10:24 UTC) #140
Mike Wittman
FYI: I'm back now and taking another look... please hold off committing until I've had ...
4 years, 1 month ago (2016-11-16 19:29:32 UTC) #141
Mike Wittman
https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: (*annotator)(sample); On 2016/11/08 01:02:36, bcwhite wrote: > On 2016/11/07 ...
4 years, 1 month ago (2016-11-16 22:36:10 UTC) #142
bcwhite
https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc File base/profiler/native_stack_sampler_win.cc (right): https://codereview.chromium.org/2444143002/diff/380001/base/profiler/native_stack_sampler_win.cc#newcode358 base/profiler/native_stack_sampler_win.cc:358: (*annotator)(sample); On 2016/11/16 22:36:09, Mike Wittman - OOO to ...
4 years, 1 month ago (2016-11-16 23:10:49 UTC) #145
Mike Wittman
https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider.h File components/metrics/call_stack_profile_metrics_provider.h (right): https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider.h#newcode40 components/metrics/call_stack_profile_metrics_provider.h:40: enum Activities : int { On 2016/11/16 23:10:49, bcwhite ...
4 years, 1 month ago (2016-11-17 17:23:22 UTC) #148
bcwhite
https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider.h File components/metrics/call_stack_profile_metrics_provider.h (right): https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider.h#newcode40 components/metrics/call_stack_profile_metrics_provider.h:40: enum Activities : int { On 2016/11/17 17:23:21, Mike ...
4 years, 1 month ago (2016-11-17 17:43:19 UTC) #152
Mike Wittman
https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider_unittest.cc File components/metrics/call_stack_profile_metrics_provider_unittest.cc (right): https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider_unittest.cc#newcode264 components/metrics/call_stack_profile_metrics_provider_unittest.cc:264: GEN_NEW_PROFILE(100, 10), On 2016/11/17 17:43:19, bcwhite wrote: > On ...
4 years, 1 month ago (2016-11-17 17:51:27 UTC) #153
bcwhite
https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider_unittest.cc File components/metrics/call_stack_profile_metrics_provider_unittest.cc (right): https://codereview.chromium.org/2444143002/diff/480001/components/metrics/call_stack_profile_metrics_provider_unittest.cc#newcode264 components/metrics/call_stack_profile_metrics_provider_unittest.cc:264: GEN_NEW_PROFILE(100, 10), On 2016/11/17 17:51:27, Mike Wittman wrote: > ...
4 years, 1 month ago (2016-11-22 22:50:13 UTC) #172
Mike Wittman
Thanks for the test changes. This looks good, with the following suggestions. https://codereview.chromium.org/2444143002/diff/600001/components/metrics/call_stack_profile_metrics_provider_unittest.cc File components/metrics/call_stack_profile_metrics_provider_unittest.cc ...
4 years, 1 month ago (2016-11-23 00:28:40 UTC) #175
bcwhite
https://codereview.chromium.org/2444143002/diff/600001/components/metrics/call_stack_profile_metrics_provider_unittest.cc File components/metrics/call_stack_profile_metrics_provider_unittest.cc (right): https://codereview.chromium.org/2444143002/diff/600001/components/metrics/call_stack_profile_metrics_provider_unittest.cc#newcode61 components/metrics/call_stack_profile_metrics_provider_unittest.cc:61: using Generator = uintptr_t; On 2016/11/23 00:28:40, Mike Wittman ...
4 years ago (2016-11-23 14:45:53 UTC) #180
Mike Wittman
lgtm Thanks! https://codereview.chromium.org/2444143002/diff/600001/components/metrics/call_stack_profile_metrics_provider_unittest.cc File components/metrics/call_stack_profile_metrics_provider_unittest.cc (right): https://codereview.chromium.org/2444143002/diff/600001/components/metrics/call_stack_profile_metrics_provider_unittest.cc#newcode110 components/metrics/call_stack_profile_metrics_provider_unittest.cc:110: void GenerateProfiles(Profiles* profiles); On 2016/11/23 14:45:53, bcwhite ...
4 years ago (2016-11-23 16:50:54 UTC) #181
bcwhite
+palmer (SECURITY_OWNERS) for: components/metrics/public/... The Sample type was changed from an array of frames to ...
4 years ago (2016-11-23 19:53:28 UTC) #183
palmer
lgtm
4 years ago (2016-11-23 20:40:09 UTC) #184
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/2444143002/620001
4 years ago (2016-11-23 21:05:38 UTC) #187
commit-bot: I haz the power
Committed patchset #19 (id:620001)
4 years ago (2016-11-23 22:56:53 UTC) #190
commit-bot: I haz the power
4 years ago (2016-11-23 22:59:49 UTC) #192
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/30c14f27cf63a48b082efe67ae29bb6e4282cbd7
Cr-Commit-Position: refs/heads/master@{#434273}

Powered by Google App Engine
This is Rietveld 408576698