Reviewers: jochen, danno,
Message:
hello, Daniel & Jochen.
PTAL.
thanks.
Description:
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 if this patch is landed and Chromium
updates
V8 to the
new release branch.
BUG=
Please review this at https://codereview.chromium.org/655183002/
Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Affected files (+7, -6 lines):
M src/d8.cc
M src/third_party/vtune/v8-vtune.h
M src/third_party/vtune/vtune-jit.cc
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
a36ec5e527237a2c36350f226c67afdcecff6ce5..bf27d6939bdb1cf6bd32db21eb649698d8e13c10
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1641,9 +1641,6 @@ int Shell::Main(int argc, char* argv[]) {
create_params.code_event_handler = i::GDBJITInterface::EventHandler;
}
#endif
-#ifdef ENABLE_VTUNE_JIT_INTERFACE
- vTune::InitializeVtuneForV8(create_params);
-#endif
#ifndef V8_SHARED
create_params.constraints.ConfigureDefaults(
base::SysInfo::AmountOfPhysicalMemory(),
@@ -1651,6 +1648,9 @@ int Shell::Main(int argc, char* argv[]) {
base::SysInfo::NumberOfProcessors());
#endif
Isolate* isolate = Isolate::New(create_params);
+#ifdef ENABLE_VTUNE_JIT_INTERFACE
+ vTune::InitializeVtuneForV8(isolate);
+#endif
DumbLineEditor dumb_line_editor(isolate);
{
Isolate::Scope scope(isolate);
Index: src/third_party/vtune/v8-vtune.h
diff --git a/src/third_party/vtune/v8-vtune.h
b/src/third_party/vtune/v8-vtune.h
index
a7e51166046cd9bcf9bd03a66f209e15df72e87a..760c9f2f677afb13f4e6b184cf436736b7734920
100644
--- a/src/third_party/vtune/v8-vtune.h
+++ b/src/third_party/vtune/v8-vtune.h
@@ -62,7 +62,7 @@
namespace vTune {
-void InitializeVtuneForV8(v8::Isolate::CreateParams& params);
+void InitializeVtuneForV8(v8::Isolate* isolate);
} // namespace vTune
Index: src/third_party/vtune/vtune-jit.cc
diff --git a/src/third_party/vtune/vtune-jit.cc
b/src/third_party/vtune/vtune-jit.cc
index
e489d6e21537945504276dd9cb533c588f0db541..28fecbea6a0680fd910dc7fe1cc8e47e4d3a7848
100644
--- a/src/third_party/vtune/vtune-jit.cc
+++ b/src/third_party/vtune/vtune-jit.cc
@@ -271,10 +271,11 @@ void VTUNEJITInterface::event_handler(const
v8::JitCodeEvent* event) {
} // namespace internal
-void InitializeVtuneForV8(v8::Isolate::CreateParams& params) {
+void InitializeVtuneForV8(v8::Isolate* isolate) {
v8::V8::SetFlagsFromString("--nocompact_code_space",
(int)strlen("--nocompact_code_space"));
- params.code_event_handler =
vTune::internal::VTUNEJITInterface::event_handler;
+ isolate->SetJitCodeEventHandler(v8::kJitCodeEventDefault,
+ 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.