Commit 7a70d6a0 authored by jochen@chromium.org's avatar jochen@chromium.org

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 denis.pravdin@intel.com.

BUG=
R=danno@chromium.org, jochen@chromium.org

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8de3b7e1
......@@ -1686,7 +1686,7 @@ int Shell::Main(int argc, char* argv[]) {
}
#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(
......
......@@ -62,7 +62,7 @@
namespace vTune {
void InitializeVtuneForV8(v8::Isolate::CreateParams& params);
v8::JitCodeEventHandler GetVtuneCodeEventHandler();
} // namespace vTune
......
......@@ -271,10 +271,10 @@ void VTUNEJITInterface::event_handler(const v8::JitCodeEvent* event) {
} // 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment