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 31
31
#include " src/debug/debug.h"
32
32
#include " src/deoptimizer.h"
33
33
#include " src/execution.h"
34
+ #include " src/gdb-jit.h"
34
35
#include " src/global-handles.h"
35
36
#include " src/heap-profiler.h"
36
37
#include " src/heap-snapshot-generator-inl.h"
@@ -7102,10 +7103,16 @@ Isolate* Isolate::New(const Isolate::CreateParams& params) {
7102
7103
if (params.entry_hook ) {
7103
7104
isolate->set_function_entry_hook (params.entry_hook );
7104
7105
}
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) {
7106
7113
isolate->InitializeLoggingAndCounters ();
7107
7114
isolate->logger ()->SetCodeEventHandler (kJitCodeEventDefault ,
7108
- params. code_event_handler );
7115
+ code_event_handler);
7109
7116
}
7110
7117
if (params.counter_lookup_callback ) {
7111
7118
v8_isolate->SetCounterFunction (params.counter_lookup_callback );
Original file line number Diff line number Diff line change 26
26
#include " include/v8-testing.h"
27
27
#endif // V8_SHARED
28
28
29
- #if !defined(V8_SHARED) && defined(ENABLE_GDB_JIT_INTERFACE)
30
- #include " src/gdb-jit.h"
31
- #endif
32
-
33
29
#ifdef ENABLE_VTUNE_JIT_INTERFACE
34
30
#include " src/third_party/vtune/v8-vtune.h"
35
31
#endif
@@ -2389,11 +2385,6 @@ int Shell::Main(int argc, char* argv[]) {
2389
2385
Shell::array_buffer_allocator = &shell_array_buffer_allocator;
2390
2386
}
2391
2387
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
2397
2388
#ifdef ENABLE_VTUNE_JIT_INTERFACE
2398
2389
create_params.code_event_handler = vTune::GetVtuneCodeEventHandler ();
2399
2390
#endif
You can’t perform that action at this time.
0 commit comments