Skip to content

native-image (built from latest HEAD) not respecting -J-Xmx #3437

@zakkak

Description

@zakkak

Describe the issue
native-image appears to no longer respect -J-Xmx, this used to work in 21.1.0.

Steps to reproduce the issue

  1. Build native-image from source using:
mx --primary-suite-path substratevm --native=native-image --components='Native Image' build
  1. Compare 21.1.0 behavior with freshly built 21.2.0-dev
/opt/jvms/graalvm-ce-java11-21.1.0/bin/native-image HelloWorld
...
[helloworld:1471847]      [total]:  32,831.18 ms,  2.36 GB

/opt/jvms/graalvm-ce-java11-21.1.0/bin/native-image -J-Xmx2g HelloWorld
...
[helloworld:1472430]      [total]:  44,002.89 ms,  1.21 GB

$(mx --primary-suite-path substratevm --native=native-image --components='Native Image' graalvm-home)/bin/native-image HelloWorld
...
[helloworld:1470629]      [total]:  34,848.34 ms,  3.29 GB

$(mx --primary-suite-path substratevm --native=native-image --components='Native Image' graalvm-home)/bin/native-image -J-Xmx2g HelloWorld
...
[helloworld:1472626]      [total]:  46,982.46 ms,  3.30 GB

Describe GraalVM and your environment:

  • GraalVM version: e279970
  • JDK major version: 11
  • OS: Fedora 34
  • Architecture: AMD64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions