RFR: 8225429: Regression in disassembly quality

Andrew Haley aph at redhat.com
Mon Jun 10 09:29:41 UTC 2019


On 6/7/19 6:31 PM, Tom Rodriguez wrote:
>>> I think your current patch is good given how broken it currently is.  So
>>> I approve of your current patch, though I would like to see your new
>>> defaults abstractDisassembler.cpp apply product as well so it always
>>> looks the same as it used to.
>>
>> OK, I'll have a look at what product did.
> 
> I think it would be the same as what you added for non-product, so you 
> new block settings completely replaces the old settings.  I don't think 
> there should be any difference between product and non-product in terms 
> of what's emitted by disassembly.  Which I think was the gist of John's 
> comment.

Sure, I get that, but there are other issues. In particular, code comments
are disabled in product by macros such as

#ifdef PRODUCT
#define BLOCK_COMMENT(str) /* nothing */
#define STOP(error) stop(error)
#else
#define BLOCK_COMMENT(str) block_comment(str)
#define STOP(error) block_comment(error); stop(error)
#endif

I have no idea why these macros exist: unless debugging is enabled code
comments are gated by

void CodeBuffer::block_comment(intptr_t offset, const char * comment) {
  if (_collect_comments) {
    _code_strings.add_comment(offset, comment);

Maybe this is just historical baggage or it's a micro-optimization to
save space and a few machine cycles.

Anyway, I pushed http://cr.openjdk.java.net/~aph/8225429-2/ to
jdk-submit. This sets the default for both product and debug builds
the same.

If it passes I'll push it to jdk-jdk.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list