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

Issue 9702014: [UMA] Use proper C++ objects to serialize tracked_objects across process boundaries. (Closed)

Created:
8 years, 9 months ago by Ilya Sherman
Modified:
8 years, 8 months ago
CC:
chromium-reviews, MAD, jar (doing other things), joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, Ilya Sherman, eroman
Visibility:
Public.

Description

[UMA] Use proper C++ objects to serialize tracked_objects across process boundaries. In more detail: (1) Adds serialized versions of the key tracked_objects:: classes. (2) Rename Snapshot -> SerializedSnapshot (to match other serialized class names). Move a bit of complexity out of the class into the calling code, so that the class is just a dumb data container. (3) Rename DataCollector -> SerializedProcessData. Move most of the complexity out of the class into the calling code, so that the class is just a dumb data container. (4) Safer memory management: Rather than returning a heap-allocated object that the caller is expected to take ownership of, have the caller pass in an allocated object (either stack- or heap-allocated -- whichever is more convenient for the client). BUG=103480 TEST=none (refactoring, no functional change expected) TBR=ajwong@chromium.org,estade@chromium.org

Patch Set 1 #

Total comments: 2

Patch Set 2 : Minor cleanup #

Patch Set 3 : Fix base_unittests failures #

Total comments: 5

Patch Set 4 : Refactor structs #

Patch Set 5 : Write JSON unit test and update profiler.js #

Total comments: 20

Patch Set 6 : Don't send the child's process type via IPC #

Patch Set 7 : Minor cleanup #

Patch Set 8 : Make sure to initialize all primitive fields #

Total comments: 26

Patch Set 9 : Rebase #

Patch Set 10 : Rename Serialized->Snapshot #

Patch Set 11 : Fix up unit tests #

Total comments: 29

Patch Set 12 : Refactor some shared code in the unit tests #

Patch Set 13 : Rebase #

Patch Set 14 : Rebase and fix up #includes #

Patch Set 15 : More #include fixes #

Patch Set 16 : Fix race in test code, de-nitting #

Patch Set 17 : Fix unit test compilation #

Total comments: 5

Patch Set 18 : Vary kFunction per test #

Patch Set 19 : Re-upload #

Patch Set 20 : Fix yet another IWYU for chromeos #

Patch Set 21 : Fix yet another IWYU for chromeos/ (let's try that again) #

Patch Set 22 : Fix yet another IWYU for chromeos/ (c'mon, AppEngine!) #

Patch Set 23 : Fix yet another IWYU for chromeos/ (take 4) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1144 lines, -1049 lines) Patch
M base/location.h View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -8 lines 0 comments Download
M base/location.cc View 1 2 3 4 5 6 7 8 9 2 chunks +13 lines, -11 lines 0 comments Download
M base/tracked_objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 chunks +118 lines, -116 lines 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 9 chunks +132 lines, -146 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 13 chunks +287 lines, -529 lines 0 comments Download
M chrome/browser/metrics/tracking_synchronizer.h View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -31 lines 0 comments Download
M chrome/browser/metrics/tracking_synchronizer.cc View 1 2 3 4 5 6 7 8 9 11 chunks +60 lines, -66 lines 0 comments Download
A chrome/browser/metrics/tracking_synchronizer_observer.h View 1 2 3 4 5 6 7 8 9 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/browser/resources/profiler/profiler.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/task_profiler/task_profiler_data_serializer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +22 lines, -1 line 0 comments Download
M chrome/browser/task_profiler/task_profiler_data_serializer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +120 lines, -5 lines 0 comments Download
A chrome/browser/task_profiler/task_profiler_data_serializer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +161 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/profiler_ui.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/webui/profiler_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +19 lines, -11 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +3 lines, -2 lines 0 comments Download
chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/flimflam_client_unittest_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/flimflam_ipconfig_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/flimflam_manager_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/flimflam_network_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M chromeos/dbus/flimflam_profile_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/profiler_controller_impl.h View 1 2 3 4 5 6 7 8 9 4 chunks +18 lines, -16 lines 0 comments Download
M content/browser/profiler_controller_impl.cc View 1 2 3 4 5 6 7 8 9 6 chunks +15 lines, -44 lines 0 comments Download
M content/browser/profiler_message_filter.h View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -7 lines 0 comments Download
M content/browser/profiler_message_filter.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -1 line 0 comments Download
M content/common/child_process_messages.h View 1 2 3 4 5 6 7 8 9 3 chunks +42 lines, -5 lines 0 comments Download
M content/common/child_thread.h View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M content/common/child_thread.cc View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -13 lines 0 comments Download
M content/public/browser/profiler_controller.h View 1 chunk +1 line, -7 lines 0 comments Download
M content/public/browser/profiler_subscriber.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -6 lines 0 comments Download
M remoting/host/plugin/host_script_object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Ilya Sherman
Jim and/or Eric, please take a look at all of the changes. John, please look ...
8 years, 9 months ago (2012-03-14 06:03:45 UTC) #1
eroman
I'll defer to jar (since I've mostly just edited profiler_ui.cc)
8 years, 9 months ago (2012-03-14 07:37:33 UTC) #2
jam
http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h File content/public/common/serialized_profiler_data.h (right): http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h#newcode24 content/public/common/serialized_profiler_data.h:24: public tracked_objects::SerializedProcessData { in content/public we put interfaces and ...
8 years, 9 months ago (2012-03-14 17:45:31 UTC) #3
Ilya Sherman
http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h File content/public/common/serialized_profiler_data.h (right): http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h#newcode24 content/public/common/serialized_profiler_data.h:24: public tracked_objects::SerializedProcessData { On 2012/03/14 17:45:31, John Abd-El-Malek wrote: ...
8 years, 9 months ago (2012-03-14 18:01:28 UTC) #4
jam
On 2012/03/14 18:01:28, Ilya Sherman wrote: > http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h > File content/public/common/serialized_profiler_data.h (right): > > http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h#newcode24 ...
8 years, 9 months ago (2012-03-14 19:01:59 UTC) #5
jam
http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h File content/public/common/serialized_profiler_data.h (right): http://codereview.chromium.org/9702014/diff/29/content/public/common/serialized_profiler_data.h#newcode29 content/public/common/serialized_profiler_data.h:29: void ToValue(base::DictionaryValue* dictionary) const; one more note: this is ...
8 years, 9 months ago (2012-03-14 19:14:03 UTC) #6
Ilya Sherman
There are still some unittest files that need fixing up due to the migration of ...
8 years, 9 months ago (2012-03-16 22:56:42 UTC) #7
Ilya Sherman
Eric, you might want to double check my changes to profiler.js (new as of patch ...
8 years, 9 months ago (2012-03-17 03:33:47 UTC) #8
eroman
changes to the .js look good
8 years, 9 months ago (2012-03-17 03:45:22 UTC) #9
jam
(just looked at content) http://codereview.chromium.org/9702014/diff/8002/content/common/child_process_messages.h File content/common/child_process_messages.h (right): http://codereview.chromium.org/9702014/diff/8002/content/common/child_process_messages.h#newcode92 content/common/child_process_messages.h:92: int, /* sequence number */ ...
8 years, 9 months ago (2012-03-18 19:31:54 UTC) #10
Ilya Sherman
https://chromiumcodereview.appspot.com/9702014/diff/8002/content/common/child_process_messages.h File content/common/child_process_messages.h (right): https://chromiumcodereview.appspot.com/9702014/diff/8002/content/common/child_process_messages.h#newcode92 content/common/child_process_messages.h:92: int, /* sequence number */ On 2012/03/18 19:31:54, John ...
8 years, 9 months ago (2012-03-19 22:01:23 UTC) #11
jam
content lgtm
8 years, 9 months ago (2012-03-19 22:39:37 UTC) #12
jar (doing other things)
+1 for the concept and direction: Moving to a real C++ objects. The use of ...
8 years, 9 months ago (2012-03-21 18:19:55 UTC) #13
Ilya Sherman
https://chromiumcodereview.appspot.com/9702014/diff/8002/base/location.h File base/location.h (right): https://chromiumcodereview.appspot.com/9702014/diff/8002/base/location.h#newcode69 base/location.h:69: struct BASE_EXPORT SerializedLocation { On 2012/03/21 18:19:55, jar wrote: ...
8 years, 9 months ago (2012-03-21 19:23:02 UTC) #14
Ilya Sherman
https://chromiumcodereview.appspot.com/9702014/diff/8002/base/profiler/tracked_time.h File base/profiler/tracked_time.h (right): https://chromiumcodereview.appspot.com/9702014/diff/8002/base/profiler/tracked_time.h#newcode15 base/profiler/tracked_time.h:15: // TODO(isherman): Shouldn't this be explicitly an int32 or ...
8 years, 9 months ago (2012-03-21 21:45:42 UTC) #15
jar (doing other things)
I *think* the code is fine.... but as per our discussion, changing names will probably ...
8 years, 8 months ago (2012-04-04 17:55:35 UTC) #16
Ilya Sherman
https://chromiumcodereview.appspot.com/9702014/diff/29001/base/tracked_objects.cc File base/tracked_objects.cc (right): https://chromiumcodereview.appspot.com/9702014/diff/29001/base/tracked_objects.cc#newcode862 base/tracked_objects.cc:862: : parent(*parent_child.first), On 2012/04/04 17:55:35, jar wrote: > nit: ...
8 years, 8 months ago (2012-04-05 02:51:03 UTC) #17
Ilya Sherman
Unit tests are now fixed up to live in the brave new world as well.
8 years, 8 months ago (2012-04-05 05:10:56 UTC) #18
jar (doing other things)
https://chromiumcodereview.appspot.com/9702014/diff/48001/base/location.h File base/location.h (right): https://chromiumcodereview.appspot.com/9702014/diff/48001/base/location.h#newcode74 base/location.h:74: ~LocationSnapshot(); Probably no need for a destructor. The data ...
8 years, 8 months ago (2012-04-09 23:32:59 UTC) #19
Ilya Sherman
https://chromiumcodereview.appspot.com/9702014/diff/48001/base/location.h File base/location.h (right): https://chromiumcodereview.appspot.com/9702014/diff/48001/base/location.h#newcode74 base/location.h:74: ~LocationSnapshot(); On 2012/04/09 23:32:59, jar wrote: > Probably no ...
8 years, 8 months ago (2012-04-10 00:37:42 UTC) #20
jar (doing other things)
https://chromiumcodereview.appspot.com/9702014/diff/48001/base/tracked_objects_unittest.cc File base/tracked_objects_unittest.cc (right): https://chromiumcodereview.appspot.com/9702014/diff/48001/base/tracked_objects_unittest.cc#newcode132 base/tracked_objects_unittest.cc:132: TEST_F(TrackedObjectsTest, ParentChildTest) { It looks like much of this ...
8 years, 8 months ago (2012-04-10 15:09:36 UTC) #21
Ilya Sherman
https://chromiumcodereview.appspot.com/9702014/diff/48001/base/tracked_objects_unittest.cc File base/tracked_objects_unittest.cc (right): https://chromiumcodereview.appspot.com/9702014/diff/48001/base/tracked_objects_unittest.cc#newcode132 base/tracked_objects_unittest.cc:132: TEST_F(TrackedObjectsTest, ParentChildTest) { On 2012/04/10 15:09:36, jar wrote: > ...
8 years, 8 months ago (2012-04-10 20:34:40 UTC) #22
jar (doing other things)
lgtm
8 years, 8 months ago (2012-04-12 00:39:15 UTC) #23
Evan Stade
rubber stamp on webui
8 years, 8 months ago (2012-04-12 00:39:44 UTC) #24
Ilya Sherman
+James for webui OWNERS review
8 years, 8 months ago (2012-04-12 00:44:08 UTC) #25
Ilya Sherman
Oops, missed Evan's rubber stamp -- thanks Evan :)
8 years, 8 months ago (2012-04-12 00:44:56 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/isherman@chromium.org/9702014/76034
8 years, 8 months ago (2012-04-12 00:45:14 UTC) #27
James Hawkins
webui lgtm
8 years, 8 months ago (2012-04-12 00:48:40 UTC) #28
commit-bot: I haz the power
8 years, 8 months ago (2012-04-12 01:06:22 UTC) #29
Try job failure for 9702014-76034 (retry) on linux_chromeos for step "compile"
(clobber build).
It's a second try, previously, step "compile" failed.
http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chro...

Powered by Google App Engine
This is Rietveld 408576698