use of com.ibm.j9ddr.tools.ddrinteractive.ICommand in project openj9 by eclipse.
the class GetCommandsTask method run.
/*
* (non-Javadoc)
*
* @see com.ibm.j9ddr.IBootstrapRunnable#run(com.ibm.j9ddr.IVMData,
* java.lang.Object[])
*/
public void run(IVMData vmData, Object[] userData) {
Object[] passbackArray = (Object[]) userData[0];
Object loader = (Object) passbackArray[1];
List<ICommand> toPassBack = getBaseJVMCommands();
toPassBack.add(new StackWalkCommand());
toPassBack.add(new StructureCommand());
toPassBack.add(new ThreadsCommand());
toPassBack.add(new ACCommand());
toPassBack.add(new AllClassesCommand());
toPassBack.add(new ITableSizeCommand());
toPassBack.add(new BuildFlagsCommand());
toPassBack.add(new WalkInternTableCommand());
toPassBack.add(new ClassForNameCommand());
toPassBack.add(new DumpAllClassloadersCommand());
toPassBack.add(new DumpAllRegionsCommand());
toPassBack.add(new DumpAllSegmentsCommand());
toPassBack.add(new FindOverlappingSegmentsCommand());
toPassBack.add(new FindStackValueCommand());
toPassBack.add(new VmCheckCommand());
toPassBack.add(new DumpRomClassCommand());
toPassBack.add(new WhatIsCommand());
toPassBack.add(new DumpRamClassLinearCommand());
toPassBack.add(new DumpRomClassLinearCommand());
toPassBack.add(new DumpRomMethodCommand());
toPassBack.add(new DumpAllRomClassLinearCommand());
toPassBack.add(new DumpAllRamClassLinearCommand());
toPassBack.add(new VMConstantPoolCommand());
toPassBack.add(new J9VTablesCommand());
toPassBack.add(new MethodForNameCommand());
toPassBack.add(new BytecodesCommand());
toPassBack.add(new FindPatternCommand());
toPassBack.add(new JitMetadataFromPcCommand());
toPassBack.add(new FindMethodFromPcCommand());
toPassBack.add(new DumpSegmentsInListCommand());
toPassBack.add(new J9StaticsCommand());
toPassBack.add(new JitstackCommand());
toPassBack.add(new LocalMapCommand());
toPassBack.add(new StackmapCommand());
toPassBack.add(new J9ClassShapeCommand());
toPassBack.add(new FindVMCommand());
toPassBack.add(new ShrCCommand());
toPassBack.add(new QueryRomClassCommand());
toPassBack.add(new RamClassSummaryCommand());
toPassBack.add(new RomClassSummaryCommand());
toPassBack.add(new ClassloadersSummaryCommand());
toPassBack.add(new ExtendedMethodFlagInfoCommand());
toPassBack.add(new AnalyseRomClassUTF8Command());
toPassBack.add(new J9MemTagCommands());
toPassBack.add(new CompressedRefMappingCommand());
toPassBack.add(new ShowDumpAgentsCommand());
toPassBack.add(new NativeMemInfoCommand());
toPassBack.add(new SetVMCommand());
toPassBack.add(new TraceConfigCommand());
toPassBack.add(new WalkJ9PoolCommand());
toPassBack.add(new J9RegCommand());
toPassBack.add(new CoreInfoCommand());
toPassBack.add(new GCCheckCommand());
toPassBack.add(new DumpStringTableCommand());
toPassBack.add(new SearchStringTableCommand());
toPassBack.add(new RomClassForNameCommand());
toPassBack.add(new RuntimeSettingsCommand());
toPassBack.add(new RootPathCommand());
toPassBack.add(new HashCodeCommand());
toPassBack.add(new MonitorsCommand());
toPassBack.add(new MarkMapCommand());
toPassBack.add(new DumpSegregatedStatsCommand());
toPassBack.add(new ObjectSizeInfo());
toPassBack.add(new DumpContendedLoadTable());
loadPlugins(toPassBack, loader);
passbackArray[0] = toPassBack;
}
use of com.ibm.j9ddr.tools.ddrinteractive.ICommand in project openj9 by eclipse.
the class DDRInteractiveClassLoader method examineClass.
/**
* Check to see if a class has the version annotation and if so whether it matches the version of the currently
* running vm.
*
* @param url
* @param clazz
*/
@SuppressWarnings("unchecked")
private void examineClass(URL url, Class<?> clazz) {
if (clazz.isAnnotationPresent(DebugExtension.class)) {
Annotation a = clazz.getAnnotation(DebugExtension.class);
if (null != a) {
String value = ((DebugExtension) a).VMVersion();
String[] versions = value.split(",");
for (String version : versions) {
if (version.equals(vmversion) || version.equals(VM_ALLVERSIONS)) {
if (hasCommandIFace(clazz)) {
PluginConfig config = new PluginConfig(clazz.getName(), vmversion, (Class<ICommand>) clazz, true, url);
pluginCache.add(config);
logger.fine("Added command " + clazz.getName());
} else {
logger.fine("Skipping annotated command which did not implement the ICommand interface : " + clazz.getName());
}
} else {
String msg = String.format("Skipping %s as wrong VM version [allowed = %s, * : actual = %s]", clazz.getName(), vmversion, version);
logger.fine(msg);
}
}
}
}
}
Aggregations