use of com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer in project openj9 by eclipse.
the class ACCommand method dumpACForObject.
public void dumpACForObject(J9JavaVMPointer vm, StructurePointer objectPointer, PrintStream out) throws CorruptDataException {
if (GCExtensions.isVLHGC()) {
if ((null != objectPointer) && !objectPointer.isNull()) {
/* get the object's region */
GCHeapRegionDescriptor region = heapRegionManager.regionDescriptorForAddress(objectPointer);
if (null != region) {
MM_HeapRegionDescriptorVLHGCPointer vlhgcRegionPointer = MM_HeapRegionDescriptorVLHGCPointer.cast(region.getHeapRegionDescriptorPointer());
/* get the region's owning allocation context */
StructurePointer act = vlhgcRegionPointer._allocateData()._owningContext().getAsRuntimeType();
out.println("Object's owning context: " + act.formatShortInteractive());
}
}
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer in project openj9 by eclipse.
the class ThreadsCommand method search.
private void search(PrintStream out, UDATA tid) throws DDRInteractiveCommandException {
try {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
J9VMThreadPointer mainThread = vm.mainThread();
if (mainThread.notNull()) {
J9VMThreadPointer threadCursor = vm.mainThread();
do {
if (threadCursor.osThread().tid().eq(tid)) {
out.println(String.format("\t!stack 0x%08x\t!j9vmthread 0x%08x\t!j9thread 0x%08x\ttid 0x%x (%d) // %s", threadCursor.getAddress(), threadCursor.getAddress(), threadCursor.osThread().getAddress(), threadCursor.osThread().tid().longValue(), threadCursor.osThread().tid().longValue(), getThreadName(threadCursor)));
break;
}
threadCursor = threadCursor.linkNext();
} while (!threadCursor.eq(mainThread));
}
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer in project openj9 by eclipse.
the class ThreadsCommand method flags.
private void flags(PrintStream out) throws DDRInteractiveCommandException {
try {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
J9VMThreadPointer mainThread = vm.mainThread();
if (mainThread.notNull()) {
J9VMThreadPointer threadCursor = vm.mainThread();
do {
out.append(String.format(" !j9vmthread 0x%s publicFlags=%s privateFlags=%s // %s", Long.toHexString(threadCursor.getAddress()), Long.toHexString(threadCursor.publicFlags().longValue()), Long.toHexString(threadCursor.privateFlags().longValue()), getThreadName(threadCursor)));
out.append(nl);
threadCursor = threadCursor.linkNext();
} while (!threadCursor.eq(mainThread));
}
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer in project openj9 by eclipse.
the class ThreadsCommand method trace.
private void trace(PrintStream out) throws DDRInteractiveCommandException {
try {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
J9VMThreadPointer mainThread = vm.mainThread();
if (mainThread.notNull()) {
J9VMThreadPointer threadCursor = vm.mainThread();
do {
out.append(String.format(" !stack 0x%s !j9vmthread 0x%s !j9thread 0x%s tid 0x%s (%d) !utthreaddata 0x%s // %s", Long.toHexString(threadCursor.getAddress()), Long.toHexString(threadCursor.getAddress()), Long.toHexString(threadCursor.osThread().getAddress()), Long.toHexString(threadCursor.osThread().tid().longValue()), threadCursor.osThread().tid().longValue(), Long.toHexString(threadCursor.omrVMThread()._trace$uteThread().getAddress()), getThreadName(threadCursor)));
out.append(nl);
threadCursor = threadCursor.linkNext();
} while (!threadCursor.eq(mainThread));
}
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer in project openj9 by eclipse.
the class ThreadsCommand method stack.
private void stack(PrintStream out, Context context, String command) throws DDRInteractiveCommandException {
try {
J9JavaVMPointer vm = J9RASHelper.getVM(DataType.getJ9RASPointer());
J9VMThreadPointer mainThread = vm.mainThread();
StackWalkCommand walkCommand = new StackWalkCommand();
if (mainThread.notNull()) {
J9VMThreadPointer threadCursor = vm.mainThread();
do {
out.println(String.format("\t!stack 0x%08x\t!j9vmthread 0x%08x\t!j9thread 0x%08x\ttid 0x%x (%d) // %s", threadCursor.getAddress(), threadCursor.getAddress(), threadCursor.osThread().getAddress(), threadCursor.osThread().tid().longValue(), threadCursor.osThread().tid().longValue(), getThreadName(threadCursor)));
out.append(nl);
walkCommand.run(command, new String[] { Long.toString(threadCursor.getAddress()) }, context, out);
out.append(nl);
threadCursor = threadCursor.linkNext();
} while (!threadCursor.eq(mainThread));
}
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
Aggregations