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

Unified Diff: src/heap/object-stats.h

Issue 2181373002: [heap] ObjectStats: Fix off-by-one in histogram (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/object-stats.h
diff --git a/src/heap/object-stats.h b/src/heap/object-stats.h
index 345c6bd140ccd12d15de6e34b3e383c6a91e00e4..4e0aec7edeac9ed9d693f702f1e0bebc745881e3 100644
--- a/src/heap/object-stats.h
+++ b/src/heap/object-stats.h
@@ -94,7 +94,7 @@ class ObjectStats {
static const int kLastBucketShift = 19; // >512k
static const int kFirstBucket = 1 << kFirstBucketShift;
static const int kLastBucket = 1 << kLastBucketShift;
- static const int kNumberOfBuckets = kLastBucketShift - kFirstBucketShift;
+ static const int kNumberOfBuckets = kLastBucketShift - kFirstBucketShift + 1;
int HistogramIndexFromSize(size_t size) {
if (size == 0) return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698