RFR: 8233494: Avoid calling MallocTracker::record_malloc and record_free when NMT is off
Doerr, Martin
martin.doerr at sap.com
Mon Nov 4 14:14:05 UTC 2019
Hi Claes,
this makes sense. Change looks good to me.
Best regards,
Martin
> -----Original Message-----
> From: hotspot-runtime-dev <hotspot-runtime-dev-
> bounces at openjdk.java.net> On Behalf Of Claes Redestad
> Sent: Montag, 4. November 2019 14:54
> To: Hotspot dev runtime <hotspot-runtime-dev at openjdk.java.net>
> Subject: RFR: 8233494: Avoid calling MallocTracker::record_malloc and
> record_free when NMT is off
>
> Hi,
>
> this patch removes some small but measurable NMT-related overheads
> when
> when NMT is disabled, by moving NMT_off checks out into MemTracker
> where
> they can be more aggressively inlined.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8233494
> Webrev: http://cr.openjdk.java.net/~redestad/8233494/open.00/
>
> Motivation:
>
> Overhead of calling MallocTracker methods account for ~15-25% of
> instructions retired by os::malloc/realloc/free. On a "Hello World" on
> my laptop (no large pages) we already do roughly 9k os::malloc calls, so
> this improvement means a reduction in instructions retired by ~250k, or
> ~0.2% of the total. There is no discernible difference in behavior or
> overhead for the case when NMT is enabled.
>
> Testing: tier1-2
>
> Thanks!
>
> /Claes
More information about the hotspot-runtime-dev
mailing list