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

Unified Diff: components/metrics/call_stack_profile_collector.cc

Issue 2362493002: Stack sampling profiler: set process and thread information (Closed)
Patch Set: address comments Created 4 years, 3 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: components/metrics/call_stack_profile_collector.cc
diff --git a/components/metrics/call_stack_profile_collector.cc b/components/metrics/call_stack_profile_collector.cc
index 8a7a68b9eae367a2adfaf385a26853245ec4610c..cbf466f859a413086348874383abd96fe6d85c62 100644
--- a/components/metrics/call_stack_profile_collector.cc
+++ b/components/metrics/call_stack_profile_collector.cc
@@ -11,21 +11,28 @@
namespace metrics {
-CallStackProfileCollector::CallStackProfileCollector() {}
+CallStackProfileCollector::CallStackProfileCollector(
+ CallStackProfileParams::Process expected_process)
+ : expected_process_(expected_process) {}
CallStackProfileCollector::~CallStackProfileCollector() {}
// static
void CallStackProfileCollector::Create(
+ CallStackProfileParams::Process expected_process,
mojom::CallStackProfileCollectorRequest request) {
- mojo::MakeStrongBinding(base::MakeUnique<CallStackProfileCollector>(),
- std::move(request));
+ mojo::MakeStrongBinding(
+ base::MakeUnique<CallStackProfileCollector>(expected_process),
+ std::move(request));
}
void CallStackProfileCollector::Collect(
const CallStackProfileParams& params,
base::TimeTicks start_timestamp,
const std::vector<CallStackProfile>& profiles) {
+ if (params.process != expected_process_)
+ return;
+
CallStackProfileMetricsProvider::ReceiveCompletedProfiles(params,
start_timestamp,
profiles);
« no previous file with comments | « components/metrics/call_stack_profile_collector.h ('k') | components/metrics/call_stack_profile_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698