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

Side by Side Diff: components/metrics/call_stack_profile_collector.cc

Issue 2927593002: Make stack sampling profiler sample beyond startup. (Closed)
Patch Set: Remove debug log statements. Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « components/metrics/BUILD.gn ('k') | components/metrics/call_stack_profile_metrics_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/metrics/call_stack_profile_collector.h" 5 #include "components/metrics/call_stack_profile_collector.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector>
8 9
9 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
10 #include "components/metrics/call_stack_profile_metrics_provider.h" 11 #include "components/metrics/call_stack_profile_metrics_provider.h"
11 #include "mojo/public/cpp/bindings/interface_request.h" 12 #include "mojo/public/cpp/bindings/interface_request.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h" 13 #include "mojo/public/cpp/bindings/strong_binding.h"
13 14
14 namespace metrics { 15 namespace metrics {
15 16
16 CallStackProfileCollector::CallStackProfileCollector( 17 CallStackProfileCollector::CallStackProfileCollector(
17 CallStackProfileParams::Process expected_process) 18 CallStackProfileParams::Process expected_process)
(...skipping 11 matching lines...) Expand all
29 std::move(request)); 30 std::move(request));
30 } 31 }
31 32
32 void CallStackProfileCollector::Collect( 33 void CallStackProfileCollector::Collect(
33 const CallStackProfileParams& params, 34 const CallStackProfileParams& params,
34 base::TimeTicks start_timestamp, 35 base::TimeTicks start_timestamp,
35 std::vector<CallStackProfile> profiles) { 36 std::vector<CallStackProfile> profiles) {
36 if (params.process != expected_process_) 37 if (params.process != expected_process_)
37 return; 38 return;
38 39
40 CallStackProfileParams params_copy = params;
41 params_copy.start_timestamp = start_timestamp;
39 CallStackProfileMetricsProvider::ReceiveCompletedProfiles( 42 CallStackProfileMetricsProvider::ReceiveCompletedProfiles(
40 params, start_timestamp, std::move(profiles)); 43 &params_copy, std::move(profiles));
41 } 44 }
42 45
43 } // namespace metrics 46 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/BUILD.gn ('k') | components/metrics/call_stack_profile_metrics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698