Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native coverage instrumentation #220

Open
sgammon opened this issue Jan 2, 2024 · 1 comment
Open

Native coverage instrumentation #220

sgammon opened this issue Jan 2, 2024 · 1 comment
Labels
bug Something isn't working native-image Features and issues relating to the Native Image tool
Milestone

Comments

@sgammon
Copy link
Owner

sgammon commented Jan 2, 2024

Currently, building a Native Image target with coverage enabled yields a nasty error, which boils down to:

Caused by: java.lang.NoClassDefFoundError: org/jacoco/agent/rt/internal_43a39aa/Offline
	at jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVM.resolvePossiblyCachedConstantInPool(Native Method)
	at jdk.internal.vm.ci/jdk.vm.ci.hotspot.CompilerToVM.resolvePossiblyCachedConstantInPool(CompilerToVM.java:283)
	at jdk.internal.vm.ci/jdk.vm.ci.hotspot.HotSpotConstantPool.lookupConstant(HotSpotConstantPool.java:668)
	at jdk.internal.vm.compiler/org.graalvm.compiler.serviceprovider.GraalServices.lookupConstant(GraalServices.java:484)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.lookupConstant(BytecodeParser.java:4395)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.lookupConstant(SharedGraphBuilderPhase.java:221)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.genLoadConstant(BytecodeParser.java:3991)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:5277)
	at jdk.internal.vm.compiler/org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3431)
	... 57 more
Caused by: java.lang.ClassNotFoundException: org.jacoco.agent.rt.internal_43a39aa.Offline
	... 66 more

We probably need to inject Jacoco.

@sgammon sgammon added bug Something isn't working native-image Features and issues relating to the Native Image tool labels Jan 2, 2024
@sgammon sgammon added this to the 1.0.0 milestone Jan 2, 2024
@sgammon
Copy link
Owner Author

sgammon commented Jan 14, 2024

Probably depends on bazelbuild/bazel#12714

sgammon added a commit that referenced this issue Jan 14, 2024
Relates-To: #220
Relates-To: bazelbuild/bazel#12714
Signed-off-by: Sam Gammon <sam@elide.ventures>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working native-image Features and issues relating to the Native Image tool
Projects
Status: In Progress
Development

No branches or pull requests

1 participant