Mercurial > hg > graal-jvmci-8
diff src/share/vm/jvmci/jvmciRuntime.cpp @ 22685:3039e5bb94cb
initialize JVMCI eagerly if either the PrintFlags or ShowFlags JVMCI option is present
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 15 Oct 2015 17:32:19 +0200 |
parents | 1bbd4a7c274b |
children | 316e768645c0 |
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciRuntime.cpp Thu Oct 15 17:30:42 2015 +0200 +++ b/src/share/vm/jvmci/jvmciRuntime.cpp Thu Oct 15 17:32:19 2015 +0200 @@ -940,6 +940,23 @@ _compiler = compiler; } +void JVMCIRuntime::maybe_print_flags(TRAPS) { + if (_options != NULL) { + for (int i = 0; i < _options_count; i++) { + SystemProperty* p = _options[i]; + const char* name = p->key() + OPTION_PREFIX_LEN; + if (strcmp(name, "PrintFlags") == 0 || strcmp(name, "ShowFlags") == 0) { + JVMCIRuntime::ensure_jvmci_class_loader_is_initialized(); + jvmci_compute_offsets(); + HandleMark hm; + ResourceMark rm; + JVMCIRuntime::get_HotSpotJVMCIRuntime(CHECK); + return; + } + } + } +} + void JVMCIRuntime::save_options(SystemProperty* props) { int count = 0; SystemProperty* first = NULL;