8313562: hsperfdata should export module path and "launcher" metadata
Reviewed-by: dholmes, kevinw
This commit is contained in:
parent
9ed8629e5d
commit
814cf87930
@ -228,6 +228,19 @@ void StatSampler::add_property_constant(CounterNS name_space, const char* name,
|
||||
add_property_constant(name_space, name, Arguments::get_property(name), CHECK);
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a string constant of the given property. Retrieves the value via
|
||||
* Arguments::get_property() and asserts the value for the does not differ from
|
||||
* the value retrievable from System.getProperty()
|
||||
*/
|
||||
void StatSampler::add_optional_property_constant(CounterNS name_space, const char* name, TRAPS) {
|
||||
const char* value = Arguments::get_property(name);
|
||||
|
||||
if (value != nullptr) {
|
||||
add_property_constant(name_space, name, value, CHECK);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Method to create PerfStringConstants containing the values of various
|
||||
* system properties. Constants are created from information known to HotSpot,
|
||||
@ -260,6 +273,10 @@ void StatSampler::create_system_property_instrumentation(TRAPS) {
|
||||
add_property_constant(JAVA_PROPERTY, "java.library.path", CHECK);
|
||||
add_property_constant(JAVA_PROPERTY, "java.class.path", CHECK);
|
||||
add_property_constant(JAVA_PROPERTY, "java.home", CHECK);
|
||||
|
||||
add_optional_property_constant(JAVA_PROPERTY, "jdk.module.path", CHECK);
|
||||
add_optional_property_constant(JAVA_PROPERTY, "jdk.module.upgrade.path", CHECK);
|
||||
add_optional_property_constant(JAVA_PROPERTY, "jdk.module.main", CHECK);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -53,6 +53,7 @@ class StatSampler : AllStatic {
|
||||
static void sample_data(PerfDataList* list);
|
||||
static void assert_system_property(const char* name, const char* value, TRAPS);
|
||||
static void add_property_constant(CounterNS name_space, const char* name, TRAPS);
|
||||
static void add_optional_property_constant(CounterNS name_space, const char* name, TRAPS);
|
||||
static void add_property_constant(CounterNS name_space, const char* name, const char* value, TRAPS);
|
||||
static void create_system_property_instrumentation(TRAPS);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user