RFR(S): 8222103: [testbug] compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest may exceed VM limit
Nils Eliasson
nils.eliasson at oracle.com
Tue Apr 9 11:55:19 UTC 2019
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>
> *Sent:* Montag, 8. April 2019 19:25
> *To:* Januschke, Peter <peter.januschke at sap.com>
> *Cc:* 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
>
> 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/b6caabc3/attachment.html>
More information about the hotspot-compiler-dev
mailing list