use of com.ibm.j9ddr.vm29.pointer.generated.RasGlobalStoragePointer in project openj9 by eclipse.
the class TraceConfigCommand method run.
public void run(String command, String[] args, Context context, final PrintStream out) throws DDRInteractiveCommandException {
try {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
// !RasGlobalStorage
RasGlobalStoragePointer rasGlobal = RasGlobalStoragePointer.cast(vm.j9rasGlobalStorage());
// !UtGlobalData
UtGlobalDataPointer utGlobal = UtGlobalDataPointer.cast(rasGlobal.utGlobalData());
// !UtComponentList componentList
UtComponentListPointer componentList = utGlobal.componentList();
// !UtComponentData head
UtComponentDataPointer head = componentList.head();
if (args.length == 0) {
walkTraceComponents(new ModuleVisitor() {
public void visit(UtModuleInfoPointer modInfo) throws CorruptDataException {
out.println(moduleName(modInfo));
}
}, head, context, out);
} else if ("all".equals(args[0])) {
walkTraceComponents(new ModuleVisitor() {
public void visit(UtModuleInfoPointer modInfo) throws CorruptDataException {
printActiveTracePoints(modInfo, out);
}
}, head, context, out);
} else {
for (int i = 0; i < args.length; i++) {
final String componentName = args[i];
walkTraceComponents(new ModuleVisitor() {
public void visit(UtModuleInfoPointer modInfo) throws CorruptDataException {
if (componentName.equals(moduleName(modInfo))) {
printActiveTracePoints(modInfo, out);
}
}
}, head, context, out);
}
}
} catch (CorruptDataException e) {
e.printStackTrace();
}
}
Aggregations