8255208: CodeStrings passed to Disassembler::decode are ignored

Reviewed-by: kvn, iklam
This commit is contained in:
Claes Redestad 2020-10-23 07:30:28 +00:00
parent 8e5dff08fa
commit c1524c59ad
11 changed files with 118 additions and 204 deletions

View file

@ -110,10 +110,12 @@ protected:
ImmutableOopMapSet* _oop_maps; // OopMap for this CodeBlob
bool _caller_must_gc_arguments;
CodeStrings _strings;
const char* _name;
S390_ONLY(int _ctable_offset;)
NOT_PRODUCT(CodeStrings _strings;)
CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, int frame_complete_offset, int frame_size, ImmutableOopMapSet* oop_maps, bool caller_must_gc_arguments);
CodeBlob(const char* name, CompilerType type, const CodeBlobLayout& layout, CodeBuffer* cb, int frame_complete_offset, int frame_size, OopMapSet* oop_maps, bool caller_must_gc_arguments);
@ -231,29 +233,20 @@ public:
void dump_for_addr(address addr, outputStream* st, bool verbose) const;
void print_code();
bool has_block_comment(address block_begin) const {
intptr_t offset = (intptr_t)(block_begin - code_begin());
return _strings.has_block_comment(offset);
}
// Print the comment associated with offset on stream, if there is one
virtual void print_block_comment(outputStream* stream, address block_begin) const {
#ifndef PRODUCT
intptr_t offset = (intptr_t)(block_begin - code_begin());
_strings.print_block_comment(stream, offset);
#endif
}
// Transfer ownership of comments to this CodeBlob
#ifndef PRODUCT
void set_strings(CodeStrings& strings) {
assert(!is_aot(), "invalid on aot");
_strings.assign(strings);
}
static ByteSize name_field_offset() {
return byte_offset_of(CodeBlob, _name);
}
static ByteSize oop_maps_field_offset() {
return byte_offset_of(CodeBlob, _oop_maps);
_strings.copy(strings);
}
#endif
};
class CodeBlobLayout : public StackObj {