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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 666023003: update the vtune support code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
« no previous file with comments | « no previous file | content/renderer/renderer_main_platform_delegate_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index a03732c1295e8d36cfb91a3965cf49941dc08638..3e422031b5d329a33646975b044e29c49c173e07 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -100,6 +100,7 @@
#include "content/renderer/service_worker/embedded_worker_context_message_filter.h"
#include "content/renderer/service_worker/embedded_worker_dispatcher.h"
#include "content/renderer/shared_worker/embedded_shared_worker_stub.h"
+#include "gin/public/debug.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_platform_file.h"
#include "ipc/mojo/ipc_channel_mojo.h"
@@ -162,6 +163,10 @@
#include "content/renderer/media/webrtc_identity_service.h"
#endif
+#ifdef ENABLE_VTUNE_JIT_INTERFACE
+#include "v8/src/third_party/vtune/v8-vtune.h"
+#endif
+
using base::ThreadRestrictions;
using blink::WebDocument;
using blink::WebFrame;
@@ -863,6 +868,13 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
if (blink_platform_impl_)
return;
+const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+#ifdef ENABLE_VTUNE_JIT_INTERFACE
+ if (command_line.HasSwitch(switches::kEnableVtune))
+ gin::Debug::SetJitCodeEventHandler(vTune::GetVtuneCodeEventHandler());
+#endif
+
blink_platform_impl_.reset(
new RendererBlinkPlatformImpl(renderer_scheduler_.get()));
blink::initialize(blink_platform_impl_.get());
@@ -873,8 +885,6 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
isolate->SetCreateHistogramFunction(CreateHistogram);
isolate->SetAddHistogramSampleFunction(AddHistogramSample);
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
-
main_thread_compositor_task_runner_ =
renderer_scheduler()->CompositorTaskRunner();
« no previous file with comments | « no previous file | content/renderer/renderer_main_platform_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698