changeset 23269:52f1bd96653f

ensure OptionValues have a name if profiling their reads
author Doug Simon <doug.simon@oracle.com>
date Thu, 07 Jan 2016 15:00:09 +0100
parents 1ced4f8e6e7f
children 1375f94fdf30
files graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionValue.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionValue.java	Thu Jan 07 14:54:32 2016 +0100
+++ b/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionValue.java	Thu Jan 07 15:00:09 2016 +0100
@@ -453,6 +453,10 @@
 
     static {
         if (ShowReadsHistogram) {
+            // Trigger initialization of OptionsLoader to ensure all option values have
+            // a descriptor which is required for them to have meaningful names.
+            OptionsLoader.options.hashCode();
+
             Runtime.getRuntime().addShutdownHook(new Thread() {
                 @Override
                 public void run() {