src/share/vm/compiler/disassembler.cpp

changeset 10000
4b0aa85a9565
parent 9920
3a3803a0c789
child 10003
a0eb08e2db5a
     1.1 --- a/src/share/vm/compiler/disassembler.cpp	Thu Aug 27 21:00:00 2020 -0300
     1.2 +++ b/src/share/vm/compiler/disassembler.cpp	Tue Aug 25 13:30:02 2020 +0200
     1.3 @@ -244,19 +244,25 @@
     1.4    const char* options() { return _option_buf; }
     1.5  };
     1.6  
     1.7 -decode_env::decode_env(CodeBlob* code, outputStream* output, CodeStrings c) {
     1.8 -  memset(this, 0, sizeof(*this)); // Beware, this zeroes bits of fields.
     1.9 -  _output = output ? output : tty;
    1.10 -  _code = code;
    1.11 -  if (code != NULL && code->is_nmethod())
    1.12 -    _nm = (nmethod*) code;
    1.13 +decode_env::decode_env(CodeBlob* code, outputStream* output, CodeStrings c) :
    1.14 +  _nm((code != NULL && code->is_nmethod()) ? (nmethod*)code : NULL),
    1.15 +  _code(code),
    1.16 +  _strings(),
    1.17 +  _output(output ? output : tty),
    1.18 +  _start(NULL),
    1.19 +  _end(NULL),
    1.20 +  _option_buf(),
    1.21 +  _print_raw(0),
    1.22 +  // by default, output pc but not bytes:
    1.23 +  _print_pc(true),
    1.24 +  _print_bytes(false),
    1.25 +  _cur_insn(NULL),
    1.26 +  _total_ticks(0),
    1.27 +  _bytes_per_line(Disassembler::pd_instruction_alignment())
    1.28 +{
    1.29 +  memset(_option_buf, 0, sizeof(_option_buf));
    1.30    _strings.copy(c);
    1.31  
    1.32 -  // by default, output pc but not bytes:
    1.33 -  _print_pc       = true;
    1.34 -  _print_bytes    = false;
    1.35 -  _bytes_per_line = Disassembler::pd_instruction_alignment();
    1.36 -
    1.37    // parse the global option string:
    1.38    collect_options(Disassembler::pd_cpu_opts());
    1.39    collect_options(PrintAssemblyOptions);

mercurial