RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v4]

Ajit Ghaisas aghaisas at openjdk.java.net
Thu Feb 11 05:43:41 UTC 2021


On Wed, 10 Feb 2021 22:31:12 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Marked as reviewed by gziemski (Committer).
>
> According to Xcode Instruments leak profile, there are 2 minor memory leaks in the Metal rendering pipeline:
> 
> `#1 Malloc 80 Bytes	1	0x7fde0d4247b0	80 Bytes	libjava.dylib	getStringUTF8`
>    0 libsystem_malloc.dylib malloc_zone_malloc
>    1 libsystem_malloc.dylib malloc
>    2 libjava.dylib getStringUTF8 /Volumes/Work/review/2403/jdk/src/java.base/share/native/libjava/jni_util.c:888
>    3 libjava.dylib JNU_GetStringPlatformChars /Volumes/Work/review/2403/jdk/src/java.base/share/native/libjava/jni_util.c:917
>    4 libawt_lwawt.dylib Java_sun_java2d_metal_MTLGraphicsConfig_getMTLConfigInfo /Volumes/Work/review/2403/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m:151
>    5  0x11ab08d48
>    6  0x11ab0250d
> 
> `#2 Malloc 80 Bytes	1	0x7fde0d4325a0	80 Bytes	libjava.dylib	getStringUTF8`
>    0 libsystem_malloc.dylib malloc_zone_malloc
>    1 libsystem_malloc.dylib malloc
>    2 libjava.dylib getStringUTF8 /Volumes/Work/review/2403/jdk/src/java.base/share/native/libjava/jni_util.c:888
>    3 libjava.dylib JNU_GetStringPlatformChars /Volumes/Work/review/2403/jdk/src/java.base/share/native/libjava/jni_util.c:917
>    4 libawt_lwawt.dylib Java_sun_java2d_metal_MTLGraphicsConfig_tryLoadMetalLibrary /Volumes/Work/review/2403/jdk/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m:120
>    5  0x11ab08d48
>    6  0x11ab024c8
> 
> Those can be handled as a followup issues though if you like, it's only 160 bytes total.

> I tried to code review the native implementation files, but Metal APIs is brand new to me and it's been a long while since I worked with graphics API, so I can't be of much help really.
> 
> The code I've looked at looked clean and nothing caught my eye. But it's a partial code review at best.
> 
> Good job!

Every bit helps. Thanks for your review effort!

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

PR: https://git.openjdk.java.net/jdk/pull/2403



More information about the build-dev mailing list