353 // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and
354 // reference fields can be naturally aligned.
355
356 extern int MinObjAlignment;
357 extern int MinObjAlignmentInBytes;
358 extern int MinObjAlignmentInBytesMask;
359
360 extern int LogMinObjAlignment;
361 extern int LogMinObjAlignmentInBytes;
362
363 const int LogKlassAlignmentInBytes = 3;
364 const int LogKlassAlignment = LogKlassAlignmentInBytes - LogHeapWordSize;
365 const int KlassAlignmentInBytes = 1 << LogKlassAlignmentInBytes;
366 const int KlassAlignment = KlassAlignmentInBytes / HeapWordSize;
367
368 // Klass encoding metaspace max size
369 const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes;
370
371 // Machine dependent stuff
372
373 #ifdef TARGET_ARCH_x86
374 # include "globalDefinitions_x86.hpp"
375 #endif
376 #ifdef TARGET_ARCH_sparc
377 # include "globalDefinitions_sparc.hpp"
378 #endif
379 #ifdef TARGET_ARCH_zero
380 # include "globalDefinitions_zero.hpp"
381 #endif
382 #ifdef TARGET_ARCH_arm
383 # include "globalDefinitions_arm.hpp"
384 #endif
385 #ifdef TARGET_ARCH_ppc
386 # include "globalDefinitions_ppc.hpp"
387 #endif
388
389 /*
390 * If a platform does not support native stack walking
391 * the platform specific globalDefinitions (above)
392 * can set PLATFORM_NATIVE_STACK_WALKING_SUPPORTED to 0
|
353 // Minimum is max(BytesPerLong, BytesPerDouble, BytesPerOop) / HeapWordSize, so jlong, jdouble and
354 // reference fields can be naturally aligned.
355
356 extern int MinObjAlignment;
357 extern int MinObjAlignmentInBytes;
358 extern int MinObjAlignmentInBytesMask;
359
360 extern int LogMinObjAlignment;
361 extern int LogMinObjAlignmentInBytes;
362
363 const int LogKlassAlignmentInBytes = 3;
364 const int LogKlassAlignment = LogKlassAlignmentInBytes - LogHeapWordSize;
365 const int KlassAlignmentInBytes = 1 << LogKlassAlignmentInBytes;
366 const int KlassAlignment = KlassAlignmentInBytes / HeapWordSize;
367
368 // Klass encoding metaspace max size
369 const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes;
370
371 // Machine dependent stuff
372
373 #if defined(X86) && defined(COMPILER2) && !defined(JAVASE_EMBEDDED)
374 // Include Restricted Transactional Memory lock eliding optimization
375 #define INCLUDE_RTM_OPT 1
376 #define RTM_OPT_ONLY(code) code
377 #else
378 #define INCLUDE_RTM_OPT 0
379 #define RTM_OPT_ONLY(code)
380 #endif
381 // States of Restricted Transactional Memory usage.
382 enum RTMState {
383 NoRTM = 0x2, // Don't use RTM
384 UseRTM = 0x1, // Use RTM
385 ProfileRTM = 0x0 // Use RTM with abort ratio calculation
386 };
387
388 #ifdef TARGET_ARCH_x86
389 # include "globalDefinitions_x86.hpp"
390 #endif
391 #ifdef TARGET_ARCH_sparc
392 # include "globalDefinitions_sparc.hpp"
393 #endif
394 #ifdef TARGET_ARCH_zero
395 # include "globalDefinitions_zero.hpp"
396 #endif
397 #ifdef TARGET_ARCH_arm
398 # include "globalDefinitions_arm.hpp"
399 #endif
400 #ifdef TARGET_ARCH_ppc
401 # include "globalDefinitions_ppc.hpp"
402 #endif
403
404 /*
405 * If a platform does not support native stack walking
406 * the platform specific globalDefinitions (above)
407 * can set PLATFORM_NATIVE_STACK_WALKING_SUPPORTED to 0
|