src/share/vm/runtime/globals.hpp

changeset 9896
1b8c45b8216a
parent 9834
bb1da64b0492
parent 9893
be5266057dda
child 9931
fd44df5e3bc3
child 9982
72053ed6f8d4
equal deleted inserted replaced
9847:b4fd7e078c54 9896:1b8c45b8216a
202 #define CI_COMPILER_COUNT 1 202 #define CI_COMPILER_COUNT 1
203 #endif // COMPILER2 203 #endif // COMPILER2
204 204
205 #endif // no compilers 205 #endif // no compilers
206 206
207 #if !INCLUDE_JFR
208 #define LogJFR false
209 #endif
210
207 // string type aliases used only in this file 211 // string type aliases used only in this file
208 typedef const char* ccstr; 212 typedef const char* ccstr;
209 typedef const char* ccstrlist; // represents string arguments which accumulate 213 typedef const char* ccstrlist; // represents string arguments which accumulate
210 214
211 struct Flag { 215 struct Flag {
363 }; 367 };
364 368
365 369
366 class CommandLineFlags { 370 class CommandLineFlags {
367 public: 371 public:
368 static bool boolAt(const char* name, size_t len, bool* value); 372 static bool boolAt(const char* name, size_t len, bool* value, bool allow_locked = false, bool return_flag = false);
369 static bool boolAt(const char* name, bool* value) { return boolAt(name, strlen(name), value); } 373 static bool boolAt(const char* name, bool* value, bool allow_locked = false, bool return_flag = false) { return boolAt(name, strlen(name), value, allow_locked, return_flag); }
370 static bool boolAtPut(const char* name, size_t len, bool* value, Flag::Flags origin); 374 static bool boolAtPut(const char* name, size_t len, bool* value, Flag::Flags origin);
371 static bool boolAtPut(const char* name, bool* value, Flag::Flags origin) { return boolAtPut(name, strlen(name), value, origin); } 375 static bool boolAtPut(const char* name, bool* value, Flag::Flags origin) { return boolAtPut(name, strlen(name), value, origin); }
372 376
373 static bool intxAt(const char* name, size_t len, intx* value); 377 static bool intxAt(const char* name, size_t len, intx* value, bool allow_locked = false, bool return_flag = false);
374 static bool intxAt(const char* name, intx* value) { return intxAt(name, strlen(name), value); } 378 static bool intxAt(const char* name, intx* value, bool allow_locked = false, bool return_flag = false) { return intxAt(name, strlen(name), value, allow_locked, return_flag); }
375 static bool intxAtPut(const char* name, size_t len, intx* value, Flag::Flags origin); 379 static bool intxAtPut(const char* name, size_t len, intx* value, Flag::Flags origin);
376 static bool intxAtPut(const char* name, intx* value, Flag::Flags origin) { return intxAtPut(name, strlen(name), value, origin); } 380 static bool intxAtPut(const char* name, intx* value, Flag::Flags origin) { return intxAtPut(name, strlen(name), value, origin); }
377 381
378 static bool uintxAt(const char* name, size_t len, uintx* value); 382 static bool uintxAt(const char* name, size_t len, uintx* value, bool allow_locked = false, bool return_flag = false);
379 static bool uintxAt(const char* name, uintx* value) { return uintxAt(name, strlen(name), value); } 383 static bool uintxAt(const char* name, uintx* value, bool allow_locked = false, bool return_flag = false) { return uintxAt(name, strlen(name), value, allow_locked, return_flag); }
380 static bool uintxAtPut(const char* name, size_t len, uintx* value, Flag::Flags origin); 384 static bool uintxAtPut(const char* name, size_t len, uintx* value, Flag::Flags origin);
381 static bool uintxAtPut(const char* name, uintx* value, Flag::Flags origin) { return uintxAtPut(name, strlen(name), value, origin); } 385 static bool uintxAtPut(const char* name, uintx* value, Flag::Flags origin) { return uintxAtPut(name, strlen(name), value, origin); }
382 386
383 static bool uint64_tAt(const char* name, size_t len, uint64_t* value); 387 static bool uint64_tAt(const char* name, size_t len, uint64_t* value, bool allow_locked = false, bool return_flag = false);
384 static bool uint64_tAt(const char* name, uint64_t* value) { return uint64_tAt(name, strlen(name), value); } 388 static bool uint64_tAt(const char* name, uint64_t* value, bool allow_locked = false, bool return_flag = false) { return uint64_tAt(name, strlen(name), value, allow_locked, return_flag); }
385 static bool uint64_tAtPut(const char* name, size_t len, uint64_t* value, Flag::Flags origin); 389 static bool uint64_tAtPut(const char* name, size_t len, uint64_t* value, Flag::Flags origin);
386 static bool uint64_tAtPut(const char* name, uint64_t* value, Flag::Flags origin) { return uint64_tAtPut(name, strlen(name), value, origin); } 390 static bool uint64_tAtPut(const char* name, uint64_t* value, Flag::Flags origin) { return uint64_tAtPut(name, strlen(name), value, origin); }
387 391
388 static bool doubleAt(const char* name, size_t len, double* value); 392 static bool doubleAt(const char* name, size_t len, double* value, bool allow_locked = false, bool return_flag = false);
389 static bool doubleAt(const char* name, double* value) { return doubleAt(name, strlen(name), value); } 393 static bool doubleAt(const char* name, double* value, bool allow_locked = false, bool return_flag = false) { return doubleAt(name, strlen(name), value, allow_locked, return_flag); }
390 static bool doubleAtPut(const char* name, size_t len, double* value, Flag::Flags origin); 394 static bool doubleAtPut(const char* name, size_t len, double* value, Flag::Flags origin);
391 static bool doubleAtPut(const char* name, double* value, Flag::Flags origin) { return doubleAtPut(name, strlen(name), value, origin); } 395 static bool doubleAtPut(const char* name, double* value, Flag::Flags origin) { return doubleAtPut(name, strlen(name), value, origin); }
392 396
393 static bool ccstrAt(const char* name, size_t len, ccstr* value); 397 static bool ccstrAt(const char* name, size_t len, ccstr* value, bool allow_locked = false, bool return_flag = false);
394 static bool ccstrAt(const char* name, ccstr* value) { return ccstrAt(name, strlen(name), value); } 398 static bool ccstrAt(const char* name, ccstr* value, bool allow_locked = false, bool return_flag = false) { return ccstrAt(name, strlen(name), value, allow_locked, return_flag); }
395 // Contract: Flag will make private copy of the incoming value. 399 // Contract: Flag will make private copy of the incoming value.
396 // Outgoing value is always malloc-ed, and caller MUST call free. 400 // Outgoing value is always malloc-ed, and caller MUST call free.
397 static bool ccstrAtPut(const char* name, size_t len, ccstr* value, Flag::Flags origin); 401 static bool ccstrAtPut(const char* name, size_t len, ccstr* value, Flag::Flags origin);
398 static bool ccstrAtPut(const char* name, ccstr* value, Flag::Flags origin) { return ccstrAtPut(name, strlen(name), value, origin); } 402 static bool ccstrAtPut(const char* name, ccstr* value, Flag::Flags origin) { return ccstrAtPut(name, strlen(name), value, origin); }
399 403
3980 experimental(uintx, ArrayAllocatorMallocLimit, \ 3984 experimental(uintx, ArrayAllocatorMallocLimit, \
3981 SOLARIS_ONLY(64*K) NOT_SOLARIS(max_uintx), \ 3985 SOLARIS_ONLY(64*K) NOT_SOLARIS(max_uintx), \
3982 "Allocation less than this value will be allocated " \ 3986 "Allocation less than this value will be allocated " \
3983 "using malloc. Larger allocations will use mmap.") \ 3987 "using malloc. Larger allocations will use mmap.") \
3984 \ 3988 \
3985 product(bool, EnableTracing, false, \
3986 "Enable event-based tracing") \
3987 \
3988 product(bool, UseLockedTracing, false, \
3989 "Use locked-tracing when doing event-based tracing") \
3990 \
3991 product_pd(bool, PreserveFramePointer, \ 3989 product_pd(bool, PreserveFramePointer, \
3992 "Use the FP register for holding the frame pointer " \ 3990 "Use the FP register for holding the frame pointer " \
3993 "and not as a general purpose register.") 3991 "and not as a general purpose register.") \
3992 \
3993 product(bool, EnableTracing, false, \
3994 "Enable event-based tracing" \
3995 "Deprecated: use FlightRecorder instead") \
3996 \
3997 product(bool, UseLockedTracing, false, \
3998 "Use locked-tracing when doing event-based tracing" \
3999 "Deprecated: use FlightRecorder instead") \
4000 \
4001 JFR_ONLY(product(bool, FlightRecorder, false, \
4002 "Enable Flight Recorder")) \
4003 \
4004 JFR_ONLY(product(ccstr, FlightRecorderOptions, NULL, \
4005 "Flight Recorder options")) \
4006 \
4007 JFR_ONLY(product(ccstr, StartFlightRecording, NULL, \
4008 "Start flight recording with options")) \
4009 \
4010 JFR_ONLY(product(bool, UnlockCommercialFeatures, false, \
4011 "This flag is ignored. Left for compatibility")) \
4012 \
4013 experimental(bool, UseFastUnorderedTimeStamps, false, \
4014 "Use platform unstable time where supported for timestamps only") \
4015 \
4016 JFR_ONLY(product(bool, LogJFR, false, \
4017 "Enable JFR logging (consider +Verbose)")) \
3994 4018
3995 /* 4019 /*
3996 * Macros for factoring of globals 4020 * Macros for factoring of globals
3997 */ 4021 */
3998 4022

mercurial