Revision: 24811
Author:   [email protected]
Date:     Wed Oct 22 15:30:50 2014 UTC
Log:      Update intialization of vtune support.

In R23940 (https://code.google.com/p/v8/source/detail?r=23940) it introduces Isolate::CreateParams and mentions that V8::SetJitCodeEventHandler should either
 be passed to Isolate::New as well, or invoked via the Isolate.

When Chrome as embedder of V8, we will set the Jit Code event handler for Vtune support during the initialization of renderer process and V8 has be initialized at that time. It's better that we invoke V8::SetJitCodeEventHander via the Isolate. So we change the vTune::InitializeVtuneForV8(v8::Isolate::CreateParams& params) to
 vTune::InitializeVtuneForV8(v8::Isolate* isolate).

we will do corresponding changes in chromium code if this patch is landed and Chromium
 updates V8 to the
 new release branch.

 some part of this patch is provided by [email protected].

BUG=
[email protected], [email protected]

Review URL: https://codereview.chromium.org/655183002

Patch from Chunyang Dai <[email protected]>.
https://code.google.com/p/v8/source/detail?r=24811

Modified:
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/third_party/vtune/v8-vtune.h
 /branches/bleeding_edge/src/third_party/vtune/vtune-jit.cc

=======================================
--- /branches/bleeding_edge/src/d8.cc   Tue Oct 21 10:59:41 2014 UTC
+++ /branches/bleeding_edge/src/d8.cc   Wed Oct 22 15:30:50 2014 UTC
@@ -1686,7 +1686,7 @@
   }
 #endif
 #ifdef ENABLE_VTUNE_JIT_INTERFACE
-  vTune::InitializeVtuneForV8(create_params);
+  create_params.code_event_handler = vTune::GetVtuneCodeEventHandler();
 #endif
 #ifndef V8_SHARED
   create_params.constraints.ConfigureDefaults(
=======================================
--- /branches/bleeding_edge/src/third_party/vtune/v8-vtune.h Mon Sep 15 11:17:00 2014 UTC +++ /branches/bleeding_edge/src/third_party/vtune/v8-vtune.h Wed Oct 22 15:30:50 2014 UTC
@@ -62,7 +62,7 @@

 namespace vTune {

-void InitializeVtuneForV8(v8::Isolate::CreateParams& params);
+v8::JitCodeEventHandler GetVtuneCodeEventHandler();

 }  // namespace vTune

=======================================
--- /branches/bleeding_edge/src/third_party/vtune/vtune-jit.cc Mon Sep 15 11:17:00 2014 UTC +++ /branches/bleeding_edge/src/third_party/vtune/vtune-jit.cc Wed Oct 22 15:30:50 2014 UTC
@@ -271,10 +271,10 @@

 }  // namespace internal

-void InitializeVtuneForV8(v8::Isolate::CreateParams& params) {
+v8::JitCodeEventHandler GetVtuneCodeEventHandler() {
   v8::V8::SetFlagsFromString("--nocompact_code_space",
                              (int)strlen("--nocompact_code_space"));
- params.code_event_handler = vTune::internal::VTUNEJITInterface::event_handler;
+  return vTune::internal::VTUNEJITInterface::event_handler;
 }

 }  // namespace vTune

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to