5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 class ThreadSafepointState;
26 class ThreadProfiler;
27
28 class JvmtiThreadState;
29 class JvmtiGetLoadedClassesClosure;
30 class ThreadStatistics;
31 class ConcurrentLocksDump;
32 class ParkEvent ;
33
34 class ciEnv;
35 class CompileThread;
36 class CompileLog;
37 class CompileTask;
38 class CompileQueue;
39 class CompilerCounters;
40 class vframeArray;
41
42 class DeoptResourceMark;
43 class jvmtiDeferredLocalVariableSet;
44
1471 }
1472 static inline void set_stack_size_at_create(size_t value) {
1473 _stack_size_at_create = value;
1474 }
1475
1476 #ifndef SERIALGC
1477 // SATB marking queue support
1478 ObjPtrQueue& satb_mark_queue() { return _satb_mark_queue; }
1479 static SATBMarkQueueSet& satb_mark_queue_set() {
1480 return _satb_mark_queue_set;
1481 }
1482
1483 // Dirty card queue support
1484 DirtyCardQueue& dirty_card_queue() { return _dirty_card_queue; }
1485 static DirtyCardQueueSet& dirty_card_queue_set() {
1486 return _dirty_card_queue_set;
1487 }
1488 #endif // !SERIALGC
1489
1490 // Machine dependent stuff
1491 #include "incls/_thread_pd.hpp.incl"
1492
1493 public:
1494 void set_blocked_on_compilation(bool value) {
1495 _blocked_on_compilation = value;
1496 }
1497
1498 bool blocked_on_compilation() {
1499 return _blocked_on_compilation;
1500 }
1501 protected:
1502 bool _blocked_on_compilation;
1503
1504
1505 // JSR166 per-thread parker
1506 private:
1507 Parker* _parker;
1508 public:
1509 Parker* parker() { return _parker; }
1510
1511 // Biased locking support
1823 FreeNext = NULL ;
1824 ListNext = NULL ;
1825 ListPrev = NULL ;
1826 OnList = 0 ;
1827 TState = 0 ;
1828 Notified = 0 ;
1829 IsWaiting = 0 ;
1830 }
1831
1832 // We use placement-new to force ParkEvent instances to be
1833 // aligned on 256-byte address boundaries. This ensures that the least
1834 // significant byte of a ParkEvent address is always 0.
1835
1836 void * operator new (size_t sz) ;
1837 void operator delete (void * a) ;
1838
1839 public:
1840 static ParkEvent * Allocate (Thread * t) ;
1841 static void Release (ParkEvent * e) ;
1842 } ;
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_RUNTIME_THREAD_HPP
26 #define SHARE_VM_RUNTIME_THREAD_HPP
27
28 #include "memory/allocation.hpp"
29 #include "memory/threadLocalAllocBuffer.hpp"
30 #include "oops/oop.hpp"
31 #include "prims/jni.h"
32 #include "prims/jvmtiExport.hpp"
33 #include "runtime/frame.hpp"
34 #include "runtime/javaFrameAnchor.hpp"
35 #include "runtime/jniHandles.hpp"
36 #include "runtime/mutexLocker.hpp"
37 #include "runtime/os.hpp"
38 #include "runtime/osThread.hpp"
39 #include "runtime/safepoint.hpp"
40 #include "runtime/stubRoutines.hpp"
41 #include "runtime/threadLocalStorage.hpp"
42 #include "runtime/unhandledOops.hpp"
43 #include "utilities/exceptions.hpp"
44 #include "utilities/top.hpp"
45 #ifndef SERIALGC
46 #include "gc_implementation/g1/dirtyCardQueue.hpp"
47 #include "gc_implementation/g1/satbQueue.hpp"
48 #endif
49 #ifdef ZERO
50 #ifdef TARGET_ARCH_zero
51 # include "stack_zero.hpp"
52 #endif
53 #endif
54
55 class ThreadSafepointState;
56 class ThreadProfiler;
57
58 class JvmtiThreadState;
59 class JvmtiGetLoadedClassesClosure;
60 class ThreadStatistics;
61 class ConcurrentLocksDump;
62 class ParkEvent ;
63
64 class ciEnv;
65 class CompileThread;
66 class CompileLog;
67 class CompileTask;
68 class CompileQueue;
69 class CompilerCounters;
70 class vframeArray;
71
72 class DeoptResourceMark;
73 class jvmtiDeferredLocalVariableSet;
74
1501 }
1502 static inline void set_stack_size_at_create(size_t value) {
1503 _stack_size_at_create = value;
1504 }
1505
1506 #ifndef SERIALGC
1507 // SATB marking queue support
1508 ObjPtrQueue& satb_mark_queue() { return _satb_mark_queue; }
1509 static SATBMarkQueueSet& satb_mark_queue_set() {
1510 return _satb_mark_queue_set;
1511 }
1512
1513 // Dirty card queue support
1514 DirtyCardQueue& dirty_card_queue() { return _dirty_card_queue; }
1515 static DirtyCardQueueSet& dirty_card_queue_set() {
1516 return _dirty_card_queue_set;
1517 }
1518 #endif // !SERIALGC
1519
1520 // Machine dependent stuff
1521 #ifdef TARGET_OS_ARCH_linux_x86
1522 # include "thread_linux_x86.hpp"
1523 #endif
1524 #ifdef TARGET_OS_ARCH_linux_sparc
1525 # include "thread_linux_sparc.hpp"
1526 #endif
1527 #ifdef TARGET_OS_ARCH_linux_zero
1528 # include "thread_linux_zero.hpp"
1529 #endif
1530 #ifdef TARGET_OS_ARCH_solaris_x86
1531 # include "thread_solaris_x86.hpp"
1532 #endif
1533 #ifdef TARGET_OS_ARCH_solaris_sparc
1534 # include "thread_solaris_sparc.hpp"
1535 #endif
1536 #ifdef TARGET_OS_ARCH_windows_x86
1537 # include "thread_windows_x86.hpp"
1538 #endif
1539
1540
1541 public:
1542 void set_blocked_on_compilation(bool value) {
1543 _blocked_on_compilation = value;
1544 }
1545
1546 bool blocked_on_compilation() {
1547 return _blocked_on_compilation;
1548 }
1549 protected:
1550 bool _blocked_on_compilation;
1551
1552
1553 // JSR166 per-thread parker
1554 private:
1555 Parker* _parker;
1556 public:
1557 Parker* parker() { return _parker; }
1558
1559 // Biased locking support
1871 FreeNext = NULL ;
1872 ListNext = NULL ;
1873 ListPrev = NULL ;
1874 OnList = 0 ;
1875 TState = 0 ;
1876 Notified = 0 ;
1877 IsWaiting = 0 ;
1878 }
1879
1880 // We use placement-new to force ParkEvent instances to be
1881 // aligned on 256-byte address boundaries. This ensures that the least
1882 // significant byte of a ParkEvent address is always 0.
1883
1884 void * operator new (size_t sz) ;
1885 void operator delete (void * a) ;
1886
1887 public:
1888 static ParkEvent * Allocate (Thread * t) ;
1889 static void Release (ParkEvent * e) ;
1890 } ;
1891
1892 #endif // SHARE_VM_RUNTIME_THREAD_HPP
|