コード例 #1
0
ファイル: JMap.java プロジェクト: OS2World/LIB-JAVA-OpenJDK
  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();
  }