Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void methodAdvice(MethodTransformer transformer) {
@Override
public String[] helperClassNames() {
return new String[] {
packageName + ".Target_com_datadog_profiling_agent_ProcessContext",
packageName + ".Target_datadog_jctools_util_UnsafeRefArrayAccess",
packageName + ".Target_org_datadog_jmxfetch_App",
packageName + ".Target_org_datadog_jmxfetch_Status",
Expand All @@ -50,6 +51,7 @@ public String[] muzzleIgnoredClassNames() {
"jdk.vm.ci.meta.ResolvedJavaType",
"jdk.vm.ci.meta.ResolvedJavaField",
// ignore helper class names as usual
packageName + ".Target_com_datadog_profiling_agent_ProcessContext",
packageName + ".Target_datadog_jctools_util_UnsafeRefArrayAccess",
packageName + ".Target_org_datadog_jmxfetch_App",
packageName + ".Target_org_datadog_jmxfetch_Status",
Expand All @@ -60,6 +62,7 @@ public String[] muzzleIgnoredClassNames() {
public static class FindTargetClassesAdvice {
@Advice.OnMethodExit(suppress = Throwable.class)
public static void onExit(@Advice.Return(readOnly = false) List<Class<?>> result) {
result.add(Target_com_datadog_profiling_agent_ProcessContext.class);
result.add(Target_datadog_jctools_util_UnsafeRefArrayAccess.class);
result.add(Target_org_datadog_jmxfetch_App.class);
result.add(Target_org_datadog_jmxfetch_Status.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package datadog.trace.instrumentation.graal.nativeimage;

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import datadog.trace.bootstrap.config.provider.ConfigProvider;

@TargetClass(className = "com.datadog.profiling.agent.ProcessContext")
public final class Target_com_datadog_profiling_agent_ProcessContext {
@Substitute
public static void register(ConfigProvider configProvider) {
// This method references com.datadoghq.profiler.OTelContext which is not available
// during native image build. OTelContext is part of the ddprof native library that's
// loaded at runtime. For native image builds, profiling context registration is disabled.
// No-op during native image build.
}
}