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

Issue 2537143005: Only create network_instrumentation TracedValue if tracing enabled (Closed)

Created:
4 years ago by dproy
Modified:
4 years ago
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Only create network_instrumentation TracedValue if tracing enabled Currently the TracedValues were being created even when the tracing category was disabled. This CL moves the creation of the TracedValues into a function, which is called only when the TRACE macro arguments are evaluated, which, in turn, only happens when the tracing category is enabled. Measuring on a linux workstation using the linux perf tools, the instrumentation overhead with the tracing category disabled is now below 2% of the cost of the ResourceFetcher::requestResource function, as opposed to the 12% measured before. Committed: https://crrev.com/02efb805d9768ca2cead9ae25e34672b9d99974b Cr-Commit-Position: refs/heads/master@{#437657}

Patch Set 1 #

Patch Set 2 : typo #

Total comments: 1

Patch Set 3 : Use anonymous namespace #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -9 lines) Patch
M third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp View 1 2 2 chunks +31 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (12 generated)
dproy
PTAL
4 years ago (2016-11-30 22:00:32 UTC) #4
Charlie Harrison
Looks good, but I am still surprised this has meaningful overhead if tracing is turned ...
4 years ago (2016-11-30 22:07:37 UTC) #5
dproy
One part of the overhead is creating the scoped tracker, which is still happening even ...
4 years ago (2016-11-30 22:58:52 UTC) #6
Charlie Harrison
Ah right, creating the ScopedTracker explains most of it. LGTM from me but let's wait ...
4 years ago (2016-11-30 23:00:09 UTC) #7
caseq
lgtm https://codereview.chromium.org/2537143005/diff/20001/third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp File third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp (right): https://codereview.chromium.org/2537143005/diff/20001/third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp#newcode39 third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp:39: std::unique_ptr<TracedValue> scopedResourceTrackerBeginData( All three could be in anonymous ...
4 years ago (2016-12-01 18:10:25 UTC) #8
Charlie Harrison
dproy can you check to see if the regression made in to M56?
4 years ago (2016-12-05 15:00:07 UTC) #9
dproy
On 2016/12/05 15:00:07, Charlie Harrison wrote: > dproy can you check to see if the ...
4 years ago (2016-12-07 19:53:01 UTC) #10
dproy
+jbroman@ for owner review.
4 years ago (2016-12-08 01:04:43 UTC) #12
jbroman
lgtm
4 years ago (2016-12-08 15:16:34 UTC) #13
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/2537143005/40001
4 years ago (2016-12-08 17:20:15 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/352557)
4 years ago (2016-12-08 20:18:59 UTC) #18
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/2537143005/40001
4 years ago (2016-12-09 19:11:54 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-09 21:13:49 UTC) #23
commit-bot: I haz the power
4 years ago (2016-12-12 14:41:01 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/02efb805d9768ca2cead9ae25e34672b9d99974b
Cr-Commit-Position: refs/heads/master@{#437657}

Powered by Google App Engine
This is Rietveld 408576698