src/share/vm/prims/jvmtiExport.hpp

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 #ifndef _JAVA_JVMTIEXPORT_H_
  26 #define _JAVA_JVMTIEXPORT_H_











  27 
  28 // Forward declarations
  29 
  30 class JvmtiEventControllerPrivate;
  31 class JvmtiManageCapabilities;
  32 class JvmtiEnv;
  33 class JvmtiThreadState;
  34 class AttachOperation;
  35 
  36 #ifndef JVMTI_KERNEL
  37 #define JVMTI_SUPPORT_FLAG(key)                                         \
  38   private:                                                              \
  39   static bool  _##key;                                                  \
  40   public:                                                               \
  41   inline static void set_##key(bool on)       { _##key = (on != 0); }   \
  42   inline static bool key()                    { return _##key; }
  43 #else  // JVMTI_KERNEL
  44 #define JVMTI_SUPPORT_FLAG(key)                                           \
  45   private:                                                                \
  46   const static bool _##key = false;                                       \


 536   JavaThread * _thread;
 537 
 538  public:
 539   JvmtiHideSingleStepping(JavaThread * thread) {
 540     assert(thread != NULL, "sanity check");
 541 
 542     _single_step_hidden = false;
 543     _thread = thread;
 544     if (JvmtiExport::should_post_single_step()) {
 545       _single_step_hidden = JvmtiExport::hide_single_stepping(_thread);
 546     }
 547   }
 548 
 549   ~JvmtiHideSingleStepping() {
 550     if (_single_step_hidden) {
 551       JvmtiExport::expose_single_stepping(_thread);
 552     }
 553   }
 554 };
 555 
 556 #endif   /* _JAVA_JVMTIEXPORT_H_ */


   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 #ifndef SHARE_VM_PRIMS_JVMTIEXPORT_HPP
  26 #define SHARE_VM_PRIMS_JVMTIEXPORT_HPP
  27 
  28 #include "code/jvmticmlr.h"
  29 #include "jvmtifiles/jvmti.h"
  30 #include "memory/allocation.hpp"
  31 #include "memory/iterator.hpp"
  32 #include "oops/oop.hpp"
  33 #include "oops/oopsHierarchy.hpp"
  34 #include "runtime/frame.hpp"
  35 #include "runtime/handles.hpp"
  36 #include "utilities/globalDefinitions.hpp"
  37 #include "utilities/growableArray.hpp"
  38 
  39 // Forward declarations
  40 
  41 class JvmtiEventControllerPrivate;
  42 class JvmtiManageCapabilities;
  43 class JvmtiEnv;
  44 class JvmtiThreadState;
  45 class AttachOperation;
  46 
  47 #ifndef JVMTI_KERNEL
  48 #define JVMTI_SUPPORT_FLAG(key)                                         \
  49   private:                                                              \
  50   static bool  _##key;                                                  \
  51   public:                                                               \
  52   inline static void set_##key(bool on)       { _##key = (on != 0); }   \
  53   inline static bool key()                    { return _##key; }
  54 #else  // JVMTI_KERNEL
  55 #define JVMTI_SUPPORT_FLAG(key)                                           \
  56   private:                                                                \
  57   const static bool _##key = false;                                       \


 547   JavaThread * _thread;
 548 
 549  public:
 550   JvmtiHideSingleStepping(JavaThread * thread) {
 551     assert(thread != NULL, "sanity check");
 552 
 553     _single_step_hidden = false;
 554     _thread = thread;
 555     if (JvmtiExport::should_post_single_step()) {
 556       _single_step_hidden = JvmtiExport::hide_single_stepping(_thread);
 557     }
 558   }
 559 
 560   ~JvmtiHideSingleStepping() {
 561     if (_single_step_hidden) {
 562       JvmtiExport::expose_single_stepping(_thread);
 563     }
 564   }
 565 };
 566 
 567 #endif // SHARE_VM_PRIMS_JVMTIEXPORT_HPP