Skip to content

Commit

Permalink
TrackNodeSourcePosition only with -O0.
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Jan 3, 2023
1 parent f8a5beb commit ab58edb
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

import static com.oracle.svm.core.option.RuntimeOptionKey.RuntimeOptionKeyFlag.Immutable;
import static com.oracle.svm.core.option.RuntimeOptionKey.RuntimeOptionKeyFlag.RelevantForCompilationIsolates;
import static org.graalvm.compiler.core.common.GraalOptions.TrackNodeSourcePosition;
import static org.graalvm.compiler.core.common.SpectrePHTMitigations.None;
import static org.graalvm.compiler.core.common.SpectrePHTMitigations.Options.SpectrePHTBarriers;
import static org.graalvm.compiler.options.OptionType.Debug;
Expand Down Expand Up @@ -203,6 +202,7 @@ public enum OptimizationLevel {
@Override
protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String oldValue, String newValue) {
OptimizationLevel newLevel = parseOptimizationLevel(newValue);
GraalOptions.TrackNodeSourcePosition.update(values, newLevel == OptimizationLevel.O0);
SubstrateOptions.IncludeNodeSourcePositions.update(values, newLevel == OptimizationLevel.O0);
SubstrateOptions.SourceLevelDebug.update(values, newLevel == OptimizationLevel.O0);
SubstrateOptions.AOTTrivialInline.update(values, newLevel != OptimizationLevel.O0);
Expand Down Expand Up @@ -644,8 +644,6 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, Integer o
};

public static void defaultDebugInfoValueUpdateHandler(EconomicMap<OptionKey<?>, Object> values, Integer newValue) {
/* Force update of TrackNodeSourcePosition */
TrackNodeSourcePosition.update(values, newValue > 0);
if (OS.WINDOWS.isCurrent()) {
/* Keep symbols on Windows. The symbol table is part of the pdb-file. */
DeleteLocalSymbols.update(values, newValue == 0);
Expand Down

0 comments on commit ab58edb

Please sign in to comment.