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

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 1643533006: Use a single, generic, global zygote to temporarily resolve perf regressions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused ppapi header Created 4 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 #elif defined(OS_MACOSX) && !defined(OS_IOS) 149 #elif defined(OS_MACOSX) && !defined(OS_IOS)
150 #include "content/browser/device_monitor_mac.h" 150 #include "content/browser/device_monitor_mac.h"
151 #endif 151 #endif
152 152
153 #if defined(OS_POSIX) && !defined(OS_MACOSX) 153 #if defined(OS_POSIX) && !defined(OS_MACOSX)
154 #include "content/browser/renderer_host/render_sandbox_host_linux.h" 154 #include "content/browser/renderer_host/render_sandbox_host_linux.h"
155 #include "content/browser/zygote_host/zygote_host_impl_linux.h" 155 #include "content/browser/zygote_host/zygote_host_impl_linux.h"
156 #include "sandbox/linux/suid/client/setuid_sandbox_host.h" 156 #include "sandbox/linux/suid/client/setuid_sandbox_host.h"
157 157
158 #if !defined(OS_ANDROID) 158 #if !defined(OS_ANDROID)
159 #include "content/browser/ppapi_plugin_process_host.h" 159 #include "content/public/browser/zygote_handle_linux.h"
160 #endif 160 #endif // !defined(OS_ANDROID)
161 #endif 161 #endif // defined(OS_POSIX) && !defined(OS_MACOSX)
162
162 163
163 #if defined(ENABLE_PLUGINS) 164 #if defined(ENABLE_PLUGINS)
164 #include "content/browser/plugin_service_impl.h" 165 #include "content/browser/plugin_service_impl.h"
165 #endif 166 #endif
166 167
167 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED) 168 #if defined(TCMALLOC_TRACE_MEMORY_SUPPORTED)
168 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" 169 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
169 #endif 170 #endif
170 171
171 #if defined(USE_X11) 172 #if defined(USE_X11)
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // otherwise. 221 // otherwise.
221 LOG(FATAL) << no_suid_error; 222 LOG(FATAL) << no_suid_error;
222 } 223 }
223 } else { 224 } else {
224 LOG(ERROR) << no_suid_error; 225 LOG(ERROR) << no_suid_error;
225 } 226 }
226 227
227 // Tickle the sandbox host and zygote host so they fork now. 228 // Tickle the sandbox host and zygote host so they fork now.
228 RenderSandboxHostLinux::GetInstance()->Init(); 229 RenderSandboxHostLinux::GetInstance()->Init();
229 ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value()); 230 ZygoteHostImpl::GetInstance()->Init(sandbox_binary.value());
231 *GetGenericZygote() = CreateZygote();
230 RenderProcessHostImpl::EarlyZygoteLaunch(); 232 RenderProcessHostImpl::EarlyZygoteLaunch();
231 PpapiPluginProcessHost::EarlyZygoteLaunch();
232 UtilityProcessHostImpl::EarlyZygoteLaunch();
233 } 233 }
234 #endif 234 #endif
235 235
236 #if defined(USE_GLIB) 236 #if defined(USE_GLIB)
237 static void GLibLogHandler(const gchar* log_domain, 237 static void GLibLogHandler(const gchar* log_domain,
238 GLogLevelFlags log_level, 238 GLogLevelFlags log_level,
239 const gchar* message, 239 const gchar* message,
240 gpointer userdata) { 240 gpointer userdata) {
241 if (!log_domain) 241 if (!log_domain)
242 log_domain = "<unknown>"; 242 log_domain = "<unknown>";
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 DCHECK(is_tracing_startup_for_duration_); 1468 DCHECK(is_tracing_startup_for_duration_);
1469 1469
1470 is_tracing_startup_for_duration_ = false; 1470 is_tracing_startup_for_duration_ = false;
1471 TracingController::GetInstance()->StopTracing( 1471 TracingController::GetInstance()->StopTracing(
1472 TracingController::CreateFileSink( 1472 TracingController::CreateFileSink(
1473 startup_trace_file_, 1473 startup_trace_file_,
1474 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1474 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1475 } 1475 }
1476 1476
1477 } // namespace content 1477 } // namespace content
OLDNEW
« no previous file with comments | « components/nacl/browser/nacl_process_host.cc ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698