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 29
29
#include " src/debug.h"
30
30
#include " src/deoptimizer.h"
31
31
#include " src/execution.h"
32
+ #include " src/gdb-jit.h"
32
33
#include " src/global-handles.h"
33
34
#include " src/heap/spaces.h"
34
35
#include " src/heap-profiler.h"
@@ -7118,10 +7119,16 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
7118
7119
if (params.entry_hook ) {
7119
7120
isolate->set_function_entry_hook (params.entry_hook );
7120
7121
}
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) {
7122
7129
isolate->InitializeLoggingAndCounters ();
7123
7130
isolate->logger ()->SetCodeEventHandler (kJitCodeEventDefault ,
7124
- params. code_event_handler );
7131
+ code_event_handler);
7125
7132
}
7126
7133
if (params.counter_lookup_callback ) {
7127
7134
v8_isolate->SetCounterFunction (params.counter_lookup_callback );
Original file line number Diff line number Diff line change 25
25
#include " include/v8-testing.h"
26
26
#endif // V8_SHARED
27
27
28
- #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
29
- #include " src/gdb-jit.h"
30
- #endif
31
-
32
28
#ifdef ENABLE_VTUNE_JIT_INTERFACE
33
29
#include " src/third_party/vtune/v8-vtune.h"
34
30
#endif
@@ -2331,11 +2327,6 @@ int Shell::Main(int argc, char* argv[]) {
2331
2327
Shell::array_buffer_allocator = &shell_array_buffer_allocator;
2332
2328
}
2333
2329
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
2339
2330
#ifdef ENABLE_VTUNE_JIT_INTERFACE
2340
2331
create_params.code_event_handler = vTune::GetVtuneCodeEventHandler ();
2341
2332
#endif
You can’t perform that action at this time.
0 commit comments