RFR (S): 8184073: Cleanup of compiler activity enum in compileBroker.hpp
Erik Österlund
erik.osterlund at oracle.com
Tue Jul 11 09:09:54 UTC 2017
Hi Kim,
Thanks for the review.
/Erik
On 2017-07-11 04:56, Kim Barrett wrote:
>> On Jul 10, 2017, at 11:06 AM, Erik Österlund <erik.osterlund at oracle.com> wrote:
>>
>> Hi,
>>
>> Bug:
>> https://bugs.openjdk.java.net/browse/JDK-8184073
>>
>> Webrev:
>> http://cr.openjdk.java.net/~eosterlund/8184073/webrev.00/
>>
>> This is a small cleanup to fix two problems with an unnamed enum in compileBroker.hpp:
>>
>> enum {
>> // Flags for toggling compiler activity
>> stop_compilation = 0,
>> run_compilation = 1,
>> shutdown_compilaton = 2
>> };
>>
>> 1) This is an unnamed enum. That means it can not be passed to template functions. It is passed to Atomic::xchg, and there are plans to make Atomic use templates, which is blocked by this unnamed enum, and this enum alone. Therefore I have given it a name describing the values: "CompilerActivity".
>> 2) The "shutdown_compilaton" value is misspelled and since I am touching this code, I feel it is my responsibility to correct that. And so I did.
>>
>> Testing: JPRT.
>>
>> Thanks,
>> /Erik
> I wonder why it is using Atomic::xchg and ignoring the old value, rather than (say) release_store[_fence]?
> But I’m fine with it staying like that.
>
> Looks good to me.
>
More information about the hotspot-compiler-dev
mailing list