RFR [S] 8081406: cleanup and minor extensions of the debugging facilities in CodeStrings
Bertrand Delsart
bertrand.delsart at oracle.com
Thu May 28 17:02:28 UTC 2015
Hi all,
Small RFR to address minor issues in debug mode with CodeStrings
https://bugs.openjdk.java.net/browse/JDK-8081406
http://cr.openjdk.java.net/~bdelsart/8081406/webrev.00/
The change does not impact the product mode.
In non product mode, CodeStrings allows to associate a linked list of
strings to a CodeBuffer, CodeBlob or Stub. In addition, with ASSERTS, it
defines a boolean asserting whether the list of strings are valid.
Here are the issues addressed by this CR:
- The old code mentioned the fact that CodeStrings was not always
correctly initialized. This is addressed by the fix, allowing
check_valid to be added at a few locations where it could currently
failed due to uninitialized values (like at the beginning of
CodeStrings::free). This also makes the code more robust against future
versions of CodeStrings.
- As a minor extension, it is now possible for platform dependent code
to modify the comment separator used by print_block_comment, which was
hard coded to " ;; ".
- As another minor extension, related to the validity assertions,
freeing a code string no longer necessarily marks it (and hence its
Stub/CodeBlob/CodeBuffer) as invalid. If CodeStrings contains only
comment, removing them does not change the validity of the CodeStrings.
For similar reason, assignment over a non null CodeStrings is now valid
when we can safely free the old string.
The modified code passes JPRT. It was also validated in fastdebug mode
with the vm.compiler.testlist to check that the validity assertion were
not triggered. One of our closed extensions also validated advanced use
of CodeStrings::assign (included cases where the target of the
assignment was not free).
Best regards,
Bertrand.
--
Bertrand Delsart, Grenoble Engineering Center
Oracle, 180 av. de l'Europe, ZIRST de Montbonnot
38330 Montbonnot Saint Martin, FRANCE
bertrand.delsart at oracle.com Phone : +33 4 76 18 81 23
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient,
please contact the sender by reply email and destroy all copies of
the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the hotspot-dev
mailing list