Commit b4b91fe8 authored by asvitkine's avatar asvitkine Committed by Commit bot

A couple fixes to find_unmapped_histograms.py.

- Treats ')' as a param delimeter for the macros.
  This makes SCOPED_UMA_HISTOGRAM_TIMER("Foo") not trigger
  the non-literal name warning.
- Removes check for FieldTrial::MakeName() which no longer exists.

BUG=none
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#292936}
parent 5aa9a79b
......@@ -38,8 +38,8 @@ HISTOGRAM_REGEX = re.compile(r"""
\w* # Match the rest of the macro name, e.g. '_ENUMERATION'
\( # Match the opening parenthesis for the macro
\s* # Match any whitespace -- especially, any newlines
([^,]*) # Capture the first parameter to the macro
, # Match the comma that delineates the first parameter
([^,)]*) # Capture the first parameter to the macro
[,)] # Match the comma/paren that delineates the first parameter
""", re.VERBOSE)
......@@ -113,10 +113,6 @@ def logNonLiteralHistogram(filename, histogram):
if '\\' in histogram:
return
# Field trials are unique within a session, so are effectively constants.
if histogram.startswith('base::FieldTrial::MakeName'):
return
# Ignore histogram names that have been pulled out into C++ constants.
if CONSTANT_REGEX.match(histogram):
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment