Skip to content

Commit

Permalink
Revert "enable contextual allocation profiler by default" (#5388)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardstartin authored Jun 14, 2023
1 parent 7dc0294 commit 5eb4d6d
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.datadog.profiling.ddprof;

import static datadog.trace.api.Platform.isJ9;
import static datadog.trace.api.Platform.isJavaVersionAtLeast;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_ALLOCATION_ENABLED;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_CONTEXT_ATTRIBUTES;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_CONTEXT_ATTRIBUTES_SPAN_NAME_ENABLED;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DATADOG_PROFILER_ALLOC_ENABLED;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DATADOG_PROFILER_ALLOC_ENABLED_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DATADOG_PROFILER_ALLOC_INTERVAL;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DATADOG_PROFILER_ALLOC_INTERVAL_DEFAULT;
import static datadog.trace.api.config.ProfilingConfig.PROFILING_DATADOG_PROFILER_CPU_ENABLED;
Expand Down Expand Up @@ -132,13 +131,10 @@ public static boolean getWallContextFilter(ConfigProvider configProvider) {
}

public static boolean isAllocationProfilingEnabled(ConfigProvider configProvider) {
// switch on if the datadog allocation profiler is enabled,
// or if generic allocation profiling has been enabled,
// or on any JDK >= 11
return getBoolean(
configProvider,
PROFILING_DATADOG_PROFILER_ALLOC_ENABLED,
getBoolean(configProvider, PROFILING_ALLOCATION_ENABLED, isJavaVersionAtLeast(11)));
PROFILING_DATADOG_PROFILER_ALLOC_ENABLED_DEFAULT);
}

public static boolean isAllocationProfilingEnabled() {
Expand Down

0 comments on commit 5eb4d6d

Please sign in to comment.