hotspot/src/share/vm/runtime/java.cpp
changeset 25946 1572c9f03fb9
parent 25715 d5a8dbdc5150
child 26295 6a9d9192f215
equal deleted inserted replaced
25902:7e9ffb1fe1df 25946:1572c9f03fb9
    55 #include "runtime/sweeper.hpp"
    55 #include "runtime/sweeper.hpp"
    56 #include "runtime/task.hpp"
    56 #include "runtime/task.hpp"
    57 #include "runtime/thread.inline.hpp"
    57 #include "runtime/thread.inline.hpp"
    58 #include "runtime/timer.hpp"
    58 #include "runtime/timer.hpp"
    59 #include "runtime/vm_operations.hpp"
    59 #include "runtime/vm_operations.hpp"
    60 #include "services/memReporter.hpp"
       
    61 #include "services/memTracker.hpp"
    60 #include "services/memTracker.hpp"
    62 #include "trace/tracing.hpp"
    61 #include "trace/tracing.hpp"
    63 #include "utilities/dtrace.hpp"
    62 #include "utilities/dtrace.hpp"
    64 #include "utilities/globalDefinitions.hpp"
    63 #include "utilities/globalDefinitions.hpp"
    65 #include "utilities/histogram.hpp"
    64 #include "utilities/histogram.hpp"
   347   }
   346   }
   348 #endif // COMPILER2
   347 #endif // COMPILER2
   349 #endif // ENABLE_ZAP_DEAD_LOCALS
   348 #endif // ENABLE_ZAP_DEAD_LOCALS
   350   // Native memory tracking data
   349   // Native memory tracking data
   351   if (PrintNMTStatistics) {
   350   if (PrintNMTStatistics) {
   352     if (MemTracker::is_on()) {
   351     MemTracker::final_report(tty);
   353       BaselineTTYOutputer outputer(tty);
       
   354       MemTracker::print_memory_usage(outputer, K, false);
       
   355     } else {
       
   356       tty->print_cr("%s", MemTracker::reason());
       
   357     }
       
   358   }
   352   }
   359 }
   353 }
   360 
   354 
   361 #else // PRODUCT MODE STATISTICS
   355 #else // PRODUCT MODE STATISTICS
   362 
   356 
   388     BiasedLocking::print_counters();
   382     BiasedLocking::print_counters();
   389   }
   383   }
   390 
   384 
   391   // Native memory tracking data
   385   // Native memory tracking data
   392   if (PrintNMTStatistics) {
   386   if (PrintNMTStatistics) {
   393     if (MemTracker::is_on()) {
   387     MemTracker::final_report(tty);
   394       BaselineTTYOutputer outputer(tty);
       
   395       MemTracker::print_memory_usage(outputer, K, false);
       
   396     } else {
       
   397       tty->print_cr("%s", MemTracker::reason());
       
   398     }
       
   399   }
   388   }
   400 }
   389 }
   401 
   390 
   402 #endif
   391 #endif
   403 
   392 
   542   { MutexLocker ml(BeforeExit_lock);
   531   { MutexLocker ml(BeforeExit_lock);
   543     _before_exit_status = BEFORE_EXIT_DONE;
   532     _before_exit_status = BEFORE_EXIT_DONE;
   544     BeforeExit_lock->notify_all();
   533     BeforeExit_lock->notify_all();
   545   }
   534   }
   546 
   535 
   547   // Shutdown NMT before exit. Otherwise,
       
   548   // it will run into trouble when system destroys static variables.
       
   549   MemTracker::shutdown(MemTracker::NMT_normal);
       
   550 
       
   551   if (VerifyStringTableAtExit) {
   536   if (VerifyStringTableAtExit) {
   552     int fail_cnt = 0;
   537     int fail_cnt = 0;
   553     {
   538     {
   554       MutexLocker ml(StringTable_lock);
   539       MutexLocker ml(StringTable_lock);
   555       fail_cnt = StringTable::verify_and_compare_entries();
   540       fail_cnt = StringTable::verify_and_compare_entries();