Mercurial > hg > graal-jvmci-8
comparison src/os/windows/vm/os_windows.hpp @ 6275:957c266d8bc5
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Aug 2012 10:39:19 +0200 |
parents | d2a62e0f25eb |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
5891:fd8832ae511d | 6275:957c266d8bc5 |
---|---|
25 #ifndef OS_WINDOWS_VM_OS_WINDOWS_HPP | 25 #ifndef OS_WINDOWS_VM_OS_WINDOWS_HPP |
26 #define OS_WINDOWS_VM_OS_WINDOWS_HPP | 26 #define OS_WINDOWS_VM_OS_WINDOWS_HPP |
27 // Win32_OS defines the interface to windows operating systems | 27 // Win32_OS defines the interface to windows operating systems |
28 | 28 |
29 class win32 { | 29 class win32 { |
30 friend class os; | |
30 | 31 |
31 protected: | 32 protected: |
32 static int _vm_page_size; | 33 static int _vm_page_size; |
33 static int _vm_allocation_granularity; | 34 static int _vm_allocation_granularity; |
34 static int _processor_type; | 35 static int _processor_type; |
37 static size_t _default_stack_size; | 38 static size_t _default_stack_size; |
38 static bool _is_nt; | 39 static bool _is_nt; |
39 static bool _is_windows_2003; | 40 static bool _is_windows_2003; |
40 static bool _is_windows_server; | 41 static bool _is_windows_server; |
41 | 42 |
43 static void print_windows_version(outputStream* st); | |
44 | |
42 public: | 45 public: |
43 // Windows-specific interface: | 46 // Windows-specific interface: |
44 static void initialize_system_info(); | 47 static void initialize_system_info(); |
45 static void setmode_streams(); | 48 static void setmode_streams(); |
46 | 49 |
93 | 96 |
94 // filter function to ignore faults on serializations page | 97 // filter function to ignore faults on serializations page |
95 static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e); | 98 static LONG WINAPI serialize_fault_filter(struct _EXCEPTION_POINTERS* e); |
96 }; | 99 }; |
97 | 100 |
98 class PlatformEvent : public CHeapObj { | 101 class PlatformEvent : public CHeapObj<mtInternal> { |
99 private: | 102 private: |
100 double CachePad [4] ; // increase odds that _Event is sole occupant of cache line | 103 double CachePad [4] ; // increase odds that _Event is sole occupant of cache line |
101 volatile int _Event ; | 104 volatile int _Event ; |
102 HANDLE _ParkHandle ; | 105 HANDLE _ParkHandle ; |
103 | 106 |
119 int park (jlong millis) ; | 122 int park (jlong millis) ; |
120 } ; | 123 } ; |
121 | 124 |
122 | 125 |
123 | 126 |
124 class PlatformParker : public CHeapObj { | 127 class PlatformParker : public CHeapObj<mtInternal> { |
125 protected: | 128 protected: |
126 HANDLE _ParkEvent ; | 129 HANDLE _ParkEvent ; |
127 | 130 |
128 public: | 131 public: |
129 ~PlatformParker () { guarantee (0, "invariant") ; } | 132 ~PlatformParker () { guarantee (0, "invariant") ; } |
177 static BOOL NumaCallsAvailable(); | 180 static BOOL NumaCallsAvailable(); |
178 static LPVOID VirtualAllocExNuma(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD); | 181 static LPVOID VirtualAllocExNuma(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD); |
179 static BOOL GetNumaHighestNodeNumber(PULONG); | 182 static BOOL GetNumaHighestNodeNumber(PULONG); |
180 static BOOL GetNumaNodeProcessorMask(UCHAR, PULONGLONG); | 183 static BOOL GetNumaNodeProcessorMask(UCHAR, PULONGLONG); |
181 | 184 |
185 // Stack walking | |
186 static USHORT RtlCaptureStackBackTrace(ULONG, ULONG, PVOID*, PULONG); | |
187 | |
182 private: | 188 private: |
183 // GetLargePageMinimum available on Windows Vista/Windows Server 2003 | 189 // GetLargePageMinimum available on Windows Vista/Windows Server 2003 |
184 // and later | 190 // and later |
185 // NUMA calls available Windows Vista/WS2008 and later | 191 // NUMA calls available Windows Vista/WS2008 and later |
186 | 192 |
187 static SIZE_T (WINAPI *_GetLargePageMinimum)(void); | 193 static SIZE_T (WINAPI *_GetLargePageMinimum)(void); |
188 static LPVOID (WINAPI *_VirtualAllocExNuma) (HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD); | 194 static LPVOID (WINAPI *_VirtualAllocExNuma) (HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD); |
189 static BOOL (WINAPI *_GetNumaHighestNodeNumber) (PULONG); | 195 static BOOL (WINAPI *_GetNumaHighestNodeNumber) (PULONG); |
190 static BOOL (WINAPI *_GetNumaNodeProcessorMask) (UCHAR, PULONGLONG); | 196 static BOOL (WINAPI *_GetNumaNodeProcessorMask) (UCHAR, PULONGLONG); |
197 static USHORT (WINAPI *_RtlCaptureStackBackTrace)(ULONG, ULONG, PVOID*, PULONG); | |
191 static BOOL initialized; | 198 static BOOL initialized; |
192 | 199 |
193 static void initialize(); | 200 static void initialize(); |
194 static void initializeCommon(); | 201 static void initializeCommon(); |
195 | 202 |