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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_java.cpp.incl" 27 28 HS_DTRACE_PROBE_DECL(hotspot, vm__shutdown); 29 30 #ifndef PRODUCT 31 32 // Statistics printing (method invocation histogram) 33 34 GrowableArray<methodOop>* collected_invoked_methods; 35 36 void collect_invoked_methods(methodOop m) { 37 if (m->invocation_count() + m->compiled_invocation_count() >= 1 ) { 38 collected_invoked_methods->push(m); 39 } 40 } 41 42 43 GrowableArray<methodOop>* collected_profiled_methods; 44 45 void collect_profiled_methods(methodOop m) { 46 methodHandle mh(Thread::current(), m); | 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 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "classfile/classLoader.hpp" 27 #include "classfile/symbolTable.hpp" 28 #include "classfile/systemDictionary.hpp" 29 #include "code/codeCache.hpp" 30 #include "compiler/compileBroker.hpp" 31 #include "compiler/compilerOracle.hpp" 32 #include "interpreter/bytecodeHistogram.hpp" 33 #include "memory/genCollectedHeap.hpp" 34 #include "memory/oopFactory.hpp" 35 #include "memory/universe.hpp" 36 #include "oops/constantPoolOop.hpp" 37 #include "oops/generateOopMap.hpp" 38 #include "oops/instanceKlass.hpp" 39 #include "oops/instanceKlassKlass.hpp" 40 #include "oops/instanceOop.hpp" 41 #include "oops/methodOop.hpp" 42 #include "oops/objArrayOop.hpp" 43 #include "oops/oop.inline.hpp" 44 #include "oops/symbolOop.hpp" 45 #include "prims/jvmtiExport.hpp" 46 #include "runtime/aprofiler.hpp" 47 #include "runtime/arguments.hpp" 48 #include "runtime/biasedLocking.hpp" 49 #include "runtime/compilationPolicy.hpp" 50 #include "runtime/fprofiler.hpp" 51 #include "runtime/init.hpp" 52 #include "runtime/interfaceSupport.hpp" 53 #include "runtime/java.hpp" 54 #include "runtime/memprofiler.hpp" 55 #include "runtime/sharedRuntime.hpp" 56 #include "runtime/statSampler.hpp" 57 #include "runtime/task.hpp" 58 #include "runtime/timer.hpp" 59 #include "runtime/vm_operations.hpp" 60 #include "utilities/dtrace.hpp" 61 #include "utilities/globalDefinitions.hpp" 62 #include "utilities/histogram.hpp" 63 #include "utilities/vmError.hpp" 64 #ifdef TARGET_ARCH_x86 65 # include "vm_version_x86.hpp" 66 #endif 67 #ifdef TARGET_ARCH_sparc 68 # include "vm_version_sparc.hpp" 69 #endif 70 #ifdef TARGET_ARCH_zero 71 # include "vm_version_zero.hpp" 72 #endif 73 #ifdef TARGET_OS_FAMILY_linux 74 # include "thread_linux.inline.hpp" 75 #endif 76 #ifdef TARGET_OS_FAMILY_solaris 77 # include "thread_solaris.inline.hpp" 78 #endif 79 #ifdef TARGET_OS_FAMILY_windows 80 # include "thread_windows.inline.hpp" 81 #endif 82 #ifndef SERIALGC 83 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" 84 #include "gc_implementation/parallelScavenge/psScavenge.hpp" 85 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" 86 #endif 87 #ifdef COMPILER1 88 #include "c1/c1_Compiler.hpp" 89 #include "c1/c1_Runtime1.hpp" 90 #endif 91 #ifdef COMPILER2 92 #include "code/compiledIC.hpp" 93 #include "compiler/methodLiveness.hpp" 94 #include "opto/compile.hpp" 95 #include "opto/indexSet.hpp" 96 #include "opto/runtime.hpp" 97 #endif 98 99 HS_DTRACE_PROBE_DECL(hotspot, vm__shutdown); 100 101 #ifndef PRODUCT 102 103 // Statistics printing (method invocation histogram) 104 105 GrowableArray<methodOop>* collected_invoked_methods; 106 107 void collect_invoked_methods(methodOop m) { 108 if (m->invocation_count() + m->compiled_invocation_count() >= 1 ) { 109 collected_invoked_methods->push(m); 110 } 111 } 112 113 114 GrowableArray<methodOop>* collected_profiled_methods; 115 116 void collect_profiled_methods(methodOop m) { 117 methodHandle mh(Thread::current(), m); |