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

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: Address comments on PS1 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..f81a9fa7053a6952bf5a97787c6494d7baef22f1 100644
--- a/chrome/browser/metrics/perf/perf_provider_chromeos.h
+++ b/chrome/browser/metrics/perf/perf_provider_chromeos.h
@@ -132,6 +132,13 @@ class PerfProvider : public base::NonThreadSafe,
const std::vector<uint8>& perf_data,
const std::vector<uint8>& perf_stat);
+ const CollectionParams& collection_params() const {
+ return collection_params_;
+ }
+ const RandomSelector& command_selector() const {
+ return command_selector_;
+ }
+
private:
static const CollectionParams kDefaultParameters;
@@ -151,6 +158,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);
+
// 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 +251,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