src/share/vm/prims/jvmtiExport.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/_jvmtiExport.cpp.incl"





























  27 
  28 #ifdef JVMTI_TRACE
  29 #define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; }
  30 #define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr out; }
  31 #else
  32 #define EVT_TRIG_TRACE(evt,out)
  33 #define EVT_TRACE(evt,out)
  34 #endif
  35 
  36 ///////////////////////////////////////////////////////////////
  37 //
  38 // JvmtiEventTransition
  39 //
  40 // TO DO --
  41 //  more handle purging
  42 
  43 // Use this for JavaThreads and state is  _thread_in_vm.
  44 class JvmtiJavaThreadEventTransition : StackObj {
  45 private:
  46   ResourceMark _rm;




   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/systemDictionary.hpp"
  27 #include "code/nmethod.hpp"
  28 #include "code/pcDesc.hpp"
  29 #include "code/scopeDesc.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "jvmtifiles/jvmtiEnv.hpp"
  32 #include "memory/resourceArea.hpp"
  33 #include "oops/objArrayKlass.hpp"
  34 #include "oops/objArrayOop.hpp"
  35 #include "prims/jvmtiCodeBlobEvents.hpp"
  36 #include "prims/jvmtiEventController.hpp"
  37 #include "prims/jvmtiEventController.inline.hpp"
  38 #include "prims/jvmtiExport.hpp"
  39 #include "prims/jvmtiImpl.hpp"
  40 #include "prims/jvmtiManageCapabilities.hpp"
  41 #include "prims/jvmtiRawMonitor.hpp"
  42 #include "prims/jvmtiTagMap.hpp"
  43 #include "prims/jvmtiThreadState.inline.hpp"
  44 #include "runtime/arguments.hpp"
  45 #include "runtime/handles.hpp"
  46 #include "runtime/interfaceSupport.hpp"
  47 #include "runtime/objectMonitor.hpp"
  48 #include "runtime/objectMonitor.inline.hpp"
  49 #include "runtime/thread.hpp"
  50 #include "runtime/vframe.hpp"
  51 #include "services/attachListener.hpp"
  52 #include "services/serviceUtil.hpp"
  53 #ifndef SERIALGC
  54 #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
  55 #endif
  56 
  57 #ifdef JVMTI_TRACE
  58 #define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; }
  59 #define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr out; }
  60 #else
  61 #define EVT_TRIG_TRACE(evt,out)
  62 #define EVT_TRACE(evt,out)
  63 #endif
  64 
  65 ///////////////////////////////////////////////////////////////
  66 //
  67 // JvmtiEventTransition
  68 //
  69 // TO DO --
  70 //  more handle purging
  71 
  72 // Use this for JavaThreads and state is  _thread_in_vm.
  73 class JvmtiJavaThreadEventTransition : StackObj {
  74 private:
  75   ResourceMark _rm;