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 2929#include " src/debug.h"
3030#include " src/deoptimizer.h"
3131#include " src/execution.h"
32+ #include " src/gdb-jit.h"
3233#include " src/global-handles.h"
3334#include " src/heap/spaces.h"
3435#include " src/heap-profiler.h"
@@ -7118,10 +7119,16 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
71187119 if (params.entry_hook ) {
71197120 isolate->set_function_entry_hook (params.entry_hook );
71207121 }
7121- if (params.code_event_handler ) {
7122+ auto code_event_handler = params.code_event_handler ;
7123+ #ifdef ENABLE_GDB_JIT_INTERFACE
7124+ if (code_event_handler == nullptr && i::FLAG_gdbjit) {
7125+ code_event_handler = i::GDBJITInterface::EventHandler;
7126+ }
7127+ #endif // ENABLE_GDB_JIT_INTERFACE
7128+ if (code_event_handler) {
71227129 isolate->InitializeLoggingAndCounters ();
71237130 isolate->logger ()->SetCodeEventHandler (kJitCodeEventDefault ,
7124- params. code_event_handler );
7131+ code_event_handler);
71257132 }
71267133 if (params.counter_lookup_callback ) {
71277134 v8_isolate->SetCounterFunction (params.counter_lookup_callback );
Original file line number Diff line number Diff line change 2525#include " include/v8-testing.h"
2626#endif // V8_SHARED
2727
28- #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
29- #include " src/gdb-jit.h"
30- #endif
31-
3228#ifdef ENABLE_VTUNE_JIT_INTERFACE
3329#include " src/third_party/vtune/v8-vtune.h"
3430#endif
@@ -2331,11 +2327,6 @@ int Shell::Main(int argc, char* argv[]) {
23312327 Shell::array_buffer_allocator = &shell_array_buffer_allocator;
23322328 }
23332329 create_params.array_buffer_allocator = Shell::array_buffer_allocator;
2334- #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
2335- if (i::FLAG_gdbjit) {
2336- create_params.code_event_handler = i::GDBJITInterface::EventHandler;
2337- }
2338- #endif
23392330#ifdef ENABLE_VTUNE_JIT_INTERFACE
23402331 create_params.code_event_handler = vTune::GetVtuneCodeEventHandler ();
23412332#endif
You can’t perform that action at this time.
0 commit comments