[OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer
Laurent Bourgès
bourges.laurent at gmail.com
Tue Jun 21 17:45:32 UTC 2016
Gentle reminder ...
Jim, could you have a first look soon ?
I am busy and will attend a conference next week, so maybe we could
postpone the review in july.
Laurent
Le 15 juin 2016 11:10 PM, "Laurent Bourgès" <bourges.laurent at gmail.com> a
écrit :
Hi,
Please review this bug fix for the Marlin renderer to improve the array
caches, its usages but also the renderer stats:
bug: https://bugs.openjdk.java.net/browse/JDK-8159638
webrev: http://cr.openjdk.java.net/~lbourges/marlin/marlin-8159638.0/
This patch also reduces slightly the memory footprint: 1 RendererContext
represents now ~ 450K (310K on-heap / 140K off-heap).
Changes:
- Byte/Int/Float ArrayCache removed
- replaced by Clean[Byte/Int/Float]ArrayCache (zero-filled arrays) and
Dirty[Byte/Int/Float]ArrayCache classes (dirty arrays). These new classes
provides a Reference class that wraps the initial array and acts as a proxy
to the related array cache instance (get/widen//put Array)
- ArrayCache: increased bucket to 8 (larger retained memory but weakly
referenced) + added CacheStats (and BucketStats)
- MarlinProperties: added setiings for initial edge capacity and align
array sizes to 64 (power of 2)
- RendererContext: large cleanup + use a weak reference for the recycled
Path2D instance
- RendererStats: big refactoring to create one RendererStats instance per
created RendererContext instance (thread stats) and the new RendererStatsHolder
class gathers all RendererStats instances to dump them at shutdown (very
small retained memory instead of keeping all RendererContext instances)
Tested with current jtreg tests (+ my MapBench tests)
Regards,
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20160621/8d21e8f1/attachment.html>
More information about the 2d-dev
mailing list