Mercurial > hg > truffle
comparison src/share/vm/runtime/java.cpp @ 18058:54bc75c144b0
Merge
author | asaha |
---|---|
date | Thu, 29 May 2014 13:14:25 -0700 |
parents | 78bbf4d43a14 |
children | 1772223a25a2 |
comparison
equal
deleted
inserted
replaced
18055:1fa005fb28f5 | 18058:54bc75c144b0 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
50 #include "runtime/interfaceSupport.hpp" | 50 #include "runtime/interfaceSupport.hpp" |
51 #include "runtime/java.hpp" | 51 #include "runtime/java.hpp" |
52 #include "runtime/memprofiler.hpp" | 52 #include "runtime/memprofiler.hpp" |
53 #include "runtime/sharedRuntime.hpp" | 53 #include "runtime/sharedRuntime.hpp" |
54 #include "runtime/statSampler.hpp" | 54 #include "runtime/statSampler.hpp" |
55 #include "runtime/sweeper.hpp" | |
55 #include "runtime/task.hpp" | 56 #include "runtime/task.hpp" |
56 #include "runtime/thread.inline.hpp" | 57 #include "runtime/thread.inline.hpp" |
57 #include "runtime/timer.hpp" | 58 #include "runtime/timer.hpp" |
58 #include "runtime/vm_operations.hpp" | 59 #include "runtime/vm_operations.hpp" |
59 #include "services/memReporter.hpp" | 60 #include "services/memReporter.hpp" |
110 if (m->invocation_count() + m->compiled_invocation_count() >= 1 ) { | 111 if (m->invocation_count() + m->compiled_invocation_count() >= 1 ) { |
111 collected_invoked_methods->push(m); | 112 collected_invoked_methods->push(m); |
112 } | 113 } |
113 } | 114 } |
114 | 115 |
116 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC | |
115 | 117 |
116 GrowableArray<Method*>* collected_profiled_methods; | 118 GrowableArray<Method*>* collected_profiled_methods; |
117 | 119 |
118 void collect_profiled_methods(Method* m) { | 120 void collect_profiled_methods(Method* m) { |
119 Thread* thread = Thread::current(); | 121 Thread* thread = Thread::current(); |
215 AllocStats alloc_stats; | 217 AllocStats alloc_stats; |
216 | 218 |
217 | 219 |
218 | 220 |
219 // General statistics printing (profiling ...) | 221 // General statistics printing (profiling ...) |
220 | |
221 void print_statistics() { | 222 void print_statistics() { |
222 | |
223 #ifdef ASSERT | 223 #ifdef ASSERT |
224 | 224 |
225 if (CountRuntimeCalls) { | 225 if (CountRuntimeCalls) { |
226 extern Histogram *RuntimeHistogram; | 226 extern Histogram *RuntimeHistogram; |
227 RuntimeHistogram->print(); | 227 RuntimeHistogram->print(); |
267 SharedRuntime::print_statistics(); | 267 SharedRuntime::print_statistics(); |
268 #endif //COMPILER1 | 268 #endif //COMPILER1 |
269 os::print_statistics(); | 269 os::print_statistics(); |
270 } | 270 } |
271 | 271 |
272 if (PrintLockStatistics || PrintPreciseBiasedLockingStatistics) { | 272 if (PrintLockStatistics || PrintPreciseBiasedLockingStatistics || PrintPreciseRTMLockingStatistics) { |
273 OptoRuntime::print_named_counters(); | 273 OptoRuntime::print_named_counters(); |
274 } | 274 } |
275 | 275 |
276 if (TimeLivenessAnalysis) { | 276 if (TimeLivenessAnalysis) { |
277 MethodLiveness::print_times(); | 277 MethodLiveness::print_times(); |
311 } | 311 } |
312 | 312 |
313 if (PrintCodeCache) { | 313 if (PrintCodeCache) { |
314 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | 314 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
315 CodeCache::print(); | 315 CodeCache::print(); |
316 } | |
317 | |
318 if (PrintMethodFlushingStatistics) { | |
319 NMethodSweeper::print(); | |
316 } | 320 } |
317 | 321 |
318 if (PrintCodeCache2) { | 322 if (PrintCodeCache2) { |
319 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | 323 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
320 CodeCache::print_internals(); | 324 CodeCache::print_internals(); |
362 if (PrintNMTStatistics) { | 366 if (PrintNMTStatistics) { |
363 if (MemTracker::is_on()) { | 367 if (MemTracker::is_on()) { |
364 BaselineTTYOutputer outputer(tty); | 368 BaselineTTYOutputer outputer(tty); |
365 MemTracker::print_memory_usage(outputer, K, false); | 369 MemTracker::print_memory_usage(outputer, K, false); |
366 } else { | 370 } else { |
367 tty->print_cr(MemTracker::reason()); | 371 tty->print_cr("%s", MemTracker::reason()); |
368 } | 372 } |
369 } | 373 } |
370 } | 374 } |
371 | 375 |
372 #else // PRODUCT MODE STATISTICS | 376 #else // PRODUCT MODE STATISTICS |
380 if (PrintCodeCache) { | 384 if (PrintCodeCache) { |
381 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); | 385 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
382 CodeCache::print(); | 386 CodeCache::print(); |
383 } | 387 } |
384 | 388 |
389 if (PrintMethodFlushingStatistics) { | |
390 NMethodSweeper::print(); | |
391 } | |
392 | |
385 #ifdef COMPILER2 | 393 #ifdef COMPILER2 |
386 if (PrintPreciseBiasedLockingStatistics) { | 394 if (PrintPreciseBiasedLockingStatistics || PrintPreciseRTMLockingStatistics) { |
387 OptoRuntime::print_named_counters(); | 395 OptoRuntime::print_named_counters(); |
388 } | 396 } |
389 #endif | 397 #endif |
390 if (PrintBiasedLockingStatistics) { | 398 if (PrintBiasedLockingStatistics) { |
391 BiasedLocking::print_counters(); | 399 BiasedLocking::print_counters(); |
395 if (PrintNMTStatistics) { | 403 if (PrintNMTStatistics) { |
396 if (MemTracker::is_on()) { | 404 if (MemTracker::is_on()) { |
397 BaselineTTYOutputer outputer(tty); | 405 BaselineTTYOutputer outputer(tty); |
398 MemTracker::print_memory_usage(outputer, K, false); | 406 MemTracker::print_memory_usage(outputer, K, false); |
399 } else { | 407 } else { |
400 tty->print_cr(MemTracker::reason()); | 408 tty->print_cr("%s", MemTracker::reason()); |
401 } | 409 } |
402 } | 410 } |
403 } | 411 } |
404 | 412 |
405 #endif | 413 #endif |