5 Replies Latest reply on Jun 21, 2011 12:36 AM by 867527

    Statistics for BinaryTreeDictionary does not correctly support large heaps

      When using JVM options "-XX:+UseConcMarkSweepGC -Xms65g -Xmx65g. When -XX:PrintFLSStatistics=1" the following output is seen:

      Statistics for BinaryTreeDictionary:
      Total Free Space: -1824684952
      Max Chunk Size: -1824684952
      Number of Blocks: 1
      Av. Block Size: -1824684952
      Tree Height: 1

      (Notice the negative sizes)

      The source for this is (hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/binaryTreeDictionary.cpp):

      void BinaryTreeDictionary::reportStatistics() const {
      gclog_or_tty->print("Statistics for BinaryTreeDictionary:\n"
      size_t totalSize = totalChunkSize(debug_only(NULL));
      size_t freeBlocks = numFreeBlocks();
      gclog_or_tty->print("Total Free Space: %d\n", totalSize);
      gclog_or_tty->print("Max Chunk Size: %d\n", maxChunkSize());
      gclog_or_tty->print("Number of Blocks: %d\n", freeBlocks);
      if (freeBlocks > 0) {
      gclog_or_tty->print("Av. Block Size: %d\n", totalSize/freeBlocks);
      gclog_or_tty->print("Tree Height: %d\n", treeHeight());

      “%d” just doesn’t cut it with a “long”‘s worth of data.