RFR: 8254758: Change G1ServiceThread to be task based [v2]

Stefan Johansson sjohanss at openjdk.java.net
Tue Oct 20 07:37:19 UTC 2020


On Tue, 20 Oct 2020 07:23:41 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:

>> Stefan Johansson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Albert review
>
> src/hotspot/share/gc/g1/g1ServiceThread.hpp line 77:
> 
>> 75:   G1ServiceTask* peek();
>> 76:   void add_ordered(G1ServiceTask* task);
>> 77:   bool is_empty();
> 
> I think it is better we call it  a priority queue instead of a list.

Sound good, I'll change it to `G1ServiceTaskQueue` and mention it's a priority queue in the comment.

> src/hotspot/share/gc/g1/g1ServiceThread.hpp line 89:
> 
>> 87:   void stop_service();
>> 88:
>> 89:   int64_t sleep_time();
> 
> Clearer if we have the unit "sleep_time_ms".
> 
> Additionally, the value returned is used by G1ServiceThread::pop_due_task() to determine if the task is ready to run.
> Maybe a comment can indicate this.

Good point, I'll update it.

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

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



More information about the hotspot-gc-dev mailing list