8081406: cleanup and minor extensions of the debugging facilities in CodeStrings

Avoid issues around _defunct CodeStrings

Reviewed-by: dholmes, coleenp
This commit is contained in:
Bertrand Delsart 2015-06-25 08:17:52 +02:00
parent d60d6fdf40
commit 2a01bb6dda
3 changed files with 20 additions and 5 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -88,6 +88,7 @@ CodeBlob::CodeBlob(const char* name, int header_size, int size, int frame_comple
_data_offset = size;
_frame_size = 0;
set_oop_maps(NULL);
_strings = CodeStrings();
}
@ -114,6 +115,7 @@ CodeBlob::CodeBlob(
_code_offset = _content_offset + cb->total_offset_of(cb->insts());
_data_offset = _content_offset + round_to(cb->total_content_size(), oopSize);
assert(_data_offset <= size, "codeBlob is too small");
_strings = CodeStrings();
cb->copy_code_and_locs_to(this);
set_oop_maps(oop_maps);