Пример #1
0
 protected void printFlagsUsage() {
   System.out.println("    <no option>\tto print same info as Solaris pmap");
   System.out.println("    -heap\tto print java heap summary");
   System.out.println("    -heap:format=b\tto dump java heap in hprof binary format");
   System.out.println("    -histo\tto print histogram of java object heap");
   System.out.println("    -permstat\tto print permanent generation statistics");
   System.out.println("    -finalizerinfo\tto print information on objects awaiting finalization");
   super.printFlagsUsage();
 }
Пример #2
0
  public void run() {
    Tool tool = null;
    switch (mode) {
      case MODE_HEAP_SUMMARY:
        tool = new HeapSummary();
        break;

      case MODE_HISTOGRAM:
        tool = new ObjectHistogram();
        break;

      case MODE_PERMSTAT:
        tool = new PermStat();
        break;

      case MODE_PMAP:
        tool = new PMap();
        break;

      case MODE_HEAP_GRAPH_HPROF_BIN:
        writeHeapHprofBin();
        return;

      case MODE_HEAP_GRAPH_GXL:
        writeHeapGXL();
        return;

      case MODE_FINALIZERINFO:
        tool = new FinalizerInfo();
        break;

      default:
        usage();
        break;
    }

    tool.setAgent(getAgent());
    tool.setDebugeeType(getDebugeeType());
    tool.run();
  }