File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 3434#include  " src/debug/debug.h" 
3535#include  " src/deoptimizer.h" 
3636#include  " src/execution.h" 
37+ #include  " src/gdb-jit.h" 
3738#include  " src/global-handles.h" 
3839#include  " src/icu_util.h" 
3940#include  " src/isolate-inl.h" 
@@ -7158,10 +7159,16 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
71587159  if  (params.entry_hook ) {
71597160    isolate->set_function_entry_hook (params.entry_hook );
71607161  }
7161-   if  (params.code_event_handler ) {
7162+   auto  code_event_handler = params.code_event_handler ;
7163+ #ifdef  ENABLE_GDB_JIT_INTERFACE
7164+   if  (code_event_handler == nullptr  && i::FLAG_gdbjit) {
7165+     code_event_handler = i::GDBJITInterface::EventHandler;
7166+   }
7167+ #endif   //  ENABLE_GDB_JIT_INTERFACE
7168+   if  (code_event_handler) {
71627169    isolate->InitializeLoggingAndCounters ();
71637170    isolate->logger ()->SetCodeEventHandler (kJitCodeEventDefault ,
7164-                                            params. code_event_handler );
7171+                                            code_event_handler);
71657172  }
71667173  if  (params.counter_lookup_callback ) {
71677174    v8_isolate->SetCounterFunction (params.counter_lookup_callback );
Original file line number Diff line number Diff line change 2626#include  " include/v8-testing.h" 
2727#endif   //  V8_SHARED
2828
29- #if  !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
30- #include  " src/gdb-jit.h" 
31- #endif 
32- 
3329#ifdef  ENABLE_VTUNE_JIT_INTERFACE
3430#include  " src/third_party/vtune/v8-vtune.h" 
3531#endif 
@@ -2459,11 +2455,6 @@ int Shell::Main(int argc, char* argv[]) {
24592455    Shell::array_buffer_allocator = &shell_array_buffer_allocator;
24602456  }
24612457  create_params.array_buffer_allocator  = Shell::array_buffer_allocator;
2462- #if  !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
2463-   if  (i::FLAG_gdbjit) {
2464-     create_params.code_event_handler  = i::GDBJITInterface::EventHandler;
2465-   }
2466- #endif 
24672458#ifdef  ENABLE_VTUNE_JIT_INTERFACE
24682459  create_params.code_event_handler  = vTune::GetVtuneCodeEventHandler ();
24692460#endif 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments