jvmti.forceReleaseOnSoftReferences();
jvmti.forceGC();
Class clazz = jvmti.getClassByName(className);
if (clazz!=null)
{
jvmti.heapSnapshot("snapshot", "mem");
clazz=null;
Object[] objects = jvmti.getAllObjects(className);
System.out.println("============> Instances of " + className + " " + objects.length);
//String report =jvmti.exploreClassReferences(className, 15, true, false, false, false, true);