use of com.ibm.j9ddr.vm29.pointer.generated.J9VMInitArgsPointer in project openj9 by eclipse.
the class DTFJJavaVMInitArgs method loadData.
private void loadData() {
if (// cache has been populated
isCachePopulated || isCorrupt)
return;
// obtain the vm init args, logic copied from javadump.cpp so dtfj output
// matches javacore output.
J9VMInitArgsPointer args = null;
try {
args = DTFJContext.getVm().vmArgsArray();
ignoreFlag = !args.actualVMArgs().ignoreUnrecognized().eq(0);
version = args.actualVMArgs().version().intValue();
} catch (Throwable t) {
isCorrupt = true;
cdata = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
}
if (isCorrupt) {
// structure is fundamentally unusable
// prevent continual reloading
isCachePopulated = true;
return;
}
// now see if we can extract the options
try {
int optionCount = args.nOptions().intValue();
JavaVMOptionPointer option = args.actualVMArgs().options();
for (int i = 0; i < optionCount; i++) {
try {
DTFJJavaVMOption vmoption = new DTFJJavaVMOption(option);
options.add(vmoption);
if (log.isLoggable(Level.FINE)) {
try {
log.fine(String.format("Found VM option %s", vmoption.getOptionString()));
} catch (Exception e) {
log.warning(e.getMessage());
}
}
option = option.add(1);
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
options.add(cd);
}
}
} catch (Throwable t) {
CorruptData cd = J9DDRDTFJUtils.handleAsCorruptData(DTFJContext.getProcess(), t);
corruptCache = corruptIterator(cd);
}
// prevent continual reloading
isCachePopulated = true;
}
Aggregations