64 # include <dlfcn.h>
65 # include <stdio.h>
66 # include <unistd.h>
67 # include <sys/resource.h>
68 # include <thread.h>
69 # include <sys/stat.h>
70 # include <sys/time.h>
71 # include <sys/filio.h>
72 # include <sys/utsname.h>
73 # include <sys/systeminfo.h>
74 # include <sys/socket.h>
75 # include <sys/lwp.h>
76 # include <poll.h>
77 # include <sys/lwp.h>
78
79 # define _STRUCTURED_PROC 1 // this gets us the new structured proc interfaces of 5.6 & later
80 # include <sys/procfs.h> // see comment in <sys/procfs.h>
81
82 #define MAX_PATH (2 * K)
83
84 // Minimum stack size for the VM. It's easier to document a constant
85 // but it's different for x86 and sparc because the page sizes are different.
86 #ifdef _LP64
87 size_t os::Posix::_compiler_thread_min_stack_allowed = 128 * K;
88 size_t os::Posix::_java_thread_min_stack_allowed = 128 * K;
89 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 128 * K;
90 #else
91 size_t os::Posix::_compiler_thread_min_stack_allowed = 96 * K;
92 size_t os::Posix::_java_thread_min_stack_allowed = 96 * K;
93 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 96 * K;
94 #endif
95
96 int os::Solaris::max_register_window_saves_before_flushing() {
97 // We should detect this at run time. For now, filling
98 // in with a constant.
99 return 8;
100 }
101
102 static void handle_unflushed_register_windows(gwindows_t *win) {
103 int restore_count = win->wbcnt;
104 int i;
105
106 for(i=0; i<restore_count; i++) {
107 address sp = ((address)win->spbuf[i]) + STACK_BIAS;
108 address reg_win = (address)&win->wbuf[i];
109 memcpy(sp,reg_win,sizeof(struct rwindow));
110 }
111 }
112
|
64 # include <dlfcn.h>
65 # include <stdio.h>
66 # include <unistd.h>
67 # include <sys/resource.h>
68 # include <thread.h>
69 # include <sys/stat.h>
70 # include <sys/time.h>
71 # include <sys/filio.h>
72 # include <sys/utsname.h>
73 # include <sys/systeminfo.h>
74 # include <sys/socket.h>
75 # include <sys/lwp.h>
76 # include <poll.h>
77 # include <sys/lwp.h>
78
79 # define _STRUCTURED_PROC 1 // this gets us the new structured proc interfaces of 5.6 & later
80 # include <sys/procfs.h> // see comment in <sys/procfs.h>
81
82 #define MAX_PATH (2 * K)
83
84 // Minimum usable stack sizes required to get to user code. Space for VM
85 // guard pages is added later.
86 size_t os::Posix::_compiler_thread_min_stack_allowed = 104 * K;
87 size_t os::Posix::_java_thread_min_stack_allowed = 86 * K;
88 #ifdef _LP64
89 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 128 * K;
90 #else
91 size_t os::Posix::_vm_internal_thread_min_stack_allowed = 96 * K;
92 #endif
93
94 int os::Solaris::max_register_window_saves_before_flushing() {
95 // We should detect this at run time. For now, filling
96 // in with a constant.
97 return 8;
98 }
99
100 static void handle_unflushed_register_windows(gwindows_t *win) {
101 int restore_count = win->wbcnt;
102 int i;
103
104 for(i=0; i<restore_count; i++) {
105 address sp = ((address)win->spbuf[i]) + STACK_BIAS;
106 address reg_win = (address)&win->wbuf[i];
107 memcpy(sp,reg_win,sizeof(struct rwindow));
108 }
109 }
110
|