Skip to content

Commit 95ab00b

Browse files
SVM-specific changes.
1 parent 02d8262 commit 95ab00b

File tree

164 files changed

+2942
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+2942
-276
lines changed

src/hotspot/cpu/aarch64/globals_aarch64.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ define_pd_global(intx, InitArrayShortSize, BytesPerLong);
7878
define_pd_global(intx, InlineSmallCode, 1000);
7979
#endif
8080

81-
#define ARCH_FLAGS(develop, \
81+
#define ARCH_FLAGS(ni_hosted, \
82+
ni_hosted_pd, \
83+
ni_runtime, \
84+
ni_runtime_pd, \
85+
develop, \
8286
product, \
8387
range, \
8488
constraint) \

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
#include "gc/z/zThreadLocalData.hpp"
6565
#endif
6666

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

452453
__ str(r0, Address(rthread, Thread::pending_exception_offset()));
453-
__ mov(rscratch1, (address)__FILE__);
454+
__ mov(rscratch1, (address)__FILENAME_ONLY__);
454455
__ str(rscratch1, Address(rthread, Thread::exception_file_offset()));
455456
__ movw(rscratch1, (int)__LINE__);
456457
__ strw(rscratch1, Address(rthread, Thread::exception_line_offset()));
@@ -11920,13 +11921,14 @@ class StubGenerator: public StubCodeGenerator {
1192011921
void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
1192111922
StubGenerator g(code, blob_id);
1192211923
}
11923-
11924+
#endif // !SVM
1192411925

1192511926
#if defined (LINUX)
1192611927

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

11931+
// NOTE (chaeubl): extern "C" is needed because these functions are defined in assembly
1193011932
#define DEFAULT_ATOMIC_OP(OPNAME, SIZE, RELAXED) \
1193111933
extern "C" uint64_t aarch64_atomic_ ## OPNAME ## _ ## SIZE ## RELAXED ## _default_impl \
1193211934
(volatile void *ptr, uint64_t arg1, uint64_t arg2); \

src/hotspot/cpu/x86/globals_x86.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ define_pd_global(bool, PreserveFramePointer, false);
8686

8787
define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
8888

89-
#define ARCH_FLAGS(develop, \
89+
#define ARCH_FLAGS(ni_hosted, \
90+
ni_hosted_pd, \
91+
ni_runtime, \
92+
ni_runtime_pd, \
93+
develop, \
9094
product, \
9195
range, \
9296
constraint) \

src/hotspot/os/linux/globals_linux.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
//
2929
// Declare Linux specific flags. They are not available on other platforms.
3030
//
31-
#define RUNTIME_OS_FLAGS(develop, \
31+
#define RUNTIME_OS_FLAGS(ni_hosted, \
32+
ni_hosted_pd, \
33+
ni_runtime, \
34+
ni_runtime_pd, \
35+
develop, \
3236
develop_pd, \
3337
product, \
3438
product_pd, \
@@ -44,7 +48,7 @@
4448
product(bool, LoadExecStackDllInVMThread, true, \
4549
"Load DLLs with executable-stack attribute in the VM Thread") \
4650
\
47-
product(bool, UseContainerSupport, true, \
51+
ni_hosted(bool, UseContainerSupport, true, \
4852
"Enable detection and runtime container configuration support") \
4953
\
5054
product(bool, AdjustStackSizeForTLS, false, \

src/hotspot/os/linux/osThread_linux.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,18 @@
3131
OSThread::OSThread()
3232
: _thread_id(0),
3333
_pthread_id(0),
34-
_caller_sigmask(),
34+
#ifndef SVM
35+
_caller_sigmask(),
3536
sr(),
3637
_siginfo(nullptr),
3738
_ucontext(nullptr),
3839
_expanding_stack(0),
3940
_alt_sig_stack(nullptr),
41+
#endif // SVM
4042
_startThread_lock(new Monitor(Mutex::event, "startThread_lock")) {
43+
#ifndef SVM
4144
sigemptyset(&_caller_sigmask);
45+
#endif // !SVM
4246
}
4347

4448
OSThread::~OSThread() {

src/hotspot/os/linux/osThread_linux.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,19 @@ class OSThread : public OSThreadBase {
4040
// (e.g. pthread_kill).
4141
pthread_t _pthread_id;
4242

43+
#ifndef SVM
4344
sigset_t _caller_sigmask; // Caller's signal mask
45+
#endif // !SVM
4446

4547
public:
4648
OSThread();
4749
~OSThread();
4850

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

5357
thread_id_t thread_id() const {
5458
return _thread_id;
@@ -68,10 +72,12 @@ class OSThread : public OSThreadBase {
6872
// suspension support.
6973
// ***************************************************************
7074

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

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

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

104113
void set_alt_sig_stack(address val) { _alt_sig_stack = val; }
105114
address alt_sig_stack(void) { return _alt_sig_stack; }
115+
#endif // !SVM
106116

107117
private:
108118
Monitor* _startThread_lock; // sync parent and child in thread creation

0 commit comments

Comments
 (0)