src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
Print this page
*** 42,56 ****
public static class TraceAllocationContext {
public final MoveFactory spillMoveFactory;
public final RegisterAllocationConfig registerAllocationConfig;
public final TraceBuilderResult resultTraces;
! public TraceAllocationContext(MoveFactory spillMoveFactory, RegisterAllocationConfig registerAllocationConfig, TraceBuilderResult resultTraces) {
this.spillMoveFactory = spillMoveFactory;
this.registerAllocationConfig = registerAllocationConfig;
this.resultTraces = resultTraces;
}
}
/**
* Records time spent within {@link #apply}.
--- 42,58 ----
public static class TraceAllocationContext {
public final MoveFactory spillMoveFactory;
public final RegisterAllocationConfig registerAllocationConfig;
public final TraceBuilderResult resultTraces;
+ public final GlobalLivenessInfo livenessInfo;
! public TraceAllocationContext(MoveFactory spillMoveFactory, RegisterAllocationConfig registerAllocationConfig, TraceBuilderResult resultTraces, GlobalLivenessInfo livenessInfo) {
this.spillMoveFactory = spillMoveFactory;
this.registerAllocationConfig = registerAllocationConfig;
this.resultTraces = resultTraces;
+ this.livenessInfo = livenessInfo;
}
}
/**
* Records time spent within {@link #apply}.
*** 65,78 ****
/**
* Records the number of traces allocated with this phase.
*/
private final DebugCounter allocatedTraces;
! private static final class AllocationStatistics {
private final DebugCounter allocatedTraces;
! private AllocationStatistics(Class<?> clazz) {
allocatedTraces = Debug.counter("TraceRA[%s]", clazz);
}
}
private static final ClassValue<AllocationStatistics> counterClassValue = new ClassValue<AllocationStatistics>() {
--- 67,80 ----
/**
* Records the number of traces allocated with this phase.
*/
private final DebugCounter allocatedTraces;
! public static final class AllocationStatistics {
private final DebugCounter allocatedTraces;
! public AllocationStatistics(Class<?> clazz) {
allocatedTraces = Debug.counter("TraceRA[%s]", clazz);
}
}
private static final ClassValue<AllocationStatistics> counterClassValue = new ClassValue<AllocationStatistics>() {
*** 80,94 ****
protected AllocationStatistics computeValue(Class<?> c) {
return new AllocationStatistics(c);
}
};
public TraceAllocationPhase() {
! LIRPhaseStatistics statistics = LIRPhase.statisticsClassValue.get(getClass());
timer = statistics.timer;
memUseTracker = statistics.memUseTracker;
! allocatedTraces = counterClassValue.get(getClass()).allocatedTraces;
}
public final CharSequence getName() {
return LIRPhase.createName(getClass());
}
--- 82,100 ----
protected AllocationStatistics computeValue(Class<?> c) {
return new AllocationStatistics(c);
}
};
+ private static AllocationStatistics getAllocationStatistics(Class<?> c) {
+ return counterClassValue.get(c);
+ }
+
public TraceAllocationPhase() {
! LIRPhaseStatistics statistics = LIRPhase.getLIRPhaseStatistics(getClass());
timer = statistics.timer;
memUseTracker = statistics.memUseTracker;
! allocatedTraces = getAllocationStatistics(getClass()).allocatedTraces;
}
public final CharSequence getName() {
return LIRPhase.createName(getClass());
}
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/trace/TraceAllocationPhase.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File