RFR: 8213177: GlobalCounter::CSContext could be an enum class [v2]
Kim Barrett
kbarrett at openjdk.java.net
Wed Mar 10 19:08:15 UTC 2021
On Wed, 10 Mar 2021 19:02:30 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
>> Please review this small change for JDK-8213177. The change was regression tested with Mach5 tiers 1 and 2 on Linux, Windows, and Mac OS, and Mach5 tiers 3-5 on Linux x64.
>>
>> Thanks, Harold
>
> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix comments
Marked as reviewed by kbarrett (Reviewer).
src/hotspot/share/utilities/globalCounter.hpp line 71:
> 69: // The type of the critical section context passed from
> 70: // critical_section_begin() to critical_section_end().
> 71: enum class CSContext : uintx {}; // [COUNTER_ACTIVE, COUNTER_INCREMENT)
This enum declaration instead of the typedef is all that's needed. The range comment is incorrect.
src/hotspot/share/utilities/globalCounter.hpp line 95:
> 93: };
> 94:
> 95: ENUMERATOR_VALUE_RANGE(GlobalCounter::CSContext,
There is not, so far as I know, any use-case for iteration over CSContext values. And those two don't define the range of such. They are not declared as CSContext values, nor should they be.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2895
More information about the hotspot-dev
mailing list