Rename Chrome threads to use a "Cr" prefix.
Before we carefully used the app (Chrome/Chromium) name, but: 1) these are for internal debugging use only, so why compute this name 2) on Linux the thread ids are limited to 16 characters, and "Chromium" is too long Review URL: http://codereview.chromium.org/2741003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49296 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
chrome
browser
gpu
nacl
plugin
profile_import
renderer
service
utility
worker
media/filters
sandbox/src
@@ -823,12 +823,9 @@ int BrowserMain(const MainFunctionParams& parameters) {
|
|||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager hi_res_timer_manager;
|
HighResolutionTimerManager hi_res_timer_manager;
|
||||||
|
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
const char* kThreadName = "CrBrowserMain";
|
||||||
std::string thread_name_string = WideToASCII(app_name + L"_BrowserMain");
|
PlatformThread::SetName(kThreadName);
|
||||||
|
main_message_loop.set_thread_name(kThreadName);
|
||||||
const char* thread_name = thread_name_string.c_str();
|
|
||||||
PlatformThread::SetName(thread_name);
|
|
||||||
main_message_loop.set_thread_name(thread_name);
|
|
||||||
|
|
||||||
// Register the main thread by instantiating it, but don't call any methods.
|
// Register the main thread by instantiating it, but don't call any methods.
|
||||||
ChromeThread main_thread(ChromeThread::UI, MessageLoop::current());
|
ChromeThread main_thread(ChromeThread::UI, MessageLoop::current());
|
||||||
|
@@ -35,8 +35,7 @@ int GpuMain(const MainFunctionParams& parameters) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
|
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrGpuMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_GpuMain").c_str());
|
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
win_util::ScopedCOMInitializer com_initializer;
|
win_util::ScopedCOMInitializer com_initializer;
|
||||||
|
@@ -34,8 +34,7 @@
|
|||||||
int NaClBrokerMain(const MainFunctionParams& parameters) {
|
int NaClBrokerMain(const MainFunctionParams& parameters) {
|
||||||
// The main thread of the broker.
|
// The main thread of the broker.
|
||||||
MessageLoopForIO main_message_loop;
|
MessageLoopForIO main_message_loop;
|
||||||
std::wstring app_name = chrome::kNaClAppName;
|
PlatformThread::SetName("CrNaClBrokerMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_NaClBrokerMain").c_str());
|
|
||||||
|
|
||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager hi_res_timer_manager;
|
HighResolutionTimerManager hi_res_timer_manager;
|
||||||
@@ -122,13 +121,7 @@ int NaClMain(const MainFunctionParams& parameters) {
|
|||||||
|
|
||||||
// The main thread of the plugin services IO.
|
// The main thread of the plugin services IO.
|
||||||
MessageLoopForIO main_message_loop;
|
MessageLoopForIO main_message_loop;
|
||||||
// NaCl code runs in a different binary on Win64.
|
PlatformThread::SetName("CrNaClMain");
|
||||||
#ifdef _WIN64
|
|
||||||
std::wstring app_name = chrome::kNaClAppName;
|
|
||||||
#else
|
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
|
||||||
#endif
|
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_NaClMain").c_str());
|
|
||||||
|
|
||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager hi_res_timer_manager;
|
HighResolutionTimerManager hi_res_timer_manager;
|
||||||
|
@@ -60,8 +60,7 @@ int PluginMain(const MainFunctionParams& parameters) {
|
|||||||
InitializeChromeApplication();
|
InitializeChromeApplication();
|
||||||
#endif
|
#endif
|
||||||
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
|
MessageLoop main_message_loop(MessageLoop::TYPE_UI);
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrPluginMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_PluginMain").c_str());
|
|
||||||
|
|
||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager high_resolution_timer_manager;
|
HighResolutionTimerManager high_resolution_timer_manager;
|
||||||
|
@@ -16,9 +16,7 @@
|
|||||||
int ProfileImportMain(const MainFunctionParams& parameters) {
|
int ProfileImportMain(const MainFunctionParams& parameters) {
|
||||||
// The main message loop of the profile import process.
|
// The main message loop of the profile import process.
|
||||||
MessageLoop main_message_loop;
|
MessageLoop main_message_loop;
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrProfileImportMain");
|
||||||
PlatformThread::SetName(WideToASCII(
|
|
||||||
app_name + L"_ProfileImportMain").c_str());
|
|
||||||
|
|
||||||
ChildProcess profile_import_process;
|
ChildProcess profile_import_process;
|
||||||
profile_import_process.set_main_thread(new ProfileImportThread());
|
profile_import_process.set_main_thread(new ProfileImportThread());
|
||||||
|
@@ -236,8 +236,7 @@ int RendererMain(const MainFunctionParams& parameters) {
|
|||||||
MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT);
|
MessageLoop::TYPE_UI : MessageLoop::TYPE_DEFAULT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrRendererMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_RendererMain").c_str());
|
|
||||||
|
|
||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager hi_res_timer_manager;
|
HighResolutionTimerManager hi_res_timer_manager;
|
||||||
|
@@ -15,8 +15,7 @@
|
|||||||
// Mainline routine for running as the service process.
|
// Mainline routine for running as the service process.
|
||||||
int ServiceProcessMain(const MainFunctionParams& parameters) {
|
int ServiceProcessMain(const MainFunctionParams& parameters) {
|
||||||
MessageLoopForUI main_message_loop;
|
MessageLoopForUI main_message_loop;
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrServiceMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_ServiceMain").c_str());
|
|
||||||
|
|
||||||
ServiceProcess service_process;
|
ServiceProcess service_process;
|
||||||
service_process.Initialize();
|
service_process.Initialize();
|
||||||
|
@@ -25,8 +25,7 @@
|
|||||||
int UtilityMain(const MainFunctionParams& parameters) {
|
int UtilityMain(const MainFunctionParams& parameters) {
|
||||||
// The main message loop of the utility process.
|
// The main message loop of the utility process.
|
||||||
MessageLoop main_message_loop;
|
MessageLoop main_message_loop;
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrUtilityMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_UtilityMain").c_str());
|
|
||||||
|
|
||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager hi_res_timer_manager;
|
HighResolutionTimerManager hi_res_timer_manager;
|
||||||
|
@@ -23,8 +23,7 @@
|
|||||||
int WorkerMain(const MainFunctionParams& parameters) {
|
int WorkerMain(const MainFunctionParams& parameters) {
|
||||||
// The main message loop of the worker process.
|
// The main message loop of the worker process.
|
||||||
MessageLoop main_message_loop;
|
MessageLoop main_message_loop;
|
||||||
std::wstring app_name = chrome::kBrowserAppName;
|
PlatformThread::SetName("CrWorkerMain");
|
||||||
PlatformThread::SetName(WideToASCII(app_name + L"_WorkerMain").c_str());
|
|
||||||
|
|
||||||
SystemMonitor system_monitor;
|
SystemMonitor system_monitor;
|
||||||
HighResolutionTimerManager hi_res_timer_manager;
|
HighResolutionTimerManager hi_res_timer_manager;
|
||||||
|
@@ -213,7 +213,7 @@ bool VideoRendererBase::HasEnded() {
|
|||||||
|
|
||||||
// PlatformThread::Delegate implementation.
|
// PlatformThread::Delegate implementation.
|
||||||
void VideoRendererBase::ThreadMain() {
|
void VideoRendererBase::ThreadMain() {
|
||||||
PlatformThread::SetName("VideoThread");
|
PlatformThread::SetName("CrVideoRenderer");
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// State and playback rate to assume for this iteration of the loop.
|
// State and playback rate to assume for this iteration of the loop.
|
||||||
State state;
|
State state;
|
||||||
|
@@ -138,7 +138,7 @@ DWORD WINAPI BrokerServicesBase::TargetEventsThread(PVOID param) {
|
|||||||
if (NULL == param)
|
if (NULL == param)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
PlatformThread::SetName("BrokerEventThread");
|
PlatformThread::SetName("BrokerEvent");
|
||||||
|
|
||||||
BrokerServicesBase* broker = reinterpret_cast<BrokerServicesBase*>(param);
|
BrokerServicesBase* broker = reinterpret_cast<BrokerServicesBase*>(param);
|
||||||
HANDLE port = broker->job_port_;
|
HANDLE port = broker->job_port_;
|
||||||
|
Reference in New Issue
Block a user