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 3131#include " src/debug/debug.h"
3232#include " src/deoptimizer.h"
3333#include " src/execution.h"
34+ #include " src/gdb-jit.h"
3435#include " src/global-handles.h"
3536#include " src/heap-profiler.h"
3637#include " src/heap-snapshot-generator-inl.h"
@@ -7102,10 +7103,16 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
71027103 if (params.entry_hook ) {
71037104 isolate->set_function_entry_hook (params.entry_hook );
71047105 }
7105- if (params.code_event_handler ) {
7106+ auto code_event_handler = params.code_event_handler ;
7107+ #ifdef ENABLE_GDB_JIT_INTERFACE
7108+ if (code_event_handler == nullptr && i::FLAG_gdbjit) {
7109+ code_event_handler = i::GDBJITInterface::EventHandler;
7110+ }
7111+ #endif // ENABLE_GDB_JIT_INTERFACE
7112+ if (code_event_handler) {
71067113 isolate->InitializeLoggingAndCounters ();
71077114 isolate->logger ()->SetCodeEventHandler (kJitCodeEventDefault ,
7108- params. code_event_handler );
7115+ code_event_handler);
71097116 }
71107117 if (params.counter_lookup_callback ) {
71117118 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
@@ -2389,11 +2385,6 @@ int Shell::Main(int argc, char* argv[]) {
23892385 Shell::array_buffer_allocator = &shell_array_buffer_allocator;
23902386 }
23912387 create_params.array_buffer_allocator = Shell::array_buffer_allocator;
2392- #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
2393- if (i::FLAG_gdbjit) {
2394- create_params.code_event_handler = i::GDBJITInterface::EventHandler;
2395- }
2396- #endif
23972388#ifdef ENABLE_VTUNE_JIT_INTERFACE
23982389 create_params.code_event_handler = vTune::GetVtuneCodeEventHandler ();
23992390#endif
You can’t perform that action at this time.
0 commit comments