Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/thread.hpp @ 3464:be4ca325525a
Merge.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Jul 2011 17:32:44 -0700 |
parents | 75a99b4f1c98 f52ed367b66d |
children | 344264424174 |
comparison
equal
deleted
inserted
replaced
3239:7c4b4daac19b | 3464:be4ca325525a |
---|---|
437 } | 437 } |
438 | 438 |
439 // GC support | 439 // GC support |
440 // Apply "f->do_oop" to all root oops in "this". | 440 // Apply "f->do_oop" to all root oops in "this". |
441 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames | 441 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames |
442 void oops_do(OopClosure* f, CodeBlobClosure* cf); | 442 virtual void oops_do(OopClosure* f, CodeBlobClosure* cf); |
443 | 443 |
444 // Handles the parallel case for the method below. | 444 // Handles the parallel case for the method below. |
445 private: | 445 private: |
446 bool claim_oops_do_par_case(int collection_parity); | 446 bool claim_oops_do_par_case(int collection_parity); |
447 public: | 447 public: |
1381 | 1381 |
1382 // Print stack traces in various internal formats | 1382 // Print stack traces in various internal formats |
1383 void trace_stack() PRODUCT_RETURN; | 1383 void trace_stack() PRODUCT_RETURN; |
1384 void trace_stack_from(vframe* start_vf) PRODUCT_RETURN; | 1384 void trace_stack_from(vframe* start_vf) PRODUCT_RETURN; |
1385 void trace_frames() PRODUCT_RETURN; | 1385 void trace_frames() PRODUCT_RETURN; |
1386 | |
1387 // Print an annotated view of the stack frames | |
1388 void print_frame_layout(int depth = 0, bool validate_only = false) NOT_DEBUG_RETURN; | |
1389 void validate_frame_layout() { | |
1390 print_frame_layout(0, true); | |
1391 } | |
1386 | 1392 |
1387 // Returns the number of stack frames on the stack | 1393 // Returns the number of stack frames on the stack |
1388 int depth() const; | 1394 int depth() const; |
1389 | 1395 |
1390 // Function for testing deoptimization | 1396 // Function for testing deoptimization |
1695 CompileTask* _task; | 1701 CompileTask* _task; |
1696 CompileQueue* _queue; | 1702 CompileQueue* _queue; |
1697 bool _is_compiling; | 1703 bool _is_compiling; |
1698 BufferBlob* _buffer_blob; | 1704 BufferBlob* _buffer_blob; |
1699 | 1705 |
1706 nmethod* _scanned_nmethod; // nmethod being scanned by the sweeper | |
1707 | |
1700 public: | 1708 public: |
1701 | 1709 |
1702 static CompilerThread* current(); | 1710 static CompilerThread* current(); |
1703 | 1711 |
1704 CompilerThread(CompileQueue* queue, CompilerCounters* counters); | 1712 CompilerThread(CompileQueue* queue, CompilerCounters* counters); |
1725 // Set once, for good. | 1733 // Set once, for good. |
1726 assert(_log == NULL, "set only once"); | 1734 assert(_log == NULL, "set only once"); |
1727 _log = log; | 1735 _log = log; |
1728 } | 1736 } |
1729 | 1737 |
1738 // GC support | |
1739 // Apply "f->do_oop" to all root oops in "this". | |
1740 // Apply "cf->do_code_blob" (if !NULL) to all code blobs active in frames | |
1741 void oops_do(OopClosure* f, CodeBlobClosure* cf); | |
1742 | |
1730 #ifndef PRODUCT | 1743 #ifndef PRODUCT |
1731 private: | 1744 private: |
1732 IdealGraphPrinter *_ideal_graph_printer; | 1745 IdealGraphPrinter *_ideal_graph_printer; |
1733 public: | 1746 public: |
1734 IdealGraphPrinter *ideal_graph_printer() { return _ideal_graph_printer; } | 1747 IdealGraphPrinter *ideal_graph_printer() { return _ideal_graph_printer; } |
1736 #endif | 1749 #endif |
1737 | 1750 |
1738 // Get/set the thread's current task | 1751 // Get/set the thread's current task |
1739 CompileTask* task() { return _task; } | 1752 CompileTask* task() { return _task; } |
1740 void set_task(CompileTask* task) { _task = task; } | 1753 void set_task(CompileTask* task) { _task = task; } |
1754 | |
1755 // Track the nmethod currently being scanned by the sweeper | |
1756 void set_scanned_nmethod(nmethod* nm) { | |
1757 assert(_scanned_nmethod == NULL || nm == NULL, "should reset to NULL before writing a new value"); | |
1758 _scanned_nmethod = nm; | |
1759 } | |
1741 }; | 1760 }; |
1742 | 1761 |
1743 inline CompilerThread* CompilerThread::current() { | 1762 inline CompilerThread* CompilerThread::current() { |
1744 return JavaThread::current()->as_CompilerThread(); | 1763 return JavaThread::current()->as_CompilerThread(); |
1745 } | 1764 } |