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

Issue 985773002: Introducing phased profiling framework (Closed)

Created:
5 years, 9 months ago by vadimt
Modified:
5 years, 8 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, erikwright+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@write_to_file
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introducing phased profiling framework. TrackingSynchronizer can send a "phase completed" message to all processes. Their ThreadData's make a snapshot of task deaths and store it in a static map, associating with the number of the completed phase. They also clean the death data. When requested to return a tasks snapshot, ThreadData returns that saved map, adding a snapshot of current task deaths as a separate "current" phase. The rest of code was transformed to work with the map of snapshots instead of a single snapshot. BUG=456354 Committed: https://crrev.com/379d7fe794b4a200e08ac3f23c69184edef085f7 Cr-Commit-Position: refs/heads/master@{#323151}

Patch Set 1 #

Total comments: 8

Patch Set 2 : First comments #

Patch Set 3 : Only "API" #

Total comments: 73

Patch Set 4 : asvitkins/isherman comments. #

Total comments: 12

Patch Set 5 : isherman@ comments #

Total comments: 15

Patch Set 6 : asvitkine@ comments. #

Patch Set 7 : More asvitkine@ comments. #

Total comments: 33

Patch Set 8 : Additional isherman@ comments. #

Total comments: 6

Patch Set 9 : Fial isherman@ comments #

Total comments: 10

Patch Set 10 : dcheng@ comments #

Total comments: 2

Patch Set 11 : More dcheng@ comments. #

Patch Set 12 : Rebasing. #

Patch Set 13 : Fixing DEPS file. #

Patch Set 14 : Fixing iOS compiler errors. #

Patch Set 15 : Fixing more Mac/iOS compiler errors. #

Patch Set 16 : Experimenting with not using TestBrowserThreadBundle in iOS. #

Patch Set 17 : Fixing indents. #

Patch Set 18 : Temporary solution to compile on iOS, discussed with rohitrao@. #

Patch Set 19 : Fixing Android compile errors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+981 lines, -529 lines) Patch
M base/tracked_objects.h View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +51 lines, -23 lines 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 6 7 8 9 6 chunks +56 lines, -45 lines 0 comments Download
M base/tracked_objects_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +158 lines, -100 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -2 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -3 lines 0 comments Download
M chrome/browser/task_profiler/task_profiler_data_serializer.h View 1 2 3 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/task_profiler/task_profiler_data_serializer.cc View 1 2 3 2 chunks +9 lines, -12 lines 0 comments Download
M chrome/browser/task_profiler/task_profiler_data_serializer_unittest.cc View 1 2 3 4 5 6 7 3 chunks +91 lines, -93 lines 0 comments Download
M chrome/browser/ui/webui/profiler_ui.h View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/profiler_ui.cc View 1 2 3 4 5 6 7 8 9 1 chunk +9 lines, -5 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/metrics/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/metrics/metrics_log.h View 1 chunk +0 lines, -4 lines 0 comments Download
M components/metrics/profiler/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/metrics/profiler/profiler_metrics_provider.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -9 lines 0 comments Download
M components/metrics/profiler/profiler_metrics_provider.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +44 lines, -33 lines 0 comments Download
M components/metrics/profiler/profiler_metrics_provider_unittest.cc View 1 2 3 4 5 6 7 2 chunks +234 lines, -148 lines 0 comments Download
M components/metrics/profiler/tracking_synchronizer.h View 1 2 3 4 5 6 7 8 9 7 chunks +31 lines, -4 lines 0 comments Download
M components/metrics/profiler/tracking_synchronizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +61 lines, -12 lines 0 comments Download
M components/metrics/profiler/tracking_synchronizer_observer.h View 1 2 3 4 5 6 7 8 9 1 chunk +37 lines, -5 lines 0 comments Download
A components/metrics/profiler/tracking_synchronizer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +118 lines, -0 lines 0 comments Download
M components/metrics/proto/profiler_event.proto View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/nacl/browser/nacl_broker_host_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_child_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -3 lines 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/profiler_controller_impl.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/profiler_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/profiler_message_filter.h View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/profiler_message_filter.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/child_process_messages.h View 1 2 3 4 5 6 7 8 9 10 11 16 2 chunks +9 lines, -4 lines 0 comments Download
M content/public/browser/browser_child_process_host.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/profiler_subscriber.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 81 (28 generated)
vadimt
isherman@chromium.org, asvitkine@chromium.org, please review and pre-review.
5 years, 9 months ago (2015-03-06 15:54:32 UTC) #2
Alexei Svitkine (slow)
Still on the large side as CL goes, my preference would be to break it ...
5 years, 9 months ago (2015-03-06 20:06:40 UTC) #3
Ilya Sherman
On 2015/03/06 20:06:40, Alexei Svitkine wrote: > Still on the large side as CL goes, ...
5 years, 9 months ago (2015-03-06 20:59:42 UTC) #4
vadimt
First comments
5 years, 9 months ago (2015-03-06 21:26:44 UTC) #5
vadimt
Changes + rebase I have no good idea (but open to suggestions) on how to ...
5 years, 9 months ago (2015-03-06 21:34:58 UTC) #6
vadimt
isherman@ suggested a certain way of splitting, which I'm implementing now. Stay tuned!
5 years, 9 months ago (2015-03-06 23:45:59 UTC) #7
vadimt
Per a talk to isherman@: 1. base/ was minimally modified to return the new data ...
5 years, 9 months ago (2015-03-07 01:35:20 UTC) #8
vadimt
Yeah, I mean this is already implemented, and please review.
5 years, 9 months ago (2015-03-07 01:49:12 UTC) #9
Alexei Svitkine (slow)
https://codereview.chromium.org/985773002/diff/40001/chrome/browser/task_profiler/task_profiler_data_serializer.cc File chrome/browser/task_profiler/task_profiler_data_serializer.cc (right): https://codereview.chromium.org/985773002/diff/40001/chrome/browser/task_profiler/task_profiler_data_serializer.cc#newcode88 chrome/browser/task_profiler/task_profiler_data_serializer.cc:88: for (const auto& i : process_data_phase.tasks) { Nit: task ...
5 years, 9 months ago (2015-03-09 17:13:36 UTC) #10
Ilya Sherman
Thanks, Vadim. Please remember to update the CL description as well. https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.cc File base/tracked_objects.cc (right): ...
5 years, 9 months ago (2015-03-10 00:48:11 UTC) #11
vadimt
https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.cc#newcode396 base/tracked_objects.cc:396: &process_data_snapshot->phased_process_data_snapshots[0]); It's a map, and indexing it creates an ...
5 years, 9 months ago (2015-03-13 23:18:02 UTC) #12
Ilya Sherman
A few follow-up comments on the previous patch set. Sending separately so that they don't ...
5 years, 9 months ago (2015-03-14 00:02:31 UTC) #13
Ilya Sherman
https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h#newcode352 base/tracked_objects.h:352: typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshots; On 2015/03/13 23:18:01, vadimt wrote: ...
5 years, 9 months ago (2015-03-14 00:20:35 UTC) #14
vadimt
https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h#newcode352 base/tracked_objects.h:352: typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshots; The event type is declared ...
5 years, 9 months ago (2015-03-14 01:39:16 UTC) #15
Alexei Svitkine (slow)
https://codereview.chromium.org/985773002/diff/80001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/985773002/diff/80001/base/tracked_objects.h#newcode353 base/tracked_objects.h:353: typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshotMap; Nit: This shouldn't be in ...
5 years, 9 months ago (2015-03-16 22:00:15 UTC) #16
vadimt
https://codereview.chromium.org/985773002/diff/80001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/985773002/diff/80001/base/tracked_objects.h#newcode353 base/tracked_objects.h:353: typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshotMap; On 2015/03/16 22:00:15, Alexei Svitkine ...
5 years, 9 months ago (2015-03-16 23:09:14 UTC) #17
Alexei Svitkine (slow)
https://codereview.chromium.org/985773002/diff/80001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/985773002/diff/80001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode387 chrome/browser/metrics/chrome_metrics_service_client.cc:387: const metrics::ProfilerEvents& past_events) { On 2015/03/16 23:09:13, vadimt wrote: ...
5 years, 9 months ago (2015-03-17 14:53:41 UTC) #18
vadimt
https://codereview.chromium.org/985773002/diff/80001/chrome/browser/metrics/chrome_metrics_service_client.cc File chrome/browser/metrics/chrome_metrics_service_client.cc (right): https://codereview.chromium.org/985773002/diff/80001/chrome/browser/metrics/chrome_metrics_service_client.cc#newcode387 chrome/browser/metrics/chrome_metrics_service_client.cc:387: const metrics::ProfilerEvents& past_events) { The latter. Added TODO. https://codereview.chromium.org/985773002/diff/80001/components/metrics/profiler/tracking_synchronizer_unittest.cc ...
5 years, 9 months ago (2015-03-17 15:12:53 UTC) #19
Alexei Svitkine (slow)
lgtm, but please also wait for Ilya's review https://codereview.chromium.org/985773002/diff/80001/components/metrics/profiler/tracking_synchronizer_unittest.cc File components/metrics/profiler/tracking_synchronizer_unittest.cc (right): https://codereview.chromium.org/985773002/diff/80001/components/metrics/profiler/tracking_synchronizer_unittest.cc#newcode68 components/metrics/profiler/tracking_synchronizer_unittest.cc:68: bool ...
5 years, 9 months ago (2015-03-17 15:16:43 UTC) #20
Ilya Sherman
https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h#newcode352 base/tracked_objects.h:352: typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshots; On 2015/03/14 01:39:15, vadimt wrote: ...
5 years, 9 months ago (2015-03-17 23:57:39 UTC) #21
vadimt
https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h File base/tracked_objects.h (right): https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h#newcode352 base/tracked_objects.h:352: typedef std::map<int, ProcessDataPhaseSnapshot> PhasedProcessDataSnapshots; > > Speaking of the ...
5 years, 9 months ago (2015-03-19 00:20:44 UTC) #22
Ilya Sherman
LGTM with some topics for discussion punted to the next CL, plus some nits: https://codereview.chromium.org/985773002/diff/40001/base/tracked_objects.h ...
5 years, 9 months ago (2015-03-19 01:00:51 UTC) #23
vadimt
https://codereview.chromium.org/985773002/diff/120001/components/metrics/profiler/profiler_metrics_provider.cc File components/metrics/profiler/profiler_metrics_provider.cc (right): https://codereview.chromium.org/985773002/diff/120001/components/metrics/profiler/profiler_metrics_provider.cc#newcode133 components/metrics/profiler/profiler_metrics_provider.cc:133: uma_proto->add_profiler_event()->CopyFrom(event.second); On 2015/03/19 01:00:51, Ilya Sherman wrote: > On ...
5 years, 9 months ago (2015-03-19 18:01:47 UTC) #24
vadimt
cpu@chromium.org: Please provide OWNER's approval. The whole set of files was thoroughly reviewed by pre-reviewed, ...
5 years, 9 months ago (2015-03-19 18:12:43 UTC) #26
cpu_(ooo_6.6-7.5)
can you please split the base change in a standalone CL? I only took a ...
5 years, 9 months ago (2015-03-20 19:38:09 UTC) #27
vadimt
This CL is already a result of splitting the original CL into 5 parts :) ...
5 years, 9 months ago (2015-03-20 20:19:03 UTC) #28
cpu_(ooo_6.6-7.5)
I am almost done. You still need security review for the IPC change. https://codereview.chromium.org/985773002/diff/160001/content/browser/browser_child_process_host_impl.cc File ...
5 years, 9 months ago (2015-03-26 20:31:43 UTC) #29
vadimt
https://codereview.chromium.org/985773002/diff/160001/content/browser/browser_child_process_host_impl.cc File content/browser/browser_child_process_host_impl.cc (right): https://codereview.chromium.org/985773002/diff/160001/content/browser/browser_child_process_host_impl.cc#newcode63 content/browser/browser_child_process_host_impl.cc:63: BrowserChildProcessHostDelegate* delegate) { Ack
5 years, 9 months ago (2015-03-26 20:35:47 UTC) #30
vadimt
dcheng@chromium.org: Please review changes in IPC messages. Background: ChildProcessHostMsg_ChildProfilerData contains diagnostic information for Chrome task ...
5 years, 9 months ago (2015-03-26 20:49:17 UTC) #32
dcheng
This is a pretty large patch. It's going to take me awhile to review.
5 years, 9 months ago (2015-03-27 02:50:45 UTC) #33
dcheng
A few random things I noticed. I'm still tracing through the IPC bits, but these ...
5 years, 9 months ago (2015-03-27 08:36:38 UTC) #34
dcheng
IPC changes LGTM, but please address the minor comments before landing. https://codereview.chromium.org/985773002/diff/160001/components/metrics/profiler/tracking_synchronizer.cc File components/metrics/profiler/tracking_synchronizer.cc (right): ...
5 years, 9 months ago (2015-03-27 09:32:53 UTC) #35
vadimt
https://codereview.chromium.org/985773002/diff/160001/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/985773002/diff/160001/base/tracked_objects.cc#newcode645 base/tracked_objects.cc:645: for (auto& death : death_map_) On 2015/03/27 08:36:36, dcheng ...
5 years, 9 months ago (2015-03-27 20:12:34 UTC) #36
dcheng
LGTM with nits. https://codereview.chromium.org/985773002/diff/160001/components/metrics/profiler/tracking_synchronizer.cc File components/metrics/profiler/tracking_synchronizer.cc (right): https://codereview.chromium.org/985773002/diff/160001/components/metrics/profiler/tracking_synchronizer.cc#newcode298 components/metrics/profiler/tracking_synchronizer.cc:298: if (phase != phase_completion_events_sequence_.size()) { On ...
5 years, 8 months ago (2015-03-30 06:56:06 UTC) #37
vadimt
https://codereview.chromium.org/985773002/diff/180001/components/metrics/profiler/profiler_metrics_provider.h File components/metrics/profiler/profiler_metrics_provider.h (right): https://codereview.chromium.org/985773002/diff/180001/components/metrics/profiler/profiler_metrics_provider.h#newcode41 components/metrics/profiler/profiler_metrics_provider.h:41: const base::TimeDelta& phase_start, On 2015/03/30 06:56:06, dcheng wrote: > ...
5 years, 8 months ago (2015-03-30 18:14:43 UTC) #38
cpu_(ooo_6.6-7.5)
lgtm
5 years, 8 months ago (2015-03-30 20:04:11 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/200001
5 years, 8 months ago (2015-03-30 20:11:53 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/9903) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-03-30 20:16:32 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/220001
5 years, 8 months ago (2015-03-30 21:29:47 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/52763)
5 years, 8 months ago (2015-03-30 21:41:45 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/240001
5 years, 8 months ago (2015-03-30 22:16:08 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/52438)
5 years, 8 months ago (2015-03-30 22:48:24 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/260001
5 years, 8 months ago (2015-03-30 23:14:07 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10009) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 8 months ago (2015-03-30 23:30:33 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/280001
5 years, 8 months ago (2015-03-31 00:59:29 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10073)
5 years, 8 months ago (2015-03-31 01:06:39 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/320001
5 years, 8 months ago (2015-03-31 15:36:33 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/10286)
5 years, 8 months ago (2015-03-31 15:46:46 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/340001
5 years, 8 months ago (2015-03-31 19:59:58 UTC) #74
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/7217)
5 years, 8 months ago (2015-03-31 20:37:43 UTC) #76
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/985773002/360001
5 years, 8 months ago (2015-03-31 21:31:40 UTC) #79
commit-bot: I haz the power
Committed patchset #19 (id:360001)
5 years, 8 months ago (2015-04-01 00:09:59 UTC) #80
commit-bot: I haz the power
5 years, 8 months ago (2015-04-01 00:10:32 UTC) #81
Message was sent while issue was closed.
Patchset 19 (id:??) landed as
https://crrev.com/379d7fe794b4a200e08ac3f23c69184edef085f7
Cr-Commit-Position: refs/heads/master@{#323151}

Powered by Google App Engine
This is Rietveld 408576698