src/share/vm/prims/jvmtiImpl.hpp

Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>

*** 202,252 **** }; /////////////////////////////////////////////////////////////// // - // class VM_ChangeBreakpoints - // Used by : JvmtiBreakpoints - // Used by JVMTI methods: none directly. - // Note: A Helper class. - // - // VM_ChangeBreakpoints implements a VM_Operation for ALL modifications to the JvmtiBreakpoints class. - // - - class VM_ChangeBreakpoints : public VM_Operation { - private: - JvmtiBreakpoints* _breakpoints; - int _operation; - JvmtiBreakpoint* _bp; - - public: - enum { SET_BREAKPOINT=0, CLEAR_BREAKPOINT=1, CLEAR_ALL_BREAKPOINT=2 }; - - VM_ChangeBreakpoints(JvmtiBreakpoints* breakpoints, int operation) { - _breakpoints = breakpoints; - _bp = NULL; - _operation = operation; - assert(breakpoints != NULL, "breakpoints != NULL"); - assert(operation == CLEAR_ALL_BREAKPOINT, "unknown breakpoint operation"); - } - VM_ChangeBreakpoints(JvmtiBreakpoints* breakpoints, int operation, JvmtiBreakpoint *bp) { - _breakpoints = breakpoints; - _bp = bp; - _operation = operation; - assert(breakpoints != NULL, "breakpoints != NULL"); - assert(bp != NULL, "bp != NULL"); - assert(operation == SET_BREAKPOINT || operation == CLEAR_BREAKPOINT , "unknown breakpoint operation"); - } - - VMOp_Type type() const { return VMOp_ChangeBreakpoints; } - void doit(); - void oops_do(OopClosure* f); - }; - - - /////////////////////////////////////////////////////////////// - // // class JvmtiBreakpoints // Used by : JvmtiCurrentBreakpoints // Used by JVMTI methods: none directly // Note: A Helper class // --- 202,211 ----
*** 269,279 **** // to insure they only occur at safepoints. // Todo: add checks for safepoint friend class VM_ChangeBreakpoints; void set_at_safepoint(JvmtiBreakpoint& bp); void clear_at_safepoint(JvmtiBreakpoint& bp); - void clearall_at_safepoint(); static void do_element(GrowableElement *e); public: JvmtiBreakpoints(void listener_fun(void *, address *)); --- 228,237 ----
*** 284,294 **** void print(); int set(JvmtiBreakpoint& bp); int clear(JvmtiBreakpoint& bp); void clearall_in_class_at_safepoint(Klass* klass); - void clearall(); void gc_epilogue(); }; /////////////////////////////////////////////////////////////// --- 242,251 ----
*** 342,351 **** --- 299,342 ---- if ((*bps) == bcp) return true; } return false; } + + /////////////////////////////////////////////////////////////// + // + // class VM_ChangeBreakpoints + // Used by : JvmtiBreakpoints + // Used by JVMTI methods: none directly. + // Note: A Helper class. + // + // VM_ChangeBreakpoints implements a VM_Operation for ALL modifications to the JvmtiBreakpoints class. + // + + class VM_ChangeBreakpoints : public VM_Operation { + private: + JvmtiBreakpoints* _breakpoints; + int _operation; + JvmtiBreakpoint* _bp; + + public: + enum { SET_BREAKPOINT=0, CLEAR_BREAKPOINT=1 }; + + VM_ChangeBreakpoints(int operation, JvmtiBreakpoint *bp) { + JvmtiBreakpoints& current_bps = JvmtiCurrentBreakpoints::get_jvmti_breakpoints(); + _breakpoints = &current_bps; + _bp = bp; + _operation = operation; + assert(bp != NULL, "bp != NULL"); + } + + VMOp_Type type() const { return VMOp_ChangeBreakpoints; } + void doit(); + void oops_do(OopClosure* f); + }; + + /////////////////////////////////////////////////////////////// // The get/set local operations must only be done by the VM thread // because the interpreter version needs to access oop maps, which can // only safely be done by the VM thread //