11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 // According to the AIX OS doc #pragma alloca must be used
27 // with C++ compiler before referencing the function alloca()
28 #pragma alloca
29
30 // no precompiled headers
31 #include "classfile/classLoader.hpp"
32 #include "classfile/systemDictionary.hpp"
33 #include "classfile/vmSymbols.hpp"
34 #include "code/icBuffer.hpp"
35 #include "code/vtableStubs.hpp"
36 #include "compiler/compileBroker.hpp"
37 #include "interpreter/interpreter.hpp"
38 #include "jvm_aix.h"
39 #include "logging/log.hpp"
40 #include "libo4.hpp"
41 #include "libperfstat_aix.hpp"
42 #include "libodm_aix.hpp"
43 #include "loadlib_aix.hpp"
44 #include "memory/allocation.inline.hpp"
45 #include "memory/filemap.hpp"
46 #include "misc_aix.hpp"
47 #include "oops/oop.inline.hpp"
48 #include "os_aix.inline.hpp"
49 #include "os_share_aix.hpp"
50 #include "porting_aix.hpp"
51 #include "prims/jniFastGetField.hpp"
52 #include "prims/jvm.h"
53 #include "prims/jvm_misc.hpp"
54 #include "runtime/arguments.hpp"
55 #include "runtime/atomic.hpp"
56 #include "runtime/extendedPC.hpp"
57 #include "runtime/globals.hpp"
58 #include "runtime/interfaceSupport.hpp"
59 #include "runtime/java.hpp"
60 #include "runtime/javaCalls.hpp"
61 #include "runtime/mutexLocker.hpp"
62 #include "runtime/objectMonitor.hpp"
63 #include "runtime/orderAccess.inline.hpp"
64 #include "runtime/os.hpp"
65 #include "runtime/osThread.hpp"
66 #include "runtime/perfMemory.hpp"
67 #include "runtime/sharedRuntime.hpp"
68 #include "runtime/statSampler.hpp"
69 #include "runtime/stubRoutines.hpp"
70 #include "runtime/thread.inline.hpp"
71 #include "runtime/threadCritical.hpp"
72 #include "runtime/timer.hpp"
3232
3233 void os::run_periodic_checks() {
3234
3235 if (check_signals == false) return;
3236
3237 // SEGV and BUS if overridden could potentially prevent
3238 // generation of hs*.log in the event of a crash, debugging
3239 // such a case can be very challenging, so we absolutely
3240 // check the following for a good measure:
3241 DO_SIGNAL_CHECK(SIGSEGV);
3242 DO_SIGNAL_CHECK(SIGILL);
3243 DO_SIGNAL_CHECK(SIGFPE);
3244 DO_SIGNAL_CHECK(SIGBUS);
3245 DO_SIGNAL_CHECK(SIGPIPE);
3246 DO_SIGNAL_CHECK(SIGXFSZ);
3247 if (UseSIGTRAP) {
3248 DO_SIGNAL_CHECK(SIGTRAP);
3249 }
3250
3251 // ReduceSignalUsage allows the user to override these handlers
3252 // see comments at the very top and jvm_solaris.h
3253 if (!ReduceSignalUsage) {
3254 DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
3255 DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);
3256 DO_SIGNAL_CHECK(SHUTDOWN3_SIGNAL);
3257 DO_SIGNAL_CHECK(BREAK_SIGNAL);
3258 }
3259
3260 DO_SIGNAL_CHECK(SR_signum);
3261 }
3262
3263 typedef int (*os_sigaction_t)(int, const struct sigaction *, struct sigaction *);
3264
3265 static os_sigaction_t os_sigaction = NULL;
3266
3267 void os::Aix::check_signal_handler(int sig) {
3268 char buf[O_BUFLEN];
3269 address jvmHandler = NULL;
3270
3271 struct sigaction act;
3272 if (os_sigaction == NULL) {
|
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 *
24 */
25
26 // According to the AIX OS doc #pragma alloca must be used
27 // with C++ compiler before referencing the function alloca()
28 #pragma alloca
29
30 // no precompiled headers
31 #include "jvm.h"
32 #include "classfile/classLoader.hpp"
33 #include "classfile/systemDictionary.hpp"
34 #include "classfile/vmSymbols.hpp"
35 #include "code/icBuffer.hpp"
36 #include "code/vtableStubs.hpp"
37 #include "compiler/compileBroker.hpp"
38 #include "interpreter/interpreter.hpp"
39 #include "jvm_aix.h"
40 #include "logging/log.hpp"
41 #include "libo4.hpp"
42 #include "libperfstat_aix.hpp"
43 #include "libodm_aix.hpp"
44 #include "loadlib_aix.hpp"
45 #include "memory/allocation.inline.hpp"
46 #include "memory/filemap.hpp"
47 #include "misc_aix.hpp"
48 #include "oops/oop.inline.hpp"
49 #include "os_aix.inline.hpp"
50 #include "os_share_aix.hpp"
51 #include "porting_aix.hpp"
52 #include "prims/jniFastGetField.hpp"
53 #include "prims/jvm_misc.hpp"
54 #include "runtime/arguments.hpp"
55 #include "runtime/atomic.hpp"
56 #include "runtime/extendedPC.hpp"
57 #include "runtime/globals.hpp"
58 #include "runtime/interfaceSupport.hpp"
59 #include "runtime/java.hpp"
60 #include "runtime/javaCalls.hpp"
61 #include "runtime/mutexLocker.hpp"
62 #include "runtime/objectMonitor.hpp"
63 #include "runtime/orderAccess.inline.hpp"
64 #include "runtime/os.hpp"
65 #include "runtime/osThread.hpp"
66 #include "runtime/perfMemory.hpp"
67 #include "runtime/sharedRuntime.hpp"
68 #include "runtime/statSampler.hpp"
69 #include "runtime/stubRoutines.hpp"
70 #include "runtime/thread.inline.hpp"
71 #include "runtime/threadCritical.hpp"
72 #include "runtime/timer.hpp"
3232
3233 void os::run_periodic_checks() {
3234
3235 if (check_signals == false) return;
3236
3237 // SEGV and BUS if overridden could potentially prevent
3238 // generation of hs*.log in the event of a crash, debugging
3239 // such a case can be very challenging, so we absolutely
3240 // check the following for a good measure:
3241 DO_SIGNAL_CHECK(SIGSEGV);
3242 DO_SIGNAL_CHECK(SIGILL);
3243 DO_SIGNAL_CHECK(SIGFPE);
3244 DO_SIGNAL_CHECK(SIGBUS);
3245 DO_SIGNAL_CHECK(SIGPIPE);
3246 DO_SIGNAL_CHECK(SIGXFSZ);
3247 if (UseSIGTRAP) {
3248 DO_SIGNAL_CHECK(SIGTRAP);
3249 }
3250
3251 // ReduceSignalUsage allows the user to override these handlers
3252 // see comments at the very top and jvm_md.h
3253 if (!ReduceSignalUsage) {
3254 DO_SIGNAL_CHECK(SHUTDOWN1_SIGNAL);
3255 DO_SIGNAL_CHECK(SHUTDOWN2_SIGNAL);
3256 DO_SIGNAL_CHECK(SHUTDOWN3_SIGNAL);
3257 DO_SIGNAL_CHECK(BREAK_SIGNAL);
3258 }
3259
3260 DO_SIGNAL_CHECK(SR_signum);
3261 }
3262
3263 typedef int (*os_sigaction_t)(int, const struct sigaction *, struct sigaction *);
3264
3265 static os_sigaction_t os_sigaction = NULL;
3266
3267 void os::Aix::check_signal_handler(int sig) {
3268 char buf[O_BUFLEN];
3269 address jvmHandler = NULL;
3270
3271 struct sigaction act;
3272 if (os_sigaction == NULL) {
|