49 #ifndef JVMTI_KERNEL
50 #define JVMTI_SUPPORT_FLAG(key) \
51 private: \
52 static bool _##key; \
53 public: \
54 inline static void set_##key(bool on) { _##key = (on != 0); } \
55 inline static bool key() { return _##key; }
56 #else // JVMTI_KERNEL
57 #define JVMTI_SUPPORT_FLAG(key) \
58 private: \
59 const static bool _##key = false; \
60 public: \
61 inline static void set_##key(bool on) { report_unsupported(on); } \
62 inline static bool key() { return _##key; }
63 #endif // JVMTI_KERNEL
64
65
66 // This class contains the JVMTI interface for the rest of hotspot.
67 //
68 class JvmtiExport : public AllStatic {
69 private:
70 static int _field_access_count;
71 static int _field_modification_count;
72
73 static bool _can_access_local_variables;
74 static bool _can_hotswap_or_post_breakpoint;
75 static bool _can_modify_any_class;
76 static bool _can_walk_any_space;
77
78 JVMTI_SUPPORT_FLAG(can_get_source_debug_extension)
79 JVMTI_SUPPORT_FLAG(can_maintain_original_method_order)
80 JVMTI_SUPPORT_FLAG(can_post_interpreter_events)
81 JVMTI_SUPPORT_FLAG(can_post_on_exceptions)
82 JVMTI_SUPPORT_FLAG(can_post_breakpoint)
83 JVMTI_SUPPORT_FLAG(can_post_field_access)
84 JVMTI_SUPPORT_FLAG(can_post_field_modification)
85 JVMTI_SUPPORT_FLAG(can_post_method_entry)
86 JVMTI_SUPPORT_FLAG(can_post_method_exit)
87 JVMTI_SUPPORT_FLAG(can_pop_frame)
88 JVMTI_SUPPORT_FLAG(can_force_early_return)
|
49 #ifndef JVMTI_KERNEL
50 #define JVMTI_SUPPORT_FLAG(key) \
51 private: \
52 static bool _##key; \
53 public: \
54 inline static void set_##key(bool on) { _##key = (on != 0); } \
55 inline static bool key() { return _##key; }
56 #else // JVMTI_KERNEL
57 #define JVMTI_SUPPORT_FLAG(key) \
58 private: \
59 const static bool _##key = false; \
60 public: \
61 inline static void set_##key(bool on) { report_unsupported(on); } \
62 inline static bool key() { return _##key; }
63 #endif // JVMTI_KERNEL
64
65
66 // This class contains the JVMTI interface for the rest of hotspot.
67 //
68 class JvmtiExport : public AllStatic {
69 friend class VMStructs;
70 private:
71 static int _field_access_count;
72 static int _field_modification_count;
73
74 static bool _can_access_local_variables;
75 static bool _can_hotswap_or_post_breakpoint;
76 static bool _can_modify_any_class;
77 static bool _can_walk_any_space;
78
79 JVMTI_SUPPORT_FLAG(can_get_source_debug_extension)
80 JVMTI_SUPPORT_FLAG(can_maintain_original_method_order)
81 JVMTI_SUPPORT_FLAG(can_post_interpreter_events)
82 JVMTI_SUPPORT_FLAG(can_post_on_exceptions)
83 JVMTI_SUPPORT_FLAG(can_post_breakpoint)
84 JVMTI_SUPPORT_FLAG(can_post_field_access)
85 JVMTI_SUPPORT_FLAG(can_post_field_modification)
86 JVMTI_SUPPORT_FLAG(can_post_method_entry)
87 JVMTI_SUPPORT_FLAG(can_post_method_exit)
88 JVMTI_SUPPORT_FLAG(can_pop_frame)
89 JVMTI_SUPPORT_FLAG(can_force_early_return)
|