src/share/vm/code/nmethod.cpp

Print this page




   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/_nmethod.cpp.incl"


















  27 
  28 #ifdef DTRACE_ENABLED
  29 
  30 // Only bother with this argument setup if dtrace is available
  31 
  32 HS_DTRACE_PROBE_DECL8(hotspot, compiled__method__load,
  33   const char*, int, const char*, int, const char*, int, void*, size_t);
  34 
  35 HS_DTRACE_PROBE_DECL6(hotspot, compiled__method__unload,
  36   char*, int, char*, int, char*, int);
  37 
  38 #define DTRACE_METHOD_UNLOAD_PROBE(method)                                \
  39   {                                                                       \
  40     methodOop m = (method);                                               \
  41     if (m != NULL) {                                                      \
  42       symbolOop klass_name = m->klass_name();                             \
  43       symbolOop name = m->name();                                         \
  44       symbolOop signature = m->signature();                               \
  45       HS_DTRACE_PROBE6(hotspot, compiled__method__unload,                 \
  46         klass_name->bytes(), klass_name->utf8_length(),                   \




   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 "code/codeCache.hpp"
  27 #include "code/compiledIC.hpp"
  28 #include "code/nmethod.hpp"
  29 #include "code/scopeDesc.hpp"
  30 #include "compiler/abstractCompiler.hpp"
  31 #include "compiler/compileLog.hpp"
  32 #include "compiler/compilerOracle.hpp"
  33 #include "compiler/disassembler.hpp"
  34 #include "interpreter/bytecode.hpp"
  35 #include "oops/methodDataOop.hpp"
  36 #include "prims/jvmtiRedefineClassesTrace.hpp"
  37 #include "runtime/sharedRuntime.hpp"
  38 #include "runtime/sweeper.hpp"
  39 #include "utilities/dtrace.hpp"
  40 #include "utilities/events.hpp"
  41 #include "utilities/xmlstream.hpp"
  42 #ifdef SHARK
  43 #include "shark/sharkCompiler.hpp"
  44 #endif
  45 
  46 #ifdef DTRACE_ENABLED
  47 
  48 // Only bother with this argument setup if dtrace is available
  49 
  50 HS_DTRACE_PROBE_DECL8(hotspot, compiled__method__load,
  51   const char*, int, const char*, int, const char*, int, void*, size_t);
  52 
  53 HS_DTRACE_PROBE_DECL6(hotspot, compiled__method__unload,
  54   char*, int, char*, int, char*, int);
  55 
  56 #define DTRACE_METHOD_UNLOAD_PROBE(method)                                \
  57   {                                                                       \
  58     methodOop m = (method);                                               \
  59     if (m != NULL) {                                                      \
  60       symbolOop klass_name = m->klass_name();                             \
  61       symbolOop name = m->name();                                         \
  62       symbolOop signature = m->signature();                               \
  63       HS_DTRACE_PROBE6(hotspot, compiled__method__unload,                 \
  64         klass_name->bytes(), klass_name->utf8_length(),                   \