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

Issue 1383733002: [tracing] Add graphics memory dump provider for Android (Closed)

Created:
5 years, 2 months ago by Primiano Tucci (use gerrit)
Modified:
5 years, 2 months ago
CC:
ericrk, chromium-reviews, darin-cc_chromium.org, jam, perezju, piman+watch_chromium.org, reveman, ssid, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[tracing] Add graphics memory dump provider for Android This CL introduces a memory dump provider able to gather GPU/Graphics data on Android coming from libmemtrack. libmemtrack is an API which allows different GPU vendors to expose memory statistics about graphical memory usage. Due to the technical design of this API (libmemtrack requires root) the architecture of this dump provider is decoupled in a helper service (crrev.com/1383583002) which needs to be sideloaded manually on the device (will be automated in telemetry scripts). The helper service exposes the memory stats via a UNIX IPC socket. This memory dump provider connects to the socket and receives the memory numbers for the current process. Design-doc: https://goo.gl/4Y30p9 Screenshot: https://goo.gl/Z27djX BUG=529451 Committed: https://crrev.com/b3fb641552ace46ce637f4345ac8809cbfbe0059 Cr-Commit-Position: refs/heads/master@{#354032}

Patch Set 1 #

Patch Set 2 : #

Total comments: 12

Patch Set 3 : CHECK -> return false + nits #

Patch Set 4 : Rebase #

Total comments: 16

Patch Set 5 : Re rsesek@ #

Total comments: 2

Patch Set 6 : Remove test friends lines #

Total comments: 1

Patch Set 7 : Add memtrack to column name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -1 line) Patch
M components/tracing.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M components/tracing/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A components/tracing/graphics_memory_dump_provider_android.h View 1 2 3 4 5 1 chunk +52 lines, -0 lines 0 comments Download
A components/tracing/graphics_memory_dump_provider_android.cc View 1 2 3 4 5 6 1 chunk +140 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M content/gpu/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/gpu/gpu_main.cc View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (12 generated)
Primiano Tucci (use gerrit)
+petrcermak for a first round. +ericrk/reveman FYI (see screenshot for the final effect)
5 years, 2 months ago (2015-10-02 18:08:39 UTC) #3
ericrk
Looks good! Excited this came together so fast. https://codereview.chromium.org/1383733002/diff/40001/base/trace_event/process_memory_dump.h File base/trace_event/process_memory_dump.h (right): https://codereview.chromium.org/1383733002/diff/40001/base/trace_event/process_memory_dump.h#newcode67 base/trace_event/process_memory_dump.h:67: MemoryAllocatorDump* ...
5 years, 2 months ago (2015-10-02 18:30:11 UTC) #5
petrcermak
Looks good overall. Just a few comments. One description nit: Drop "that" in "The helper ...
5 years, 2 months ago (2015-10-05 08:29:27 UTC) #6
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1383733002/diff/40001/base/trace_event/process_memory_dump.h File base/trace_event/process_memory_dump.h (right): https://codereview.chromium.org/1383733002/diff/40001/base/trace_event/process_memory_dump.h#newcode67 base/trace_event/process_memory_dump.h:67: MemoryAllocatorDump* GetOrCreateAllocatorDump( On 2015/10/02 18:30:11, ericrk wrote: > Can ...
5 years, 2 months ago (2015-10-05 14:24:26 UTC) #7
ericrk
lgtm https://codereview.chromium.org/1383733002/diff/40001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/1383733002/diff/40001/content/browser/browser_main_loop.cc#newcode1177 content/browser/browser_main_loop.cc:1177: base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( On 2015/10/05 at 14:24:25, Primiano Tucci wrote: ...
5 years, 2 months ago (2015-10-05 20:32:21 UTC) #8
Robert Sesek
https://codereview.chromium.org/1383733002/diff/80001/components/tracing/graphics_memory_dump_provider_android.cc File components/tracing/graphics_memory_dump_provider_android.cc (right): https://codereview.chromium.org/1383733002/diff/80001/components/tracing/graphics_memory_dump_provider_android.cc#newcode34 components/tracing/graphics_memory_dump_provider_android.cc:34: sock = socket(AF_UNIX, SOCK_SEQPACKET, 0); Consider using base/sync_socket.h, since ...
5 years, 2 months ago (2015-10-09 17:22:21 UTC) #10
Primiano Tucci (use gerrit)
Super thanks Robert for the thorough review! See answers inline. Note: I'm adding a unittest ...
5 years, 2 months ago (2015-10-12 13:00:04 UTC) #11
Primiano Tucci (use gerrit)
Missing OWNERS stamps +dsinclair for components/tracing/ +piman for content/
5 years, 2 months ago (2015-10-12 13:05:40 UTC) #13
piman
lgtm
5 years, 2 months ago (2015-10-12 16:34:31 UTC) #14
Primiano Tucci (use gerrit)
rsesek@, mind taking a 2nd look? Thanks
5 years, 2 months ago (2015-10-13 15:51:36 UTC) #15
Robert Sesek
https://codereview.chromium.org/1383733002/diff/100001/components/tracing/graphics_memory_dump_provider_android.h File components/tracing/graphics_memory_dump_provider_android.h (right): https://codereview.chromium.org/1383733002/diff/100001/components/tracing/graphics_memory_dump_provider_android.h#newcode33 components/tracing/graphics_memory_dump_provider_android.h:33: FRIEND_TEST_ALL_PREFIXES(GraphicsMemoryDumpProviderTest, ParseResponse); Where's the test?
5 years, 2 months ago (2015-10-13 22:38:39 UTC) #16
Robert Sesek
LGTM otherwise
5 years, 2 months ago (2015-10-13 22:38:46 UTC) #17
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1383733002/diff/100001/components/tracing/graphics_memory_dump_provider_android.h File components/tracing/graphics_memory_dump_provider_android.h (right): https://codereview.chromium.org/1383733002/diff/100001/components/tracing/graphics_memory_dump_provider_android.h#newcode33 components/tracing/graphics_memory_dump_provider_android.h:33: FRIEND_TEST_ALL_PREFIXES(GraphicsMemoryDumpProviderTest, ParseResponse); On 2015/10/13 22:38:39, Robert Sesek wrote: > ...
5 years, 2 months ago (2015-10-14 08:44:34 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1383733002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1383733002/120001
5 years, 2 months ago (2015-10-14 08:46:01 UTC) #21
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/109239)
5 years, 2 months ago (2015-10-14 08:57:23 UTC) #23
Primiano Tucci (use gerrit)
Aaaaa owners are never enough. +dsinclair for /components/tracing
5 years, 2 months ago (2015-10-14 09:17:18 UTC) #24
dsinclair
https://codereview.chromium.org/1383733002/diff/120001/components/tracing/graphics_memory_dump_provider_android.cc File components/tracing/graphics_memory_dump_provider_android.cc (right): https://codereview.chromium.org/1383733002/diff/120001/components/tracing/graphics_memory_dump_provider_android.cc#newcode101 components/tracing/graphics_memory_dump_provider_android.cc:101: base::CStringTokenizer tokenizer(response, response + length, " \n"); If I ...
5 years, 2 months ago (2015-10-14 14:44:46 UTC) #25
Primiano Tucci (use gerrit)
On 2015/10/14 14:44:46, dsinclair wrote: > https://codereview.chromium.org/1383733002/diff/120001/components/tracing/graphics_memory_dump_provider_android.cc > File components/tracing/graphics_memory_dump_provider_android.cc (right): > > https://codereview.chromium.org/1383733002/diff/120001/components/tracing/graphics_memory_dump_provider_android.cc#newcode101 > ...
5 years, 2 months ago (2015-10-14 14:56:39 UTC) #26
Primiano Tucci (use gerrit)
On 2015/10/14 14:44:46, dsinclair wrote: > https://codereview.chromium.org/1383733002/diff/120001/components/tracing/graphics_memory_dump_provider_android.cc > File components/tracing/graphics_memory_dump_provider_android.cc (right): > > https://codereview.chromium.org/1383733002/diff/120001/components/tracing/graphics_memory_dump_provider_android.cc#newcode101 > ...
5 years, 2 months ago (2015-10-14 14:57:27 UTC) #27
dsinclair
lgtm
5 years, 2 months ago (2015-10-14 14:58:53 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1383733002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1383733002/120001
5 years, 2 months ago (2015-10-14 14:59:11 UTC) #30
Primiano Tucci (use gerrit)
(I unticked it, just realized there is a small last-minute rename to the column name ...
5 years, 2 months ago (2015-10-14 15:01:35 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1383733002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1383733002/140001
5 years, 2 months ago (2015-10-14 15:04:16 UTC) #35
commit-bot: I haz the power
Committed patchset #7 (id:140001)
5 years, 2 months ago (2015-10-14 16:04:01 UTC) #36
commit-bot: I haz the power
5 years, 2 months ago (2015-10-14 16:04:56 UTC) #37
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/b3fb641552ace46ce637f4345ac8809cbfbe0059
Cr-Commit-Position: refs/heads/master@{#354032}

Powered by Google App Engine
This is Rietveld 408576698