1 /*
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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 *
75 static int _page_size;
76
77 static julong available_memory();
78 static julong physical_memory() { return _physical_memory; }
79 static void initialize_system_info();
80
81 static bool supports_variable_stack_size();
82
83 static void rebuild_cpu_to_node_map();
84 static GrowableArray<int>* cpu_to_node() { return _cpu_to_node; }
85
86 static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
87
88 public:
89
90 static void init_thread_fpu_state();
91 static pthread_t main_thread(void) { return _main_thread; }
92
93 static void hotspot_sigmask(Thread* thread);
94
95 static bool is_initial_thread(void);
96 static pid_t gettid();
97
98 static int page_size(void) { return _page_size; }
99 static void set_page_size(int val) { _page_size = val; }
100
101 static address ucontext_get_pc(ucontext_t* uc);
102 static intptr_t* ucontext_get_sp(ucontext_t* uc);
103 static intptr_t* ucontext_get_fp(ucontext_t* uc);
104
105 // For Analyzer Forte AsyncGetCallTrace profiling support:
106 //
107 // This interface should be declared in os_bsd_i486.hpp, but
108 // that file provides extensions to the os class and not the
109 // Bsd class.
110 static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
111 intptr_t** ret_sp, intptr_t** ret_fp);
112
113 // This boolean allows users to forward their own non-matching signals
114 // to JVM_handle_bsd_signal, harmlessly.
115 static bool signal_handlers_are_installed;
|
1 /*
2 * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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 *
75 static int _page_size;
76
77 static julong available_memory();
78 static julong physical_memory() { return _physical_memory; }
79 static void initialize_system_info();
80
81 static bool supports_variable_stack_size();
82
83 static void rebuild_cpu_to_node_map();
84 static GrowableArray<int>* cpu_to_node() { return _cpu_to_node; }
85
86 static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
87
88 public:
89
90 static void init_thread_fpu_state();
91 static pthread_t main_thread(void) { return _main_thread; }
92
93 static void hotspot_sigmask(Thread* thread);
94
95 static pid_t gettid();
96
97 static int page_size(void) { return _page_size; }
98 static void set_page_size(int val) { _page_size = val; }
99
100 static address ucontext_get_pc(ucontext_t* uc);
101 static intptr_t* ucontext_get_sp(ucontext_t* uc);
102 static intptr_t* ucontext_get_fp(ucontext_t* uc);
103
104 // For Analyzer Forte AsyncGetCallTrace profiling support:
105 //
106 // This interface should be declared in os_bsd_i486.hpp, but
107 // that file provides extensions to the os class and not the
108 // Bsd class.
109 static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
110 intptr_t** ret_sp, intptr_t** ret_fp);
111
112 // This boolean allows users to forward their own non-matching signals
113 // to JVM_handle_bsd_signal, harmlessly.
114 static bool signal_handlers_are_installed;
|