Make ScopedFrameBlamer more lightweight, especially when tracing is off.

With this patch, non-trivial work is done only if the tracing category
"blink" (which is the one used to report this information) is enabled.
In this case, ScopedFrameBlamer need only check this and ~ScopedFrameBlamer
is trivial enough to inline.

Additionally, duplicate calls to virtual client methods are eliminated
in the case where frame blaming is enabled.

This yields a roughly 4x speedup to a ScopedFrameBlamer microbenchmark
(measured on Linux Z620), and trims about 1/3 of the time off a benchmark
that repeatedly connects a custom element (invoking a trivial
connectedCallback) based on the one in bug 714030.

Bug: 714030
Change-Id: I9152cbd1f55c3fbb62117d7025c92e6476157e65
Reviewed-on: https://chromium-review.googlesource.com/543696
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Dominic Cooney <dominicc@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481438}
3 files changed