changeset 57140:be238525d240

8234583: PrintAssemblyOptions isn't passed to hsdis library Reviewed-by: vlivanov, mdoerr
author lucy
date Thu, 28 Nov 2019 16:28:53 +0100
parents 70f49f08c9e6
children 72f3dd43dd28
files src/hotspot/share/compiler/disassembler.cpp
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/compiler/disassembler.cpp	Thu Nov 28 16:11:44 2019 +0100
+++ b/src/hotspot/share/compiler/disassembler.cpp	Thu Nov 28 16:28:53 2019 +0100
@@ -414,9 +414,10 @@
   _bytes_per_line  = Disassembler::pd_instruction_alignment();
   _print_file_name = true;
 
-  if (_optionsParsed) return;  // parse only once
-
-  // parse the global option string:
+  // parse the global option string
+  // We need to fill the options buffer for each newly created
+  // decode_env instance. The hsdis_* library looks for options
+  // in that buffer.
   collect_options(Disassembler::pd_cpu_opts());
   collect_options(PrintAssemblyOptions);
 
@@ -424,6 +425,8 @@
     _print_raw = (strstr(options(), "xml") ? 2 : 1);
   }
 
+  if (_optionsParsed) return;  // parse only once
+
   if (strstr(options(), "help")) {
     _print_help = true;
   }