69 # include <sys/time.h>
70 # include <sys/filio.h>
71 # include <sys/utsname.h>
72 # include <sys/systeminfo.h>
73 # include <sys/socket.h>
74 # include <sys/trap.h>
75 # include <sys/lwp.h>
76 # include <poll.h>
77 # include <sys/lwp.h>
78 # include <procfs.h> // see comment in <sys/procfs.h>
79
80 #ifndef AMD64
81 // QQQ seems useless at this point
82 # define _STRUCTURED_PROC 1 // this gets us the new structured proc interfaces of 5.6 & later
83 #endif // AMD64
84 # include <sys/procfs.h> // see comment in <sys/procfs.h>
85
86
87 #define MAX_PATH (2 * K)
88
89 // Minimum stack sizes for the VM. It's easier to document a constant value
90 // but it's different for x86 and sparc because the page sizes are different.
91 #ifdef AMD64
92 size_t os::Posix::_compiler_thread_min_stack_allowed = 394 * K;
93 size_t os::Posix::_java_thread_min_stack_allowed = 224 * K;
94 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 224 * K;
95 #define REG_SP REG_RSP
96 #define REG_PC REG_RIP
97 #define REG_FP REG_RBP
98 #else
99 size_t os::Posix::_compiler_thread_min_stack_allowed = 64 * K;
100 size_t os::Posix::_java_thread_min_stack_allowed = 64 * K;
101 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 64 * K;
102 #define REG_SP UESP
103 #define REG_PC EIP
104 #define REG_FP EBP
105 // 4900493 counter to prevent runaway LDTR refresh attempt
106
107 static volatile int ldtr_refresh = 0;
108 // the libthread instruction that faults because of the stale LDTR
109
110 static const unsigned char movlfs[] = { 0x8e, 0xe0 // movl %eax,%fs
111 };
112 #endif // AMD64
113
114 char* os::non_memory_address_word() {
115 // Must never look like an address returned by reserve_memory,
116 // even in its subfields (as defined by the CPU immediate fields,
117 // if the CPU splits constants across multiple instructions).
118 return (char*) -1;
119 }
120
121 //
|
69 # include <sys/time.h>
70 # include <sys/filio.h>
71 # include <sys/utsname.h>
72 # include <sys/systeminfo.h>
73 # include <sys/socket.h>
74 # include <sys/trap.h>
75 # include <sys/lwp.h>
76 # include <poll.h>
77 # include <sys/lwp.h>
78 # include <procfs.h> // see comment in <sys/procfs.h>
79
80 #ifndef AMD64
81 // QQQ seems useless at this point
82 # define _STRUCTURED_PROC 1 // this gets us the new structured proc interfaces of 5.6 & later
83 #endif // AMD64
84 # include <sys/procfs.h> // see comment in <sys/procfs.h>
85
86
87 #define MAX_PATH (2 * K)
88
89 // Minimum usable stack sizes required to get to user code. Space for VM
90 // guard pages is added later.
91 #ifdef _LP64
92 size_t os::Posix::_compiler_thread_min_stack_allowed = 202 * K;
93 size_t os::Posix::_java_thread_min_stack_allowed = 48 * K;
94 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 224 * K;
95 #else
96 size_t os::Posix::_compiler_thread_min_stack_allowed = 32 * K;
97 size_t os::Posix::_java_thread_min_stack_allowed = 32 * K;
98 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 64 * K;
99 #endif // _LP64
100
101 #ifdef AMD64
102 #define REG_SP REG_RSP
103 #define REG_PC REG_RIP
104 #define REG_FP REG_RBP
105 #else
106 #define REG_SP UESP
107 #define REG_PC EIP
108 #define REG_FP EBP
109 // 4900493 counter to prevent runaway LDTR refresh attempt
110
111 static volatile int ldtr_refresh = 0;
112 // the libthread instruction that faults because of the stale LDTR
113
114 static const unsigned char movlfs[] = { 0x8e, 0xe0 // movl %eax,%fs
115 };
116 #endif // AMD64
117
118 char* os::non_memory_address_word() {
119 // Must never look like an address returned by reserve_memory,
120 // even in its subfields (as defined by the CPU immediate fields,
121 // if the CPU splits constants across multiple instructions).
122 return (char*) -1;
123 }
124
125 //
|