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

Issue 1332943002: [tracing] Smaps provider uses fscanf instead of istream (Closed)

Created:
5 years, 3 months ago by ssid
Modified:
5 years, 2 months ago
CC:
chromium-reviews, 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] Smaps provider uses fscanf instead of istream The smaps file descriptor received from browser process needs to be read into a string for creating an istream. This could consume lot of memory. So, this CL switches the dump provider to use fscanf instead of istream to read the file. BUG=461788 Committed: https://crrev.com/48ce0ef9537a41150fa0d59edd47c318661aeee4 Cr-Commit-Position: refs/heads/master@{#352675}

Patch Set 1 #

Total comments: 18

Patch Set 2 : Fixes #

Patch Set 3 : Nits. #

Patch Set 4 : Nits. #

Total comments: 16

Patch Set 5 : Using FILE*. #

Total comments: 8

Patch Set 6 : Fixes. #

Patch Set 7 : Fixes. #

Patch Set 8 : Fixes. #

Patch Set 9 : Nit. #

Patch Set 10 : Moving to readin by lines. #

Total comments: 14

Patch Set 11 : Fixes. #

Messages

Total messages: 19 (7 generated)
ssid
PTAL
5 years, 3 months ago (2015-09-10 16:15:54 UTC) #2
Primiano Tucci (use gerrit)
I think this can be simplified a lot as scanf is much more magic (I ...
5 years, 3 months ago (2015-09-10 16:52:36 UTC) #3
ssid
PTAL, thanks https://codereview.chromium.org/1332943002/diff/1/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/1/base/trace_event/process_memory_maps_dump_provider.cc#newcode8 base/trace_event/process_memory_maps_dump_provider.cc:8: #include <inttypes.h> On 2015/09/10 16:52:36, Primiano Tucci ...
5 years, 3 months ago (2015-09-21 11:25:43 UTC) #4
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc#newcode67 base/trace_event/process_memory_maps_dump_provider.cc:67: use TrimWhitespaceASCII ? https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc#newcode72 base/trace_event/process_memory_maps_dump_provider.cc:72: uint64 counter_value = 0; ...
5 years, 2 months ago (2015-09-30 09:37:02 UTC) #5
ssid
https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc#newcode67 base/trace_event/process_memory_maps_dump_provider.cc:67: On 2015/09/30 09:37:02, Primiano Tucci wrote: > use TrimWhitespaceASCII ...
5 years, 2 months ago (2015-09-30 11:15:13 UTC) #7
Primiano Tucci (use gerrit)
https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/60001/base/trace_event/process_memory_maps_dump_provider.cc#newcode125 base/trace_event/process_memory_maps_dump_provider.cc:125: next = fgetc(smaps_file); On 2015/09/30 11:15:13, ssid wrote: > ...
5 years, 2 months ago (2015-09-30 15:36:35 UTC) #8
ssid
Addressing comments and fixing all the tests. PTAL. https://codereview.chromium.org/1332943002/diff/100001/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/100001/base/trace_event/process_memory_maps_dump_provider.cc#newcode28 base/trace_event/process_memory_maps_dump_provider.cc:28: const ...
5 years, 2 months ago (2015-10-02 17:07:20 UTC) #11
Primiano Tucci (use gerrit)
LGTM with some comments https://codereview.chromium.org/1332943002/diff/260001/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/260001/base/trace_event/process_memory_maps_dump_provider.cc#newcode10 base/trace_event/process_memory_maps_dump_provider.cc:10: #if defined(OS_LINUX) || defined(OS_ANDROID) Don't ...
5 years, 2 months ago (2015-10-06 16:37:32 UTC) #13
ssid
Made changes suggested. Thanks. https://codereview.chromium.org/1332943002/diff/260001/base/trace_event/process_memory_maps_dump_provider.cc File base/trace_event/process_memory_maps_dump_provider.cc (right): https://codereview.chromium.org/1332943002/diff/260001/base/trace_event/process_memory_maps_dump_provider.cc#newcode10 base/trace_event/process_memory_maps_dump_provider.cc:10: #if defined(OS_LINUX) || defined(OS_ANDROID) On ...
5 years, 2 months ago (2015-10-06 18:47:05 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1332943002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1332943002/280001
5 years, 2 months ago (2015-10-06 19:59:20 UTC) #17
commit-bot: I haz the power
Committed patchset #11 (id:280001)
5 years, 2 months ago (2015-10-06 20:08:52 UTC) #18
commit-bot: I haz the power
5 years, 2 months ago (2015-10-06 20:09:44 UTC) #19
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/48ce0ef9537a41150fa0d59edd47c318661aeee4
Cr-Commit-Position: refs/heads/master@{#352675}

Powered by Google App Engine
This is Rietveld 408576698