use of com.ibm.j9ddr.vm29.pointer.generated.J9RASdumpQueuePointer in project openj9 by eclipse.
the class ShowDumpAgentsCommand method seekDumpAgent.
private J9RASdumpAgentPointer seekDumpAgent(J9JavaVMPointer vm, J9RASdumpAgentPointer agentPtr, J9RASdumpFunctionsPointer dumpFn) throws CorruptDataException {
J9RASdumpFunctionsPointer func = vm.j9rasDumpFunctions();
J9RASdumpQueuePointer queue = J9RASdumpQueuePointer.cast(func);
// Windows 64 bit returns a key of 0xFFFFFFFFFACADEDC
// Other 64 bit platforms return 0x00000000FACADEDC.
// Mask off the top bits since the key is 32 bits anyway.
UDATA reserved = UDATA.roundToSizeofU32(UDATA.cast(queue.facade().reserved()));
reserved = reserved.bitAnd(0x00000000FFFFFFFFl);
if (!DUMP_FACADE_KEY.equals(reserved)) {
// Dump functions have not been configured. (-Xdump:none was probably specified.)#
return null;
}
/*
* Sanity check
*/
if (!queue.isNull()) {
J9RASdumpAgentPointer node = agentPtr;
/* Start from next agent, else start from the beginning */
node = (node != null && !node.isNull()) ? node.nextPtr() : queue.agents();
/* Agents with same dumpFn will be found in priority order */
while (node != null && !node.isNull() && dumpFn != null && !dumpFn.isNull() && node.dumpFn().getAddress() != dumpFn.getAddress()) {
node = node.nextPtr();
}
/* Update the current position */
agentPtr = node;
return node;
}
/* Blank current position */
agentPtr = J9RASdumpAgentPointer.NULL;
return agentPtr;
}
Aggregations