You are right the arm/arm64 gdb-jit support is not complete, so it is more
a feature request. I am happy to help with review if you submit a patch.

Cheers,
Rodolph.

On Wed, 12 Dec 2018 at 21:36, <[email protected]> wrote:

> Thanks Rodolph. When I try to build with v8_enable_gdbjit=true,
> unfortunately, I run into compilation errors of gdb-jit for ARM64. Snippet
> below shows the way try to build. It shows that I am using 7.1.1 - however,
> it's the same problem with tip/master as well. Should I open a bug for this
> one?
>
> cc01:v8:[7.1.1]>gn gen --args="target_cpu=\"arm64\"
> is_component_build=false v8_enable_gdbjit=true" out/7.1.1.debug.gdbjit
> Done. Made 159 targets from 80 files in 346ms
> cc01:v8:[7.1.1]>autoninja -C out/7.1.1.debug.gdbjit d8
> ninja -C out/7.1.1.debug.gdbjit d8 -l 128
> ninja: Entering directory `out/7.1.1.debug.gdbjit'
> [1340/2173] CXX obj/v8_base/gdb-jit.o
> FAILED: obj/v8_base/gdb-jit.o
> ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF
> obj/v8_base/gdb-jit.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1
> -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC
> -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL
> -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
> -DCR_CLANG_REVISION=\"338452-1\" -D__STDC_CONSTANT_MACROS
> -D__STDC_FORMAT_MACROS -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
> -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=332543
> -DCR_LIBCXXABI_REVISION=331450
> -DCR_SYSROOT_HASH=c68b2062879db201c4047d03c016227d3d1e7b35 -D_DEBUG
> -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1
> -DENABLE_DISASSEMBLER -DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64
> -DENABLE_GDB_JIT_INTERFACE -DENABLE_MINOR_MC -DOBJECT_PRINT -DVERIFY_HEAP
> -DV8_TRACE_MAPS -DV8_ENABLE_ALLOCATION_TIMEOUT -DV8_ENABLE_FORCE_SLOW_PATH
> -DV8_ENABLE_CHECKS -DV8_DEPRECATION_WARNINGS
> -DV8_IMMINENT_DEPRECATION_WARNINGS -DV8_INTL_SUPPORT
> -DENABLE_HANDLE_ZAPPING -DV8_USE_SNAPSHOT -DV8_USE_EXTERNAL_STARTUP_DATA
> -DV8_CONCURRENT_MARKING -DV8_CHECK_MICROTASKS_SCOPES_CONSISTENCY
> -DV8_EMBEDDED_BUILTINS -DV8_TARGET_ARCH_ARM64 -DDEBUG
> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION
> -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -I../.. -Igen
> -I../.. -Igen -I../../third_party/icu/source/common
> -I../../third_party/icu/source/i18n -I../../include -fno-strict-aliasing
> --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined
> -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pthread
> -fcolor-diagnostics -fmerge-all-constants -no-canonical-prefixes
> -fcomplete-member-pointers --target=aarch64-linux-gnu -Wall -Werror -Wextra
> -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers
> -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default
> -Wno-unneeded-internal-declaration -Wno-undefined-var-template
> -Wno-nonportable-include-path -Wno-user-defined-warnings
> -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic
> -Wno-enum-compare-switch -Wno-ignored-pragma-optimize
> -fno-omit-frame-pointer -g2 -fvisibility=hidden -Wheader-hygiene
> -Wstring-conversion -Wtautological-overlap-compare
> -Wmissing-field-initializers -Winconsistent-missing-override
> -Wunreachable-code -Wshorten-64-to-32 -O3 -fno-ident -fdata-sections
> -ffunction-sections -Wno-undefined-bool-conversion
> -Wno-tautological-undefined-compare -std=c++14 -fno-exceptions -fno-rtti
> -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include
> -isystem../../buildtools/third_party/libc++abi/trunk/include
> --sysroot=../../build/linux/debian_sid_arm64-sysroot
> -fvisibility-inlines-hidden -c ../../src/gdb-jit.cc -o obj/v8_base/gdb-jit.o
> ../../src/gdb-jit.cc:668:2: error: Unsupported target architecture.
> #error Unsupported target architecture.
>  ^
> ../../src/gdb-jit.cc:697:2: error: Unsupported target architecture.
> #error Unsupported target architecture.
>  ^
> ../../src/gdb-jit.cc:670:27: error: use of undeclared identifier 'ident'
>     memcpy(header->ident, ident, 16);
>                           ^
> ../../src/gdb-jit.cc:838:27: error: use of undeclared identifier
> 'SerializedLayout'
>   void Write(Writer::Slot<SerializedLayout> s, ELFStringTable* t) const {
>                           ^
> ../../src/gdb-jit.cc:912:49: error: no member named 'SerializedLayout' in
> 'v8::internal::GDBJITInterface::ELFSymbol'
>                         Writer::Slot<ELFSymbol::SerializedLayout> dst,
>                                      ~~~~~~~~~~~^
> ../../src/gdb-jit.cc:870:29: error: no member named 'SerializedLayout' in
> 'v8::internal::GDBJITInterface::ELFSymbol'
>     Writer::Slot<ELFSymbol::SerializedLayout> symbols =
>                  ~~~~~~~~~~~^
> ../../src/gdb-jit.cc:870:47: error: C++ requires a type specifier for all
> declarations
>     Writer::Slot<ELFSymbol::SerializedLayout> symbols =
>                                               ^
> ../../src/gdb-jit.cc:871:39: error: no member named 'SerializedLayout' in
> 'v8::internal::GDBJITInterface::ELFSymbol'
>         w->CreateSlotsHere<ELFSymbol::SerializedLayout>(
>                            ~~~~~~~~~~~^
> ../../src/gdb-jit.cc:871:56: error: expected unqualified-id
>         w->CreateSlotsHere<ELFSymbol::SerializedLayout>(
>                                                        ^
> ../../src/gdb-jit.cc:880:34: error: no member named 'SerializedLayout' in
> 'v8::internal::GDBJITInterface::ELFSymbol'
>     symbols.at(0).set(ELFSymbol::SerializedLayout(0,
>                       ~~~~~~~~~~~^
> ../../src/gdb-jit.cc:907:44: error: no member named 'SerializedLayout' in
> 'v8::internal::GDBJITInterface::ELFSymbol'
>     header->entry_size = sizeof(ELFSymbol::SerializedLayout);
>                                 ~~~~~~~~~~~^
> ../../src/gdb-jit.cc:1160:2: error: Unsupported target architecture.
> #error Unsupported target architecture.
>  ^
> 12 errors generated.
> [1469/2173] CXX obj/v8_base/code-stub-assembler.o
> ninja: build stopped: subcommand failed.
>
>
> On Wednesday, December 12, 2018 at 12:08:13 PM UTC-6, Rodolph Perfetta
> wrote:
>>
>> Just checking, when building v8, you did enable gdbjit?
>> v8_enable_gdbjit=true in gn args. The blog you pointed to is a bit out of
>> date.
>>
>>
>>
>> On Wed, 12 Dec 2018 at 07:49, Jakob Gruber <[email protected]> wrote:
>>
>>>
>>>
>>> On Tue, Dec 11, 2018 at 11:45 PM <[email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> In some of the profiles that I have been looking at CheckObjectType
>>>> comes out are pretty hot. I noticed that this is called multiple times from
>>>> various builtins or other jitted code. I wanted to know where in jitted
>>>> code or builtins is this call coming from.
>>>>
>>>
>>> This doesn't answer your main question, but CheckObjectType calls only
>>> occur in debug mode and are emitted when creating TNodes (typed nodes), see
>>> here
>>> <https://cs.chromium.org/chromium/src/v8/src/compiler/code-assembler.h?l=703&rcl=72448bedcf497b26a742fe96bb1d387d7421d10d>
>>> .
>>>
>>>
>>>>
>>>> Unfortunately, I can not step into jitted code while running d8 with
>>>> gdb.  I found the following link which talks about gdb-jit
>>>> https://v8.dev/docs/gdb-jit. It mostly talks about ia32.
>>>>
>>>> I was wondering if anyone has looked at running GDB on d8 on ARM64? Is
>>>> it possible to break in the native code at all in ARM64?
>>>>
>>>> --
>>> --
>>> v8-dev mailing list
>>> [email protected]
>>> http://groups.google.com/group/v8-dev
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "v8-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> --
> v8-dev mailing list
> [email protected]
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to