[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR 8159638: Improve array caches and renderer stats in Marlin renderer
From:       Laurent_Bourgès <bourges.laurent () gmail ! com>
Date:       2016-06-21 17:45:32
Message-ID: CAKjRUT5DrBOFRKPzp5twhmO=uN91gd3LR1MbOodJpfH+M_XVtQ () mail ! gmail ! com
[Download RAW message or body]

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=C3=A8s" <bourges.laurent@gmail.com=
> a
=C3=A9crit :

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 RendererStatsHo=
lder
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

[Attachment #3 (text/html)]

<p dir="ltr">Gentle reminder ...</p>
<p dir="ltr">Jim, could you have a first look soon ? </p>
<p dir="ltr">I am busy and will attend a conference next week, so maybe we could \
postpone the review in july. </p> <p dir="ltr">Laurent</p>
<div class="gmail_quote">Le  15 juin 2016 11:10 PM, &quot;Laurent Bourgès&quot; \
&lt;<a href="mailto:bourges.laurent@gmail.com">bourges.laurent@gmail.com</a>&gt; a \
écrit  :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
dir="ltr"><div>Hi,<br><br>Please review this bug fix for the <span>Marlin</span> \
renderer to improve the array caches, its usages but also the renderer stats:<br>bug: \
<a href="https://bugs.openjdk.java.net/browse/JDK-8159638" \
target="_blank">https://bugs.openjdk.java.net/browse/JDK-8159638</a><br></div>webrev: \
<a href="http://cr.openjdk.java.net/~lbourges/marlin/marlin-8159638.0/" \
target="_blank">http://cr.openjdk.java.net/~lbourges/marlin/marlin-8159638.0/</a><br \
clear="all"><div><div><br></div><div>This patch also reduces slightly the memory \
footprint: 1 RendererContext represents now ~ 450K (310K on-heap / 140K \
off-heap).<br></div><div><br></div><div>Changes:<br></div><div>- Byte/Int/Float \
ArrayCache removed<br>- 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)<br><br></div><div>- ArrayCache: \
increased bucket to 8 (larger retained memory but weakly referenced) + added \
CacheStats (and BucketStats)<br><br></div><div>- MarlinProperties: added setiings for \
<span>initial edge capacity and align array sizes to 64 (power of \
2)<br><br></span></div><div><span>- RendererContext: large cleanup + use a weak \
reference for </span><span>the recycled Path2D \
instance<br><br></span></div><div><span>- RendererStats: big refactoring to create \
one </span><span>RendererStats instance per created </span><span>RendererContext \
instance (thread stats) and the new </span><span>RendererStatsHolder class gathers \
all </span><span></span><span>RendererStats instances to dump them at shutdown (very \
small retained memory instead of keeping all </span><span>RendererContext \
instances)</span></div><div><br></div><div>Tested with current jtreg tests (+ my \
MapBench tests)<br><br></div><div>Regards,<br></div><div>Laurent</div></div></div> \
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic