Skip to content

Commit a34488c

Browse files
Add SVM-specific C++ namespace.
1 parent 95ab00b commit a34488c

File tree

483 files changed

+3334
-8
lines changed

Some content is hidden

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

483 files changed

+3334
-8
lines changed

src/hotspot/cpu/aarch64/atomic_aarch64.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
// x1: arg1
3333
// x2: arg2 (optional)
3434
// x3, x8, x9: scratch
35+
36+
namespace svm_gc {
37+
3538
typedef uint64_t (*aarch64_atomic_stub_t)(volatile void *ptr, uint64_t arg1, uint64_t arg2);
3639

3740
// Pointers to stubs
@@ -52,4 +55,7 @@ extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_release_impl;
5255
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_4_seq_cst_impl;
5356
extern aarch64_atomic_stub_t aarch64_atomic_cmpxchg_8_seq_cst_impl;
5457

58+
59+
} // namespace svm_gc
60+
5561
#endif // CPU_AARCH64_ATOMIC_AARCH64_HPP

src/hotspot/cpu/aarch64/bytes_aarch64.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
#include "memory/allStatic.hpp"
3030
#include "utilities/byteswap.hpp"
3131

32+
33+
namespace svm_gc {
34+
3235
class Bytes: AllStatic {
3336
public:
3437
// Efficient reading and writing of unaligned unsigned data in platform-specific byte ordering
@@ -54,4 +57,7 @@ class Bytes: AllStatic {
5457
static inline void put_Java_u8(address p, u8 x) { put_native_u8(p, byteswap(x)); }
5558
};
5659

60+
61+
} // namespace svm_gc
62+
5763
#endif // CPU_AARCH64_BYTES_AARCH64_HPP

src/hotspot/cpu/aarch64/globalDefinitions_aarch64.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#ifndef CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP
2727
#define CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP
2828

29+
30+
namespace svm_gc {
31+
2932
const int StackAlignmentInBytes = 16;
3033
const size_t pd_segfault_address = 1024;
3134

@@ -78,4 +81,7 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
7881

7982
#define USE_TRAMPOLINE_STUB_FIX_OWNER
8083

84+
85+
} // namespace svm_gc
86+
8187
#endif // CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP

src/hotspot/cpu/aarch64/globals_aarch64.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
// Sets the default values for platform dependent flags used by the runtime system.
3333
// (see globals.hpp)
3434

35+
36+
namespace svm_gc {
37+
3538
define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks
3639
define_pd_global(bool, TrapBasedNullChecks, false);
3740
define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls past to check cast
@@ -133,4 +136,7 @@ define_pd_global(intx, InlineSmallCode, 1000);
133136

134137
// end of ARCH_FLAGS
135138

139+
140+
} // namespace svm_gc
141+
136142
#endif // CPU_AARCH64_GLOBALS_AARCH64_HPP

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282

8383
// Stub Code definitions
8484

85+
86+
namespace svm_gc {
87+
8588
class StubGenerator: public StubCodeGenerator {
8689
private:
8790

@@ -11921,6 +11924,9 @@ class StubGenerator: public StubCodeGenerator {
1192111924
void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
1192211925
StubGenerator g(code, blob_id);
1192311926
}
11927+
11928+
} // namespace svm_gc
11929+
1192411930
#endif // !SVM
1192511931

1192611932
#if defined (LINUX)
@@ -11935,6 +11941,9 @@ void StubGenerator_generate(CodeBuffer* code, StubGenBlobId blob_id) {
1193511941
aarch64_atomic_stub_t aarch64_atomic_ ## OPNAME ## _ ## SIZE ## RELAXED ## _impl \
1193611942
= aarch64_atomic_ ## OPNAME ## _ ## SIZE ## RELAXED ## _default_impl;
1193711943

11944+
11945+
namespace svm_gc {
11946+
1193811947
DEFAULT_ATOMIC_OP(fetch_add, 4, )
1193911948
DEFAULT_ATOMIC_OP(fetch_add, 8, )
1194011949
DEFAULT_ATOMIC_OP(fetch_add, 4, _relaxed)
@@ -11954,4 +11963,7 @@ DEFAULT_ATOMIC_OP(cmpxchg, 8, _seq_cst)
1195411963

1195511964
#undef DEFAULT_ATOMIC_OP
1195611965

11966+
11967+
} // namespace svm_gc
11968+
1195711969
#endif // LINUX

src/hotspot/cpu/x86/bytes_x86.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#include "utilities/byteswap.hpp"
3131
#include "utilities/macros.hpp"
3232

33+
34+
namespace svm_gc {
35+
3336
class Bytes: AllStatic {
3437
public:
3538
// Efficient reading and writing of unaligned unsigned data in platform-specific byte ordering
@@ -98,4 +101,7 @@ class Bytes: AllStatic {
98101
static inline void put_Java_u8(address p, u8 x) { put_Java<u8>(p, x); }
99102
};
100103

104+
105+
} // namespace svm_gc
106+
101107
#endif // CPU_X86_BYTES_X86_HPP

src/hotspot/cpu/x86/globalDefinitions_x86.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#ifndef CPU_X86_GLOBALDEFINITIONS_X86_HPP
2626
#define CPU_X86_GLOBALDEFINITIONS_X86_HPP
2727

28+
29+
namespace svm_gc {
30+
2831
const int StackAlignmentInBytes = 16;
2932
const size_t pd_segfault_address = 1024;
3033

@@ -54,4 +57,7 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
5457

5558
#define USE_POINTERS_TO_REGISTER_IMPL_ARRAY
5659

60+
61+
} // namespace svm_gc
62+
5763
#endif // CPU_X86_GLOBALDEFINITIONS_X86_HPP

src/hotspot/cpu/x86/globals_x86.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
// Sets the default values for platform dependent flags used by the runtime system.
3232
// (see globals.hpp)
3333

34+
35+
namespace svm_gc {
36+
3437
define_pd_global(bool, ImplicitNullChecks, true); // Generate code for implicit null checks
3538
define_pd_global(bool, TrapBasedNullChecks, false); // Not needed on x86.
3639
define_pd_global(bool, UncommonNullCast, true); // Uncommon-trap nulls passed to check cast
@@ -196,4 +199,7 @@ define_pd_global(intx, InitArrayShortSize, 8*BytesPerLong);
196199
\
197200
// end of ARCH_FLAGS
198201

202+
203+
} // namespace svm_gc
204+
199205
#endif // CPU_X86_GLOBALS_X86_HPP

src/hotspot/jfrfiles/jfrEventClasses.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
* The assert message contains both the index (zero based) as well as the name of the field.
4949
*/
5050

51+
52+
namespace svm_gc {
53+
5154
struct JfrStructVirtualSpace
5255
{
5356
private:
@@ -14451,8 +14454,14 @@ class JfrNonReentrant : public EventType {
1445114454
};
1445214455

1445314456

14457+
14458+
} // namespace svm_gc
14459+
1445414460
#else // !INCLUDE_JFR
1445514461

14462+
14463+
namespace svm_gc {
14464+
1445614465
template <typename T>
1445714466
class JfrEvent {
1445814467
public:
@@ -19706,5 +19715,8 @@ class JfrNonReentrant : public EventType {
1970619715
};
1970719716

1970819717

19718+
19719+
} // namespace svm_gc
19720+
1970919721
#endif // INCLUDE_JFR
1971019722
#endif // JFRFILES_JFREVENTCLASSES_HPP

src/hotspot/jfrfiles/jfrEventIds.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
#include "utilities/macros.hpp"
3131
#if INCLUDE_JFR
3232

33+
34+
namespace svm_gc {
35+
3336
enum JfrEventId {
3437
JfrMetadataEvent = 0,
3538
JfrCheckpointEvent = 1,
@@ -210,5 +213,8 @@ static const JfrEventId FIRST_EVENT_ID = JfrDurationEvent;
210213
static const JfrEventId LAST_EVENT_ID = JfrMethodTimingEvent;
211214
static const int NUMBER_OF_EVENTS = 170;
212215
static const int NUMBER_OF_RESERVED_EVENTS = 2;
216+
217+
} // namespace svm_gc
218+
213219
#endif // INCLUDE_JFR
214220
#endif // JFRFILES_JFREVENTIDS_HPP

0 commit comments

Comments
 (0)