mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
8224624: Inefficiencies in CodeStrings::add_comment cause timeouts
Changing CodeStrings to a doubly-linked-list and searching for the comment with the right offset in reverse. Reviewed-by: kvn
This commit is contained in:
parent
0941bf8b5e
commit
7cff981f5a
2 changed files with 29 additions and 9 deletions
|
@ -249,6 +249,7 @@ class CodeStrings {
|
|||
private:
|
||||
#ifndef PRODUCT
|
||||
CodeString* _strings;
|
||||
CodeString* _strings_last;
|
||||
#ifdef ASSERT
|
||||
// Becomes true after copy-out, forbids further use.
|
||||
bool _defunct; // Zero bit pattern is "valid", see memset call in decode_env::decode_env
|
||||
|
@ -262,6 +263,7 @@ private:
|
|||
void set_null_and_invalidate() {
|
||||
#ifndef PRODUCT
|
||||
_strings = NULL;
|
||||
_strings_last = NULL;
|
||||
#ifdef ASSERT
|
||||
_defunct = true;
|
||||
#endif
|
||||
|
@ -272,6 +274,7 @@ public:
|
|||
CodeStrings() {
|
||||
#ifndef PRODUCT
|
||||
_strings = NULL;
|
||||
_strings_last = NULL;
|
||||
#ifdef ASSERT
|
||||
_defunct = false;
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue