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

Side by Side Diff: chrome/gpu/chrome_content_gpu_client.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 unified diff | Download patch
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 "chrome/gpu/chrome_content_gpu_client.h" 5 #include "chrome/gpu/chrome_content_gpu_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 g_call_stack_profile_collector = LAZY_INSTANCE_INITIALIZER; 54 g_call_stack_profile_collector = LAZY_INSTANCE_INITIALIZER;
55 55
56 } // namespace 56 } // namespace
57 57
58 ChromeContentGpuClient::ChromeContentGpuClient() 58 ChromeContentGpuClient::ChromeContentGpuClient()
59 : stack_sampling_profiler_( 59 : stack_sampling_profiler_(
60 base::PlatformThread::CurrentId(), 60 base::PlatformThread::CurrentId(),
61 GetStartupSamplingParams(), 61 GetStartupSamplingParams(),
62 g_call_stack_profile_collector.Get().GetProfilerCallback( 62 g_call_stack_profile_collector.Get().GetProfilerCallback(
63 metrics::CallStackProfileParams( 63 metrics::CallStackProfileParams(
64 metrics::CallStackProfileParams::GPU_PROCESS,
65 metrics::CallStackProfileParams::GPU_MAIN_THREAD,
64 metrics::CallStackProfileParams::PROCESS_STARTUP, 66 metrics::CallStackProfileParams::PROCESS_STARTUP,
65 metrics::CallStackProfileParams::MAY_SHUFFLE))) { 67 metrics::CallStackProfileParams::MAY_SHUFFLE))) {
66 } 68 }
67 69
68 ChromeContentGpuClient::~ChromeContentGpuClient() {} 70 ChromeContentGpuClient::~ChromeContentGpuClient() {}
69 71
70 void ChromeContentGpuClient::Initialize( 72 void ChromeContentGpuClient::Initialize(
71 base::FieldTrialList::Observer* observer) { 73 base::FieldTrialList::Observer* observer) {
72 DCHECK(!field_trial_syncer_); 74 DCHECK(!field_trial_syncer_);
73 field_trial_syncer_.reset( 75 field_trial_syncer_.reset(
(...skipping 14 matching lines...) Expand all
88 #endif 90 #endif
89 } 91 }
90 92
91 void ChromeContentGpuClient::ConsumeInterfacesFromBrowser( 93 void ChromeContentGpuClient::ConsumeInterfacesFromBrowser(
92 shell::InterfaceProvider* provider) { 94 shell::InterfaceProvider* provider) {
93 metrics::mojom::CallStackProfileCollectorPtr browser_interface; 95 metrics::mojom::CallStackProfileCollectorPtr browser_interface;
94 provider->GetInterface(&browser_interface); 96 provider->GetInterface(&browser_interface);
95 g_call_stack_profile_collector.Get().SetParentProfileCollector( 97 g_call_stack_profile_collector.Get().SetParentProfileCollector(
96 std::move(browser_interface)); 98 std::move(browser_interface));
97 } 99 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/thread_watcher_unittest.cc ('k') | components/metrics/call_stack_profile_collector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698