RFR: 8135292: Remove duplicate code in <OS>Address.java in SA [v2]

Severin Gehwolf sgehwolf at openjdk.org
Wed Jun 22 16:52:01 UTC 2022


On Wed, 22 Jun 2022 14:08:41 GMT, Jayashree Huttanagoudar <duke at openjdk.org> wrote:

>> This PR is to address : https://bugs.openjdk.org/browse/JDK-8135292?jql=labels%20%3D%20starter-bug
>> Verified the build before and after the patch. Also below tests are run:
>> Before Patch:
>> 
>> $ make test TEST="jtreg:test/hotspot/jtreg/serviceability"
>> 	==============================
>> 	Test summary
>> 	==============================
>> 	   TEST                                              TOTAL  PASS  FAIL ERROR   
>> 	>> jtreg:test/hotspot/jtreg/serviceability             316   314     1     1 <<
>> 	==============================
>> 	TEST FAILURE
>> 
>> 
>> After Patch:
>> 
>> $ make test TEST="jtreg:test/hotspot/jtreg/serviceability"
>> 	==============================
>> 	Test summary
>> 	==============================
>> 	   TEST                                              TOTAL  PASS  FAIL ERROR   
>> 	>> jtreg:test/hotspot/jtreg/serviceability             316   314     1     1 <<
>> 	==============================
>> 	TEST FAILURE
>
> Jayashree Huttanagoudar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8135291: Removed duplicate code in <OS>Address.java and related files in SA
>   -After asLongValue() added to interface Address.java, there no need to have the getValue() in every instance Address.java

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java line 528:

> 526:     public long getAddressValue(Address addr) {
> 527:       if (addr == null) return 0;
> 528:       return (addr.asLongValue());

Style nit: Omit the surrounding parenthesis: `return addr.asLongValue();` This repeats a couple of times.

-------------

PR: https://git.openjdk.org/jdk/pull/9112


More information about the serviceability-dev mailing list