equal
deleted
inserted
replaced
564 |
564 |
565 int lgrp_id() const { return _lgrp_id; } |
565 int lgrp_id() const { return _lgrp_id; } |
566 void set_lgrp_id(int value) { _lgrp_id = value; } |
566 void set_lgrp_id(int value) { _lgrp_id = value; } |
567 |
567 |
568 // Printing |
568 // Printing |
569 void print_on(outputStream* st) const; |
569 virtual void print_on(outputStream* st) const; |
570 void print() const { print_on(tty); } |
570 void print() const { print_on(tty); } |
571 virtual void print_on_error(outputStream* st, char* buf, int buflen) const; |
571 virtual void print_on_error(outputStream* st, char* buf, int buflen) const; |
572 |
572 |
573 // Debug-only code |
573 // Debug-only code |
574 #ifdef ASSERT |
574 #ifdef ASSERT |
698 void set_name(const char* format, ...); |
698 void set_name(const char* format, ...); |
699 virtual bool is_Named_thread() const { return true; } |
699 virtual bool is_Named_thread() const { return true; } |
700 virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; } |
700 virtual char* name() const { return _name == NULL ? (char*)"Unknown Thread" : _name; } |
701 JavaThread *processed_thread() { return _processed_thread; } |
701 JavaThread *processed_thread() { return _processed_thread; } |
702 void set_processed_thread(JavaThread *thread) { _processed_thread = thread; } |
702 void set_processed_thread(JavaThread *thread) { _processed_thread = thread; } |
|
703 virtual void print_on(outputStream* st) const; |
703 }; |
704 }; |
704 |
705 |
705 // Worker threads are named and have an id of an assigned work. |
706 // Worker threads are named and have an id of an assigned work. |
706 class WorkerThread: public NamedThread { |
707 class WorkerThread: public NamedThread { |
707 private: |
708 private: |
744 bool is_Watcher_thread() const { return true; } |
745 bool is_Watcher_thread() const { return true; } |
745 |
746 |
746 // Printing |
747 // Printing |
747 char* name() const { return (char*)"VM Periodic Task Thread"; } |
748 char* name() const { return (char*)"VM Periodic Task Thread"; } |
748 void print_on(outputStream* st) const; |
749 void print_on(outputStream* st) const; |
749 void print() const { print_on(tty); } |
|
750 void unpark(); |
750 void unpark(); |
751 |
751 |
752 // Returns the single instance of WatcherThread |
752 // Returns the single instance of WatcherThread |
753 static WatcherThread* watcher_thread() { return _watcher_thread; } |
753 static WatcherThread* watcher_thread() { return _watcher_thread; } |
754 |
754 |
1457 void gc_prologue(); |
1457 void gc_prologue(); |
1458 |
1458 |
1459 // Misc. operations |
1459 // Misc. operations |
1460 char* name() const { return (char*)get_thread_name(); } |
1460 char* name() const { return (char*)get_thread_name(); } |
1461 void print_on(outputStream* st) const; |
1461 void print_on(outputStream* st) const; |
1462 void print() const { print_on(tty); } |
|
1463 void print_value(); |
1462 void print_value(); |
1464 void print_thread_state_on(outputStream* ) const PRODUCT_RETURN; |
1463 void print_thread_state_on(outputStream* ) const PRODUCT_RETURN; |
1465 void print_thread_state() const PRODUCT_RETURN; |
1464 void print_thread_state() const PRODUCT_RETURN; |
1466 void print_on_error(outputStream* st, char* buf, int buflen) const; |
1465 void print_on_error(outputStream* st, char* buf, int buflen) const; |
1467 void verify(); |
1466 void verify(); |