Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

#include <string.h>
#include "hotspot/hotspotStackFrame.h"
// The VMNMethod accessors used below are inline in vmStructs.h and assert via crashProtectionActive()
// / cast_to(), both of which are defined in vmStructs.inline.h. Without this include, assertion-enabled
// builds (the gtest targets) leave those symbols unresolved at link time.
#include "hotspot/vmStructs.inline.h"

static inline bool isSTP(instruction_t insn) {
// stp xn, xm, [sp, #-imm]!
Expand Down
3 changes: 3 additions & 0 deletions ddprof-lib/src/main/cpp/hotspot/hotspotStackFrame_x64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

#include <string.h>
#include "hotspot/hotspotStackFrame.h"
// See the note in hotspotStackFrame_aarch64.cpp: the VMNMethod accessors need vmStructs.inline.h
// for crashProtectionActive() / cast_to() so assertion-enabled builds link.
#include "hotspot/vmStructs.inline.h"

__attribute__((no_sanitize("address"))) bool HotspotStackFrame::unwindStub(instruction_t* entry, const char* name, uintptr_t& pc, uintptr_t& sp, uintptr_t& fp) {
instruction_t* ip = (instruction_t*)pc;
Expand Down
5 changes: 4 additions & 1 deletion ddprof-lib/src/main/cpp/vmEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
#include "os.h"
#include "profiler.h"
#include "safeAccess.h"
#include "hotspot/vmStructs.h"
// Pulls in vmStructs.h plus the definitions of crashProtectionActive()/cast_to() that its inline
// accessors odr-use here; the light vmStructs.h alone leaves those unresolved in assertion-enabled
// builds (see the note in hotspotStackFrame_aarch64.cpp).
#include "hotspot/vmStructs.inline.h"
#include "hotspot/jitCodeCache.h"
#include <atomic>
#include <dlfcn.h>
Expand Down
Loading