use of com.ibm.dtfj.javacore.builder.IImageProcessBuilder in project openj9 by eclipse.
the class ParserController method generateImageBuilder.
/**
* @throws BuilderFailureException
*/
private IImageBuilder generateImageBuilder() throws BuilderFailureException {
IImageBuilder imageBuilder = fImageBuilderFactory.generateImageBuilder(DEFAULT_IMAGE_BUILDER);
IImageAddressSpaceBuilder addressSpace = imageBuilder.generateAddressSpaceBuilder(DEFAULT_IMAGE_ADDRESS_SPACE_BUILDER);
IImageProcessBuilder processBuilder = addressSpace.generateImageProcessBuilder(DEFAULT_IMAGE_PROCESS_BUILDER);
processBuilder.generateJavaRuntimeBuilder(DEFAULT_JAVA_RUNTIME_BUILDER);
return imageBuilder;
}
use of com.ibm.dtfj.javacore.builder.IImageProcessBuilder in project openj9 by eclipse.
the class NativeMemorySectionParser method topLevelRule.
protected void topLevelRule() throws ParserException {
IImageProcessBuilder fImageProcessBuilder = fImageBuilder.getCurrentAddressSpaceBuilder().getCurrentImageProcessBuilder();
IJavaRuntimeBuilder fRuntimeBuilder = fImageProcessBuilder.getCurrentJavaRuntimeBuilder();
IAttributeValueMap results = null;
Stack categoryStack = new Stack();
processTagLineOptional(T_0MEMUSER);
while ((results = processMemUserLine()) != null) {
String name = results.getTokenValue(A_NAME);
/* If no name available, this is a spacing line */
if (name == null) {
continue;
}
int depth = results.getIntValue(A_DEPTH);
while (categoryStack.size() >= depth) {
categoryStack.pop();
}
long deepBytes = parseCommaDelimitedLong(results.getTokenValue(A_DEEP_BYTES));
long deepAllocations = parseCommaDelimitedLong(results.getTokenValue(A_DEEP_ALLOCATIONS));
JavaRuntimeMemoryCategory parent = null;
if (categoryStack.size() > 0) {
parent = (JavaRuntimeMemoryCategory) categoryStack.peek();
}
if (name.equals(OTHER_CATEGORY)) {
if (parent == null) {
throw new ParserException("Parse error: Unexpected NULL parent category for \"Other\" memory category");
}
fRuntimeBuilder.setShallowCountersForCategory(parent, deepBytes, deepAllocations);
} else {
JavaRuntimeMemoryCategory category = fRuntimeBuilder.addMemoryCategory(name, deepBytes, deepAllocations, parent);
categoryStack.push(category);
}
}
}
Aggregations