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

Unified Diff: base/metrics/field_trial.cc

Issue 2490513004: Bump field trial allocator size to 64kb and report usage (Closed)
Patch Set: Bump field trial allocator size and report usage Created 4 years, 1 month 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: base/metrics/field_trial.cc
diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc
index 63f549e5729d69b3587de96dbef7ad61764bac26..4eae0421936b1ed795290dcd967be8faeba3992d 100644
--- a/base/metrics/field_trial.cc
+++ b/base/metrics/field_trial.cc
@@ -43,9 +43,7 @@ const bool kUseSharedMemoryForFieldTrials = false;
// Constants for the field trial allocator.
const char kAllocatorName[] = "FieldTrialAllocator";
const uint32_t kFieldTrialType = 0xABA17E13 + 1; // SHA1(FieldTrialEntry) v1
-#if !defined(OS_NACL)
-const size_t kFieldTrialAllocationSize = 4 << 10; // 4 KiB = one page
-#endif
+const size_t kFieldTrialAllocationSize = 4 << 14; // 64 KiB should be enough
Alexei Svitkine (slow) 2016/11/08 18:15:23 The "should be enough" comment is not useful. I
// We create one FieldTrialEntry per field trial in shared memory, via
// AddToAllocatorWhileLocked. The FieldTrialEntry is followed by a base::Pickle
@@ -728,8 +726,8 @@ void FieldTrialList::CopyFieldTrialStateToFlags(
std::to_string(field_trial_length);
cmd_line->AppendSwitchASCII(field_trial_handle_switch, field_trial_handle);
- UMA_HISTOGRAM_COUNTS_10000("UMA.FieldTrialAllocator.Size",
Alexei Svitkine (slow) 2016/11/08 18:15:23 Changing the macro without changing histogram name
Alexei Svitkine (slow) 2016/11/08 18:18:38 For the rename, you can use "2" suffix to the name
- field_trial_length);
+ UMA_HISTOGRAM_COUNTS_100000("UMA.FieldTrialAllocator.Size",
+ global_->field_trial_allocator_->used());
return;
}
#endif
« 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