Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec18131

Browse filesBrowse files
bnoordhuisevanlucas
authored andcommitted
deps: backport 8d00c2c from v8 upstream
Original commit message: Unbreak --gdbjit for embedders. Embedders don't use d8.cc. Move gdbjit initialization to api.cc. Review URL: https://codereview.chromium.org/1710253002 Fixes: #2076 PR-URL: #5577 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
1 parent 660ec9f commit ec18131
Copy full SHA for ec18131

File tree

Expand file treeCollapse file tree

2 files changed

+9
-11
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-11
lines changed
Open diff view settings
Collapse file

‎deps/v8/src/api.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/api.cc
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
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);
Collapse file

‎deps/v8/src/d8.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/d8.cc
-9Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.