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

Issue 509923003: about_flags::ReportCustomFlags() should use signed 32-bit IDs. (Closed)

Created:
6 years, 3 months ago by Alexander Alekseev
Modified:
6 years, 3 months ago
Reviewers:
Ilya Sherman, sky
CC:
chromium-reviews, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

about_flags::ReportCustomFlags() should use signed 32-bit IDs. On 32-bit architectures UMA Histogram IDs (enum LoginCustomFlags) are negative. So HistogramBase::Sample (which is int32_t) should be used. BUG=408196 TEST=manual Committed: https://crrev.com/0107c327ff297fad57af3e10253b84862df820d1 Cr-Commit-Position: refs/heads/master@{#293062}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Update after review. #

Patch Set 3 : Allow negative UMA IDs. #

Patch Set 4 : Moved comment to the beginning of enum. #

Total comments: 2

Patch Set 5 : Rebased. #

Patch Set 6 : Update after review. #

Total comments: 2

Patch Set 7 : Use base::HistogramBase::Sample instead of int32_t everywhere. #

Patch Set 8 : Cleanup. #

Total comments: 4

Patch Set 9 : Cleanup. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -169 lines) Patch
M chrome/browser/about_flags.h View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/about_flags_unittest.cc View 1 2 3 4 5 6 7 12 chunks +20 lines, -19 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +141 lines, -140 lines 0 comments Download
M tools/metrics/histograms/pretty_print.py View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -5 lines 0 comments Download

Messages

Total messages: 26 (1 generated)
Alexander Alekseev
alemate@chromium.org changed reviewers: + isherman@chromium.org, sky@chromium.org
6 years, 3 months ago (2014-08-27 18:37:23 UTC) #1
Alexander Alekseev
Please review: sky@ : chrome/browser/about_flags.cc isherman@ : tools/metrics/histograms/histograms.xml
6 years, 3 months ago (2014-08-27 18:37:23 UTC) #2
sky
I don't understand this. 32bit architecture support 32bit unsigned values, right? https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): ...
6 years, 3 months ago (2014-08-27 20:24:54 UTC) #3
Ilya Sherman
https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc#newcode2243 chrome/browser/about_flags.cc:2243: return static_cast<uint32_t>(metrics::HashMetricName(switch_name)) & Why not just static_cast to <int32_t>? ...
6 years, 3 months ago (2014-08-27 22:05:20 UTC) #4
Alexander Alekseev
https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc#newcode2242 chrome/browser/about_flags.cc:2242: // Need to strip sign bit. On 2014/08/27 20:24:53, ...
6 years, 3 months ago (2014-08-28 02:48:55 UTC) #5
Ilya Sherman
https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc#newcode2243 chrome/browser/about_flags.cc:2243: return static_cast<uint32_t>(metrics::HashMetricName(switch_name)) & On 2014/08/28 02:48:55, alemate wrote: > ...
6 years, 3 months ago (2014-08-28 03:49:57 UTC) #6
Alexander Alekseev
https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/509923003/diff/1/chrome/browser/about_flags.cc#newcode2243 chrome/browser/about_flags.cc:2243: return static_cast<uint32_t>(metrics::HashMetricName(switch_name)) & On 2014/08/28 03:49:57, Ilya Sherman wrote: ...
6 years, 3 months ago (2014-08-28 14:40:52 UTC) #7
sky
Sorry, I still don't get the problem here. Why can't 32bit report a 32bit unsigned ...
6 years, 3 months ago (2014-08-28 15:49:34 UTC) #8
Ilya Sherman
On 2014/08/28 14:40:52, alemate wrote: > PS: BTW, pretty-print.py formats comments inside enum with negative ...
6 years, 3 months ago (2014-08-28 17:36:27 UTC) #9
Alexander Alekseev
> On 2014/08/28 15:49:34, sky wrote: > > Sorry, I still don't get the problem ...
6 years, 3 months ago (2014-08-28 17:45:18 UTC) #10
sky
On Thu, Aug 28, 2014 at 10:45 AM, <alemate@chromium.org> wrote: >> On 2014/08/28 15:49:34, sky ...
6 years, 3 months ago (2014-08-28 19:04:03 UTC) #11
Ilya Sherman
On 2014/08/28 19:04:03, sky wrote: > On Thu, Aug 28, 2014 at 10:45 AM, <mailto:alemate@chromium.org> ...
6 years, 3 months ago (2014-08-28 19:10:41 UTC) #12
sky
On Thu, Aug 28, 2014 at 12:10 PM, <isherman@chromium.org> wrote: > On 2014/08/28 19:04:03, sky ...
6 years, 3 months ago (2014-08-28 23:05:24 UTC) #13
Ilya Sherman
On 2014/08/28 23:05:24, sky wrote: > On Thu, Aug 28, 2014 at 12:10 PM, <mailto:isherman@chromium.org> ...
6 years, 3 months ago (2014-08-28 23:18:58 UTC) #14
sky
https://codereview.chromium.org/509923003/diff/60001/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/509923003/diff/60001/chrome/browser/about_flags.cc#newcode2241 chrome/browser/about_flags.cc:2241: int32_t GetSwitchUMAId(const std::string& switch_name) { Shouldn't you use the ...
6 years, 3 months ago (2014-08-28 23:27:30 UTC) #15
Alexander Alekseev
Please review. On 2014/08/28 17:36:27, Ilya Sherman wrote: > On 2014/08/28 14:40:52, alemate wrote: > ...
6 years, 3 months ago (2014-08-30 04:41:15 UTC) #16
sky
https://codereview.chromium.org/509923003/diff/100001/chrome/browser/about_flags.h File chrome/browser/about_flags.h (right): https://codereview.chromium.org/509923003/diff/100001/chrome/browser/about_flags.h#newcode174 chrome/browser/about_flags.h:174: int32_t GetSwitchUMAId(const std::string& switch_name); How come you aren't using ...
6 years, 3 months ago (2014-09-02 17:13:23 UTC) #17
Alexander Alekseev
https://codereview.chromium.org/509923003/diff/100001/chrome/browser/about_flags.h File chrome/browser/about_flags.h (right): https://codereview.chromium.org/509923003/diff/100001/chrome/browser/about_flags.h#newcode174 chrome/browser/about_flags.h:174: int32_t GetSwitchUMAId(const std::string& switch_name); On 2014/09/02 17:13:22, sky wrote: ...
6 years, 3 months ago (2014-09-02 17:59:32 UTC) #18
sky
LGTM
6 years, 3 months ago (2014-09-02 21:39:28 UTC) #19
Ilya Sherman
LGTM % nits. Thanks. https://codereview.chromium.org/509923003/diff/140001/tools/metrics/histograms/pretty_print.py File tools/metrics/histograms/pretty_print.py (right): https://codereview.chromium.org/509923003/diff/140001/tools/metrics/histograms/pretty_print.py#newcode84 tools/metrics/histograms/pretty_print.py:84: unset_node_keys_indexes = [] nit: Perhaps ...
6 years, 3 months ago (2014-09-02 22:29:48 UTC) #20
Alexander Alekseev
https://codereview.chromium.org/509923003/diff/140001/tools/metrics/histograms/pretty_print.py File tools/metrics/histograms/pretty_print.py (right): https://codereview.chromium.org/509923003/diff/140001/tools/metrics/histograms/pretty_print.py#newcode84 tools/metrics/histograms/pretty_print.py:84: unset_node_keys_indexes = [] On 2014/09/02 22:29:48, Ilya Sherman wrote: ...
6 years, 3 months ago (2014-09-02 23:53:28 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/alemate@chromium.org/509923003/160001
6 years, 3 months ago (2014-09-03 00:03:17 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 3 months ago (2014-09-03 01:59:21 UTC) #24
commit-bot: I haz the power
Committed patchset #9 (id:160001) as 8006292fc8c41df06a6e2b12741c605eafbf5665
6 years, 3 months ago (2014-09-03 04:31:14 UTC) #25
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:23:16 UTC) #26
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/0107c327ff297fad57af3e10253b84862df820d1
Cr-Commit-Position: refs/heads/master@{#293062}

Powered by Google App Engine
This is Rietveld 408576698