Integrated: JDK-8310316: Failing HotSpot Compiler directives are too verbose
    Eric Nothum 
    duke at openjdk.org
       
    Mon Jul 24 09:19:48 UTC 2023
    
    
  
On Thu, 20 Jul 2023 15:04:28 GMT, Eric Nothum <duke at openjdk.org> wrote:
> Previously jcmd printed the whole file if a compiler directive was added that was not in json format. This example illustrates the issue:
> 
> 
> ./jcmd 331311 Compiler.directives_add ./example.txt
> 331311:
> Syntax error on line 1 byte 1: Json must start with an object or an array.
>   At 'This'.
> This is my very interesting text,
> followed by some more exciting text.
> 
> Parsing of compiler directives failed
> Could not load file: ./example.txt
> 
> The json error message is not printed if the silent field is set in the `DirectivesParser` object.
> The proposed change adds a boolean parameter silent that is propagated from `CompilerDirectivesAddDCmd::execute` to the `DirectivesParser` constructor. The default value for the new parameter is set to false, which represents the original behavior. In case where a compiler directive is added, the parameter is set to true and the error message will be reduced.
> 
> The proposed change reduces the error message to:
> 
> 
> ./jcmd 335703 Compiler.directives_add ./example.txt
> 335703:
> Parsing of compiler directives failed
> Could not load file: ./example.txt
This pull request has now been integrated.
Changeset: 04f39e1f
Author:    Eric Nothum <eric.nothum at oracle.com>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/04f39e1f1e0e6c8adf75f59792f4f5b2496f7a31
Stats:     10 lines in 3 files changed: 0 ins; 0 del; 10 mod
8310316: Failing HotSpot Compiler directives are too verbose
Reviewed-by: thartmann, chagedorn
-------------
PR: https://git.openjdk.org/jdk/pull/14957
    
    
More information about the hotspot-compiler-dev
mailing list