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

Issue 2427503003: Rename ScopedThreadHeapUsage to ThreadHeapUsageTracker. (Closed)

Created:
4 years, 2 months ago by Sigurður Ásgeirsson
Modified:
4 years, 2 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rename ScopedThreadHeapUsage to ThreadHeapUsageTracker and change interface. This is broken out from https://codereview.chromium.org/2386123003/, and the interface changes are influenced by actual usage. The interface is changed to use explicit Start/Stop, instead of implicitly starting and stopping on creation/destruction. This is necessary to support exclusive scopes, which is how base/tracked_objects.h does task execution time measurement. Unfortunately a Scoped* abstraction can't support exclusive scopes, as here must always be a gap from reading the current state to when the Scoped* instance goes out of scope. Any heap activity in this gap will be lost from measurement, and will neither tally to the current nor the outer scope. Initialization is also changed, such that TLS is initialized as heap tracking is enabled. It is now allowed to create ThreadHeapTracker instances without any initialization, though it's not allowed to Start() them. BUG=644385 Committed: https://crrev.com/07856a7b8add0eba66d71fc62b5e32be9bc03d69 Cr-Commit-Position: refs/heads/master@{#425997}

Patch Set 1 #

Patch Set 2 : Now even compiles. #

Patch Set 3 : Make the no-Stop case go to inclusive Stop() at destruction. #

Patch Set 4 : Rename ThreadAllocatorUsage->ThreadHeapUsage for less hubris. #

Patch Set 5 : Improve docs, misc cleanup. #

Patch Set 6 : Fix non-MSVC compilation error. #

Total comments: 4

Patch Set 7 : Address Chris' nits. #

Total comments: 10

Patch Set 8 : Address Lei Zhang's comments, fix leak in test. #

Total comments: 8

Patch Set 9 : Addressed Primiano's nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+394 lines, -976 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 4 chunks +10 lines, -11 lines 0 comments Download
D base/debug/scoped_thread_heap_usage.h View 1 chunk +0 lines, -103 lines 0 comments Download
D base/debug/scoped_thread_heap_usage.cc View 1 chunk +0 lines, -234 lines 0 comments Download
D base/debug/scoped_thread_heap_usage_unittest.cc View 1 chunk +0 lines, -487 lines 0 comments Download
A base/debug/thread_heap_usage_tracker.h View 1 2 3 4 5 6 7 8 1 chunk +117 lines, -0 lines 0 comments Download
A + base/debug/thread_heap_usage_tracker.cc View 1 2 3 4 5 6 7 8 8 chunks +85 lines, -56 lines 0 comments Download
A + base/debug/thread_heap_usage_tracker_unittest.cc View 1 2 3 4 5 6 7 8 16 chunks +182 lines, -85 lines 0 comments Download

Messages

Total messages: 37 (24 generated)
Sigurður Ásgeirsson
Hey Primiano, here's the CL I threatened before the weekend. Siggi
4 years, 2 months ago (2016-10-17 18:09:36 UTC) #5
chrisha
Tests look nice and thorough! lgtm other than nits https://codereview.chromium.org/2427503003/diff/100001/base/debug/thread_heap_usage_tracker.h File base/debug/thread_heap_usage_tracker.h (right): https://codereview.chromium.org/2427503003/diff/100001/base/debug/thread_heap_usage_tracker.h#newcode30 base/debug/thread_heap_usage_tracker.h:30: ...
4 years, 2 months ago (2016-10-17 19:17:48 UTC) #12
Sigurður Ásgeirsson
Thanks - thestig@chromium.org for owners pretty please? https://codereview.chromium.org/2427503003/diff/100001/base/debug/thread_heap_usage_tracker.h File base/debug/thread_heap_usage_tracker.h (right): https://codereview.chromium.org/2427503003/diff/100001/base/debug/thread_heap_usage_tracker.h#newcode30 base/debug/thread_heap_usage_tracker.h:30: // Where ...
4 years, 2 months ago (2016-10-17 19:35:23 UTC) #16
Lei Zhang
lgtm https://codereview.chromium.org/2427503003/diff/120001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/2427503003/diff/120001/base/BUILD.gn#newcode269 base/BUILD.gn:269: # allocator.gyp for details). I know you are ...
4 years, 2 months ago (2016-10-17 20:54:23 UTC) #17
Sigurður Ásgeirsson
Thanks! https://codereview.chromium.org/2427503003/diff/120001/base/BUILD.gn File base/BUILD.gn (right): https://codereview.chromium.org/2427503003/diff/120001/base/BUILD.gn#newcode269 base/BUILD.gn:269: # allocator.gyp for details). On 2016/10/17 20:54:23, Lei ...
4 years, 2 months ago (2016-10-18 13:39:23 UTC) #20
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/2427503003/140001
4 years, 2 months ago (2016-10-18 13:39:43 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/313785)
4 years, 2 months ago (2016-10-18 14:51:09 UTC) #25
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/2427503003/140001
4 years, 2 months ago (2016-10-18 14:55:14 UTC) #27
Primiano Tucci (use gerrit)
AAAAAAAAA this is back "hello, who is proof of concept? My name is official CL ...
4 years, 2 months ago (2016-10-18 15:11:14 UTC) #28
Sigurður Ásgeirsson
Thanks, now committing for realz, eh! https://codereview.chromium.org/2427503003/diff/140001/base/debug/thread_heap_usage_tracker.cc File base/debug/thread_heap_usage_tracker.cc (right): https://codereview.chromium.org/2427503003/diff/140001/base/debug/thread_heap_usage_tracker.cc#newcode186 base/debug/thread_heap_usage_tracker.cc:186: ThreadHeapUsage current = ...
4 years, 2 months ago (2016-10-18 15:48:40 UTC) #30
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/2427503003/160001
4 years, 2 months ago (2016-10-18 15:49:08 UTC) #33
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-10-18 17:18:52 UTC) #35
commit-bot: I haz the power
4 years, 2 months ago (2016-10-18 17:20:33 UTC) #37
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/07856a7b8add0eba66d71fc62b5e32be9bc03d69
Cr-Commit-Position: refs/heads/master@{#425997}

Powered by Google App Engine
This is Rietveld 408576698