Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
liufengyun committed Jul 31, 2023
1 parent bb36753 commit 8cb5409
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public void scanBootImageHeapRoots(Comparator<AnalysisField> fieldComparator, Co
Map<JavaConstant, BytecodePosition> embeddedRoots = bb.getUniverse().getEmbeddedRoots();
if (embeddedRootComparator != null) {
embeddedRoots.entrySet().stream()
.sorted(Map.Entry.comparingByValue(embeddedRootComparator))
.forEach(entry -> execute(() -> scanEmbeddedRoot(entry.getKey(), entry.getValue())));
.sorted(Map.Entry.comparingByValue(embeddedRootComparator))
.forEach(entry -> execute(() -> scanEmbeddedRoot(entry.getKey(), entry.getValue())));
} else {
embeddedRoots.forEach((key, value) -> execute(() -> scanEmbeddedRoot(key, value)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
import java.io.StringWriter;
import java.util.List;

import com.oracle.graal.pointsto.reports.ObjectTreePrinter;
import com.oracle.graal.pointsto.reports.ReportUtils;
import com.oracle.svm.core.option.HostedOptionKey;
import com.oracle.svm.core.option.LocatableMultiOptionValue;
import org.graalvm.compiler.debug.MethodFilter;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionValues;

import com.oracle.graal.pointsto.BigBang;
import com.oracle.graal.pointsto.meta.AnalysisElement;
import com.oracle.graal.pointsto.meta.AnalysisField;
import com.oracle.graal.pointsto.meta.AnalysisMethod;
import com.oracle.graal.pointsto.meta.AnalysisType;
import com.oracle.graal.pointsto.reports.ObjectTreePrinter;
import com.oracle.graal.pointsto.reports.ReportUtils;
import com.oracle.graal.pointsto.util.AnalysisError;
import org.graalvm.compiler.options.Option;
import org.graalvm.compiler.options.OptionValues;
import com.oracle.svm.core.option.HostedOptionKey;
import com.oracle.svm.core.option.LocatableMultiOptionValue;

public final class ReachabilityTracePrinter {
public static class Options {
Expand All @@ -67,10 +67,10 @@ public static void report(String imageName, OptionValues options, String reports
if (count > 0) {
String trace = stringWriter.toString();
ReportUtils.report("trace for types", reportsPath, "trace_types_" + baseImageName, "txt",
writer -> writer.print(trace));
String abortOnTypeReachableOption = "-H:" + Options.AbortOnTypeReachable.getName() + "=" + String.join(",", typePatterns);
writer -> writer.print(trace));
String abortOnTypeReachableOption = "-H:" + Options.AbortOnTypeReachable.getName() + "=" + String.join(",", typePatterns);
String message = "Image building is interrupted as the types specified via " + abortOnTypeReachableOption +
" are reachable. See the generated report for a complete reachability trace.";
" are reachable. See the generated report for a complete reachability trace.";
consoleMessageBuilder.append(message);
}
}
Expand All @@ -82,10 +82,10 @@ public static void report(String imageName, OptionValues options, String reports
if (count > 0) {
String trace = stringWriter.toString();
ReportUtils.report("trace for methods", reportsPath, "trace_methods_" + baseImageName, "txt",
writer -> writer.print(trace));
writer -> writer.print(trace));
String abortOnMethodReachableOption = "-H:" + Options.AbortOnMethodReachable.getName() + "=" + String.join(",", methodPatterns);
String message = "Image building is interrupted as the methods specified via " + abortOnMethodReachableOption +
" are reachable. See the generated report for a complete reachability trace.";
" are reachable. See the generated report for a complete reachability trace.";
consoleMessageBuilder.append(message);
}
}
Expand All @@ -97,10 +97,10 @@ public static void report(String imageName, OptionValues options, String reports
if (count > 0) {
String trace = stringWriter.toString();
ReportUtils.report("trace for fields", reportsPath, "trace_fields_" + baseImageName, "txt",
writer -> writer.print(trace));
String abortOnFieldReachableOption = "-H:" + Options.AbortOnFieldReachable.getName() + "=" + String.join(",", fieldPatterns);
writer -> writer.print(trace));
String abortOnFieldReachableOption = "-H:" + Options.AbortOnFieldReachable.getName() + "=" + String.join(",", fieldPatterns);
String message = "Image building is interrupted as the fields specified via " + abortOnFieldReachableOption +
" are reachable. See the generated report for a complete reachability trace.";
" are reachable. See the generated report for a complete reachability trace.";
consoleMessageBuilder.append(message);
}
}
Expand Down

0 comments on commit 8cb5409

Please sign in to comment.