RFR(S): 8222103: [testbug] compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit
Igor Ignatyev
igor.ignatyev at oracle.com
Tue Apr 9 16:30:24 UTC 2019
Nils,
thanks for the clarification.
Peter,
I haven't looked at these tests for quite a while, and, I guess, presence of 'jcmd' in the path got me confused, so I (now obviously) incorrectly assumed that the directives are added by jcmd. in this case, I agree that it is a test bug. I'd however prefer it to be fixed slightly different and instead of adding 'CompilerDirectivesLimit to command line I'd read its value using WhiteBox and limit ClearDirectivesFileStackTest::AMOUNT by it.
you'll also need to update year in the copyright notice.
Thanks,
-- Igor
> On Apr 9, 2019, at 4:55 AM, Nils Eliasson <nils.eliasson at oracle.com> wrote:
>
> Hi,
>
> The design is that you add a number of directives together to get a desired behavior. Adding just some of them make no sense.
>
> If you add directives by command line, and get an error (syntax or limit) - it will print the error stop the startup. This allows the user to correct the problem and retry.
>
> If you add by jcmd, the error is printed on the jcmd console, but the VM continues on unaffected. The user can correct the problem and make another try.
>
> I think there is a separate test of the limit. And if that is already covered, testing it in this test too, seems unnecessary.
>
> Regards,
>
> // Nils
>
>
>
> On 2019-04-09 11:34, Januschke, Peter wrote:
>> Hi Igor,
>>
>> the current implementation prints a message and then stops:
>>
>> bool DirectivesStack::check_capacity(int request_size, outputStream* st) {
>> if ((request_size + _depth) > CompilerDirectivesLimit) {
>> st->print_cr("Could not add %i more directives. Currently %i/%i directives.", request_size, _depth, CompilerDirectivesLimit);
>> return false;
>> }
>> return true;
>> }
>>
>> Best regards
>>
>> Peter
>>
>> From: Igor Ignatyev <igor.ignatyev at oracle.com> <mailto:igor.ignatyev at oracle.com>
>> Sent: Montag, 8. April 2019 19:25
>> To: Januschke, Peter <peter.januschke at sap.com> <mailto:peter.januschke at sap.com>
>> Cc: hotspot-compiler-dev at openjdk.java.net <mailto:hotspot-compiler-dev at openjdk.java.net>
>> Subject: Re: RFR(S): 8222103: [testbug] compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit
>>
>> Hi Peter,
>>
>> I don't think it's a test bug, VM shouldn't stop execution if someone requests too many compiler directives, instead it should reject requests which will exceed its capacity.
>>
>> -- Igor
>>
>>
>> On Apr 8, 2019, at 1:18 AM, Januschke, Peter <peter.januschke at sap.com <mailto:peter.januschke at sap.com>> wrote:
>>
>> Hi,
>>
>> I propose the following fix to the test mentioned in the subject:
>>
>> Problem:
>> The test generates a random number of compiler directives, which might be greater than the value of CompilerDirectivesLimit. This causes the VM to stop execution upon the corresponding capacity check.
>>
>> Fix: set CompilerDirectivesLimit to the max random number used.
>>
>> http://cr.openjdk.java.net/~goetz/wr19/peter/8222103-01 <http://cr.openjdk.java.net/~goetz/wr19/peter/8222103-01>
>>
>> https://bugs.openjdk.java.net/browse/JDK-8222103 <https://bugs.openjdk.java.net/browse/JDK-8222103>
>>
>> Please review, and I please need a sponsor.
>>
>> Best regards
>>
>> Peter
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20190409/19207445/attachment.html>
More information about the hotspot-compiler-dev
mailing list