class VM_Operation : public StackObj { public: enum VMOp_Type {
VM_OPS_DO(VM_OP_ENUM)
VMOp_Terminating
};
private:
Thread* _calling_thread;
// The VM operation name array staticconstchar* _names[];
public:
VM_Operation() : _calling_thread(NULL) {}
// VM operation support (used by VM thread)
Thread* calling_thread() const { return _calling_thread; } void set_calling_thread(Thread* thread);
// Called by VM thread - does in turn invoke doit(). Do not override this void evaluate();
// evaluate() is called by the VMThread and in turn calls doit(). // If the thread invoking VMThread::execute((VM_Operation*) is a JavaThread, // doit_prologue() is called in that thread before transferring control to // the VMThread. // If doit_prologue() returns true the VM operation will proceed, and // doit_epilogue() will be called by the JavaThread once the VM operation // completes. If doit_prologue() returns false the VM operation is cancelled. virtualvoid doit() = 0; virtualbool doit_prologue() { returntrue; }; virtualvoid doit_epilogue() {};
// Configuration. Override these appropriately in subclasses. virtual VMOp_Type type() const = 0; virtualbool allow_nested_vm_operations() const { returnfalse; }
// You may override skip_thread_oop_barriers to return true if the operation // does not access thread-private oops (including frames). virtualbool skip_thread_oop_barriers() const { returnfalse; }
// An operation can either be done inside a safepoint // or concurrently with Java threads running. virtualbool evaluate_at_safepoint() const { returntrue; }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.