Quantcast

RFR: 8178836: Improve PtrQueue index abstraction

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RFR: 8178836: Improve PtrQueue index abstraction

Kim Barrett
Please review this API cleanup of PtrQueue and related classes.

PtrQueue internally represents buffer indices as byte offsets, so that
generated code for queue insertion doesn't need to deal with scaling.

Most clients (other than the queue insertion code generators) don't
need to know about that representation, and are simplified by dealing
with indices and sizes in the natural units of an array of pointers.

This change eliminates the leakage of the byte offset representation
to those other clients.

CR:
https://bugs.openjdk.java.net/browse/JDK-8178836

Webrev:
http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.00/

Testing:
JPRT
rbt hs-tier2, hs-tier{3,4}-gc


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8178836: Improve PtrQueue index abstraction

Aleksey Shipilev-3
On 04/19/2017 09:05 PM, Kim Barrett wrote:
> Webrev:
> http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.00/

Looks nice.

Minor nits:

*) On first scan, "limit" reads as the loop variable, because it is the only
initialization in init block. Move it out?

 161   for (size_t limit = buffer_size(); i < limit; ++i) {

*) Is there a Unified Logging tag for these?

 185   tty->print_cr("  SATB BUFFER [%s] buf: ...

Thanks,
-Aleksey


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8178836: Improve PtrQueue index abstraction

Kim Barrett
> On Apr 19, 2017, at 3:20 PM, Aleksey Shipilev <[hidden email]> wrote:
>
> On 04/19/2017 09:05 PM, Kim Barrett wrote:
>> Webrev:
>> http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.00/
>
> Looks nice.

Thanks.

> Minor nits:
>
> *) On first scan, "limit" reads as the loop variable, because it is the only
> initialization in init block. Move it out?
>
> 161   for (size_t limit = buffer_size(); i < limit; ++i) {

OK.

> *) Is there a Unified Logging tag for these?
>
> 185   tty->print_cr("  SATB BUFFER [%s] buf: …

This is a print function, for calling from the debugger, and not for logging.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8178836: Improve PtrQueue index abstraction

Kim Barrett
> On Apr 21, 2017, at 7:00 PM, Kim Barrett <[hidden email]> wrote:
>> Minor nits:
>>
>> *) On first scan, "limit" reads as the loop variable, because it is the only
>> initialization in init block. Move it out?
>>
>> 161   for (size_t limit = buffer_size(); i < limit; ++i) {
>
> OK.

Updated webrev:
full: http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.01/
incr: http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.01.inc/


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RFR: 8178836: Improve PtrQueue index abstraction

Kim Barrett
> On Apr 23, 2017, at 1:10 PM, Aleksey Shipilev <[hidden email]> wrote:
>
> On 04/22/2017 07:19 PM, Kim Barrett wrote:
>>> On Apr 21, 2017, at 7:00 PM, Kim Barrett <[hidden email]> wrote:
>>>> Minor nits:
>>>>
>>>> *) On first scan, "limit" reads as the loop variable, because it is the only
>>>> initialization in init block. Move it out?
>>>>
>>>> 161   for (size_t limit = buffer_size(); i < limit; ++i) {
>>>
>>> OK.
>>
>> Updated webrev:
>> full: http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.01/
>> incr: http://cr.openjdk.java.net/~kbarrett/8178836/hotspot.01.inc/
>
> Looks good.
>
> -Aleksey

Thanks.

Loading...