Optimize machine code size of UMA histogram macros.
commit5c2d502d34ea0f162d7fc5c916b1cff9e6acb0b4
authorasvitkine <asvitkine@chromium.org>
Fri, 19 Jun 2015 00:37:50 +0000 (18 17:37 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 00:38:19 +0000 (19 00:38 +0000)
tree24838049d4965c1cb64ad5d98847d675dbe18265
parent422033a18c2630135e2f7aa2d68b885a05cbd388
Optimize machine code size of UMA histogram macros.

Adds overloads to the histogram FactoryGet() functions
that take a const char* param, instead of std::string for
the name. This avoids the std::string constructor being
inlined at call-sites when a C string is passed (but call
sites that pass std::strings already will continue to use
the std::string functions).

In my Mac Release build, this change results in a 271K
reduction to Chromium Framework binary size.

BUG=343946

Review URL: https://codereview.chromium.org/1195473002

Cr-Commit-Position: refs/heads/master@{#335178}
base/metrics/histogram.cc
base/metrics/histogram.h