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

Unified Diff: chrome/browser/metrics/perf/perf_provider_chromeos.h

Issue 1392153003: PerfProvider: Get collection parameters from Finch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@perf_commands
Patch Set: Created 5 years, 2 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
Index: chrome/browser/metrics/perf/perf_provider_chromeos.h
diff --git a/chrome/browser/metrics/perf/perf_provider_chromeos.h b/chrome/browser/metrics/perf/perf_provider_chromeos.h
index 708ef4c971e9582570cbc9deb09c65717e8cc7b9..880a565cd14368e6fea582b1bdb89fee9e3ebf8e 100644
--- a/chrome/browser/metrics/perf/perf_provider_chromeos.h
+++ b/chrome/browser/metrics/perf/perf_provider_chromeos.h
@@ -132,6 +132,9 @@ class PerfProvider : public base::NonThreadSafe,
const std::vector<uint8>& perf_data,
const std::vector<uint8>& perf_stat);
+ const CollectionParams& collection_params() { return collection_params_; }
Alexei Svitkine (slow) 2015/10/16 15:37:50 Nit: Mark the method const as well. Same below.
dhsharp 2015/10/19 22:45:28 Done.
+ const RandomSelector& command_selector() { return command_selector_; }
+
private:
static const CollectionParams kDefaultParameters;
@@ -151,6 +154,11 @@ class PerfProvider : public base::NonThreadSafe,
PerfProvider* perf_provider_;
};
+ // Change the values in |collection_params_| and the commands in
+ // |command_selector_| for any keys that are present in |params|.
+ void SetCollectionParamsFromVariationParams(
+ const std::map<std::string, std::string> &params);
Alexei Svitkine (slow) 2015/10/16 15:37:50 Nit: indent 2 more - or maybe just run "git cl for
dhsharp 2015/10/19 22:45:28 Done.
+
// Called when a suspend finishes. This is either a successful suspend
// followed by a resume, or a suspend that was canceled. Inherited from
// PowerManagerClient::Observer.
@@ -239,6 +247,15 @@ namespace internal {
std::vector<RandomSelector::WeightAndValue> GetDefaultCommandsForCpu(
const CPUIdentity& cpuid);
+// For the "PerfCommand::"-prefixed keys in |params|, return the cpu specifier
+// that is the narrowest match for the CPU identified by |cpuid|.
+// Valid CPU specifiers, in increasing order of specificity, are:
+// "default", a system architecture (e.g. "x86_64"), a CPU microarchitecture
+// (currently only Intel uarchs supported), or a CPU model name substring.
+std::string FindBestCpuSpecifierFromParams(
+ const std::map<std::string, std::string>& params,
+ const CPUIdentity& cpuid);
+
} // namespace internal
} // namespace metrics

Powered by Google App Engine
This is Rietveld 408576698