< prev index next >

src/hotspot/share/runtime/vmThread.hpp

Print this page




  54 
  55   // Double-linked non-empty list insert.
  56   void insert(VM_Operation* q,VM_Operation* n);
  57   void unlink(VM_Operation* q);
  58 
  59   // Basic queue manipulation
  60   bool queue_empty                (int prio);
  61   void queue_add_front            (int prio, VM_Operation *op);
  62   void queue_add_back             (int prio, VM_Operation *op);
  63   VM_Operation* queue_remove_front(int prio);
  64   void queue_oops_do(int queue, OopClosure* f);
  65   void drain_list_oops_do(OopClosure* f);
  66   VM_Operation* queue_drain(int prio);
  67   // lock-free query: may return the wrong answer but must not break
  68   bool queue_peek(int prio) { return _queue_length[prio] > 0; }
  69 
  70  public:
  71   VMOperationQueue();
  72 
  73   // Highlevel operations. Encapsulates policy
  74   void add(VM_Operation *op);
  75   VM_Operation* remove_next();                        // Returns next or null
  76   VM_Operation* remove_next_at_safepoint_priority()   { return queue_remove_front(SafepointPriority); }
  77   VM_Operation* drain_at_safepoint_priority() { return queue_drain(SafepointPriority); }
  78   void set_drain_list(VM_Operation* list) { _drain_list = list; }
  79   bool peek_at_safepoint_priority() { return queue_peek(SafepointPriority); }
  80 
  81   // GC support
  82   void oops_do(OopClosure* f);
  83 
  84   void verify_queue(int prio) PRODUCT_RETURN;
  85 };
  86 
  87 
  88 // VM operation timeout handling: warn or abort the VM when VM operation takes
  89 // too long. Periodic tasks do not participate in safepoint protocol, and therefore
  90 // can fire when application threads are stopped.
  91 
  92 class VMOperationTimeoutTask : public PeriodicTask {
  93 private:
  94   volatile int _armed;




  54 
  55   // Double-linked non-empty list insert.
  56   void insert(VM_Operation* q,VM_Operation* n);
  57   void unlink(VM_Operation* q);
  58 
  59   // Basic queue manipulation
  60   bool queue_empty                (int prio);
  61   void queue_add_front            (int prio, VM_Operation *op);
  62   void queue_add_back             (int prio, VM_Operation *op);
  63   VM_Operation* queue_remove_front(int prio);
  64   void queue_oops_do(int queue, OopClosure* f);
  65   void drain_list_oops_do(OopClosure* f);
  66   VM_Operation* queue_drain(int prio);
  67   // lock-free query: may return the wrong answer but must not break
  68   bool queue_peek(int prio) { return _queue_length[prio] > 0; }
  69 
  70  public:
  71   VMOperationQueue();
  72 
  73   // Highlevel operations. Encapsulates policy
  74   bool add(VM_Operation *op);
  75   VM_Operation* remove_next();                        // Returns next or null
  76   VM_Operation* remove_next_at_safepoint_priority()   { return queue_remove_front(SafepointPriority); }
  77   VM_Operation* drain_at_safepoint_priority() { return queue_drain(SafepointPriority); }
  78   void set_drain_list(VM_Operation* list) { _drain_list = list; }
  79   bool peek_at_safepoint_priority() { return queue_peek(SafepointPriority); }
  80 
  81   // GC support
  82   void oops_do(OopClosure* f);
  83 
  84   void verify_queue(int prio) PRODUCT_RETURN;
  85 };
  86 
  87 
  88 // VM operation timeout handling: warn or abort the VM when VM operation takes
  89 // too long. Periodic tasks do not participate in safepoint protocol, and therefore
  90 // can fire when application threads are stopped.
  91 
  92 class VMOperationTimeoutTask : public PeriodicTask {
  93 private:
  94   volatile int _armed;


< prev index next >