Skip to content

Commit

Permalink
8320682: [AArch64] C1 compilation fails with "Field too big for insn"
Browse files Browse the repository at this point in the history
Reviewed-by: thartmann, aph, dlong
  • Loading branch information
dlunde authored and robcasloz committed Dec 14, 2023
1 parent 5a97dbf commit 69014cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 33 deletions.
6 changes: 4 additions & 2 deletions src/hotspot/share/c1/c1_globals.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -275,9 +275,11 @@
develop(bool, InstallMethods, true, \
"Install methods at the end of successful compilations") \
\
/* The compiler assumes, in many places, that methods are at most 1MB. */ \
/* Therefore, we restrict this flag to at most 1MB. */ \
develop(intx, NMethodSizeLimit, (64*K)*wordSize, \
"Maximum size of a compiled method.") \
range(0, max_jint) \
range(0, 1*M) \
\
develop(bool, TraceFPUStack, false, \
"Trace emulation of the FPU stack (intel only)") \
Expand Down
40 changes: 9 additions & 31 deletions test/hotspot/jtreg/compiler/arguments/TestC1Globals.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,13 @@
* questions.
*/

/**
* @test
* @bug 8318817
* @requires vm.debug
* @summary Test flag with large value
*
* @run main/othervm -XX:NMethodSizeLimit=351658240
* compiler.arguments.TestC1Globals
*/

/**
* @test
* @bug 8318817
* @requires vm.debug
* @summary Test flag with large value
*
* @run main/othervm -XX:NMethodSizeLimit=224001703
* compiler.arguments.TestC1Globals
*/

/**
* @test
* @bug 8316653
* @requires vm.debug
* @summary Test flag with max value
* @summary Test flag with max value.
*
* @run main/othervm -XX:NMethodSizeLimit=2147483647
* @run main/othervm -XX:NMethodSizeLimit=1M
* compiler.arguments.TestC1Globals
*/

Expand All @@ -56,25 +36,23 @@
* @bug 8318817
* @requires vm.debug
* @requires os.family == "linux"
* @summary Test flag with large value combined with transparent huge pages on
* @summary Test flag with max value combined with transparent huge pages on
* Linux.
*
* @run main/othervm -XX:NMethodSizeLimit=351658240
* @run main/othervm -XX:NMethodSizeLimit=1M
* -XX:+UseTransparentHugePages
* compiler.arguments.TestC1Globals
*
*/

/**
* @test
* @bug 8318817
* @bug 8320682
* @requires vm.debug
* @requires os.family == "linux"
* @summary Test flag with large value combined with transparent huge pages on
* Linux.
* @summary Test flag with max value and specific compilation.
*
* @run main/othervm -XX:NMethodSizeLimit=224001703
* -XX:+UseTransparentHugePages
* @run main/othervm -XX:NMethodSizeLimit=1M
* -XX:CompileOnly=java.util.HashMap::putMapEntries
* -Xcomp
* compiler.arguments.TestC1Globals
*
*/
Expand Down

1 comment on commit 69014cd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.