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

Issue 1828293002: Rewrite Java histograms API implementation. (Closed)

Created:
4 years, 9 months ago by Alexei Svitkine (slow)
Modified:
4 years, 8 months ago
Reviewers:
nyquist
CC:
chromium-reviews, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Rewrite Java histograms API implementation. The previous version used System.identityHashCode() as a key to cache histogram objects - but we've found that this is not safe to do because there may be collisions. Instead, this CL changes the code to do the caching on the Java side, keeping pointers to the C++ Histogram objects in the cache. This is safe to do because histogram objects are never freed, so the pointers are guaranteed to stay valid. BUG=535043 Committed: https://crrev.com/0f5bc5e0075fb1d3ca46bb109d6e4799b7b165e5 Cr-Commit-Position: refs/heads/master@{#385310}

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -115 lines) Patch
M base/android/java/src/org/chromium/base/metrics/RecordHistogram.java View 1 11 chunks +52 lines, -22 lines 0 comments Download
M base/android/record_histogram.cc View 1 7 chunks +84 lines, -93 lines 0 comments Download

Messages

Total messages: 26 (16 generated)
Alexei Svitkine (slow)
4 years, 8 months ago (2016-03-30 21:46:44 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828293002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828293002/180001
4 years, 8 months ago (2016-03-30 21:51:05 UTC) #14
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-03-30 23:02:34 UTC) #16
Alexei Svitkine (slow)
Friendly ping! For context, see the bug - the current implementation is not correct per ...
4 years, 8 months ago (2016-03-31 22:27:08 UTC) #17
nyquist
thanks for writing a very thorough and explanatory CL description. https://codereview.chromium.org/1828293002/diff/180001/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java File base/android/java/src/org/chromium/base/metrics/RecordHistogram.java (right): https://codereview.chromium.org/1828293002/diff/180001/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java#newcode36 ...
4 years, 8 months ago (2016-04-01 21:37:14 UTC) #18
Alexei Svitkine (slow)
Comments addressed. PTAL. https://codereview.chromium.org/1828293002/diff/180001/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java File base/android/java/src/org/chromium/base/metrics/RecordHistogram.java (right): https://codereview.chromium.org/1828293002/diff/180001/base/android/java/src/org/chromium/base/metrics/RecordHistogram.java#newcode36 base/android/java/src/org/chromium/base/metrics/RecordHistogram.java:36: private static long getCachedHistogramKey(String name) { ...
4 years, 8 months ago (2016-04-04 15:08:09 UTC) #19
nyquist
lgtm
4 years, 8 months ago (2016-04-05 21:25:21 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1828293002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1828293002/200001
4 years, 8 months ago (2016-04-05 21:27:17 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:200001)
4 years, 8 months ago (2016-04-05 22:43:39 UTC) #24
commit-bot: I haz the power
4 years, 8 months ago (2016-04-05 22:44:39 UTC) #26
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0f5bc5e0075fb1d3ca46bb109d6e4799b7b165e5
Cr-Commit-Position: refs/heads/master@{#385310}

Powered by Google App Engine
This is Rietveld 408576698