Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion src/hotspot/cpu/aarch64/globals_aarch64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ define_pd_global(intx, InitArrayShortSize, BytesPerLong);
define_pd_global(intx, InlineSmallCode, 1000);
#endif

#define ARCH_FLAGS(develop, \
#define ARCH_FLAGS(ni_hosted, \
ni_hosted_pd, \
ni_runtime, \
ni_runtime_pd, \
develop, \
product, \
range, \
constraint) \
Expand Down
6 changes: 4 additions & 2 deletions src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
#include "gc/z/zThreadLocalData.hpp"
#endif

#ifndef SVM
// Declaration and definition of StubGenerator (no .hpp file).
// For a more detailed description of the stub routine structure
// see the comment in stubRoutines.hpp
Expand Down Expand Up @@ -450,7 +451,7 @@ class StubGenerator: public StubCodeGenerator {
__ verify_oop(r0);

__ str(r0, Address(rthread, Thread::pending_exception_offset()));
__ mov(rscratch1, (address)__FILE__);
__ mov(rscratch1, (address)__FILENAME_ONLY__);
__ str(rscratch1, Address(rthread, Thread::exception_file_offset()));
__ movw(rscratch1, (int)__LINE__);
__ strw(rscratch1, Address(rthread, Thread::exception_line_offset()));
Expand Down Expand Up @@ -11920,13 +11921,14 @@ class StubGenerator: public StubCodeGenerator {
void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
StubGenerator g(code, blob_id);
}

#endif // !SVM

#if defined (LINUX)

// Define pointers to atomic stubs and initialize them to point to the
// code in atomic_aarch64.S.

// NOTE (chaeubl): extern "C" is needed because these functions are defined in assembly
#define DEFAULT_ATOMIC_OP(OPNAME, SIZE, RELAXED) \
extern "C" uint64_t aarch64_atomic_ ## OPNAME ## _ ## SIZE ## RELAXED ## _default_impl \
(volatile void *ptr, uint64_t arg1, uint64_t arg2); \
Expand Down
6 changes: 5 additions & 1 deletion src/hotspot/cpu/x86/globals_x86.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ define_pd_global(bool, PreserveFramePointer, false);

define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);

#define ARCH_FLAGS(develop, \
#define ARCH_FLAGS(ni_hosted, \
ni_hosted_pd, \
ni_runtime, \
ni_runtime_pd, \
develop, \
product, \
range, \
constraint) \
Expand Down
8 changes: 6 additions & 2 deletions src/hotspot/os/linux/globals_linux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
//
// Declare Linux specific flags. They are not available on other platforms.
//
#define RUNTIME_OS_FLAGS(develop, \
#define RUNTIME_OS_FLAGS(ni_hosted, \
ni_hosted_pd, \
ni_runtime, \
ni_runtime_pd, \
develop, \
develop_pd, \
product, \
product_pd, \
Expand All @@ -44,7 +48,7 @@
product(bool, LoadExecStackDllInVMThread, true, \
"Load DLLs with executable-stack attribute in the VM Thread") \
\
product(bool, UseContainerSupport, true, \
ni_hosted(bool, UseContainerSupport, true, \
"Enable detection and runtime container configuration support") \
\
product(bool, AdjustStackSizeForTLS, false, \
Expand Down
6 changes: 5 additions & 1 deletion src/hotspot/os/linux/osThread_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,18 @@
OSThread::OSThread()
: _thread_id(0),
_pthread_id(0),
_caller_sigmask(),
#ifndef SVM
_caller_sigmask(),
sr(),
_siginfo(nullptr),
_ucontext(nullptr),
_expanding_stack(0),
_alt_sig_stack(nullptr),
#endif // SVM
_startThread_lock(new Monitor(Mutex::event, "startThread_lock")) {
#ifndef SVM
sigemptyset(&_caller_sigmask);
#endif // !SVM
}

OSThread::~OSThread() {
Expand Down
10 changes: 10 additions & 0 deletions src/hotspot/os/linux/osThread_linux.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@ class OSThread : public OSThreadBase {
// (e.g. pthread_kill).
pthread_t _pthread_id;

#ifndef SVM
sigset_t _caller_sigmask; // Caller's signal mask
#endif // !SVM

public:
OSThread();
~OSThread();

#ifndef SVM
// Methods to save/restore caller's signal mask
sigset_t caller_sigmask() const { return _caller_sigmask; }
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }
#endif // !SVM

thread_id_t thread_id() const {
return _thread_id;
Expand All @@ -68,10 +72,12 @@ class OSThread : public OSThreadBase {
// suspension support.
// ***************************************************************

#ifndef SVM
// flags that support signal based suspend/resume on Linux are in a
// separate class to avoid confusion with many flags in OSThread that
// are used by VM level suspend/resume.
SuspendResume sr;
#endif // !SVM

// _ucontext and _siginfo are used by SR_handler() to save thread context,
// and they will later be used to walk the stack or reposition thread PC.
Expand All @@ -87,12 +93,15 @@ class OSThread : public OSThreadBase {
// should be in a place where we are native and will block ourselves
// if we transition.
private:
#ifndef SVM
void* _siginfo;
ucontext_t* _ucontext;
int _expanding_stack; /* non zero if manually expanding stack */
address _alt_sig_stack; /* address of base of alternate signal stack */
#endif // !SVM

public:
#ifndef SVM
void* siginfo() const { return _siginfo; }
void set_siginfo(void* ptr) { _siginfo = ptr; }
ucontext_t* ucontext() const { return _ucontext; }
Expand All @@ -103,6 +112,7 @@ class OSThread : public OSThreadBase {

void set_alt_sig_stack(address val) { _alt_sig_stack = val; }
address alt_sig_stack(void) { return _alt_sig_stack; }
#endif // !SVM

private:
Monitor* _startThread_lock; // sync parent and child in thread creation
Expand Down
Loading