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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 2841273002: Add UMA histograms for GPU driver bug workaround entries. (Closed)
Patch Set: fix nits Created 3 years, 7 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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 3a1da35e23a274e8097871dda88ddbbac93f573c..4169695b6bda442310280082f710b588d41bcbc2 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -209,6 +209,30 @@ void UpdateStats(const gpu::GPUInfo& gpu_info,
}
}
+void UpdateDriverBugListStats(const gpu::GpuDriverBugList* bug_list,
+ const std::set<int>& workarounds) {
+ uint32_t max_entry_id = bug_list->max_entry_id();
+ if (max_entry_id == 0) {
+ // Driver bug list was not loaded. No need to go further.
+ return;
+ }
+
+ // Use entry 0 to capture the total number of times that data was recorded
+ // in this histogram in order to have a convenient denominator to compute
+ // driver bug list percentages for the rest of the entries.
+ UMA_HISTOGRAM_SPARSE_SLOWLY("GPU.DriverBugTestResultsPerEntry", 0);
+
+ if (workarounds.size() != 0) {
+ std::vector<uint32_t> flag_entries;
+ bug_list->GetDecisionEntries(&flag_entries);
Ilya Sherman 2017/05/04 21:17:38 It's not entirely clear to me: Are the ids used in
+ DCHECK_GT(flag_entries.size(), 0u);
+ for (size_t i = 0; i < flag_entries.size(); ++i) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("GPU.DriverBugTestResultsPerEntry",
+ flag_entries[i]);
+ }
+ }
+}
+
// Combine the integers into a string, seperated by ','.
std::string IntSetToString(const std::set<int>& list) {
std::string rt;
@@ -685,6 +709,7 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
disabled_driver_bug_exts = gpu_driver_bug_list_->GetDisabledExtensions();
disabled_ext_set.insert(disabled_driver_bug_exts.begin(),
disabled_driver_bug_exts.end());
+ UpdateDriverBugListStats(gpu_driver_bug_list_.get(), gpu_driver_bugs_);
}
disabled_extensions_ =
base::JoinString(std::vector<base::StringPiece>(disabled_ext_set.begin(),
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698