1 /*
2 * Copyright (c) 1997, 2019, 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 *
520
521 // Callee copies into its own buffer.
522 Arguments::set_library_path(library_path);
523
524 FREE_C_HEAP_ARRAY(char, library_path);
525 FREE_C_HEAP_ARRAY(char, info);
526 }
527
528 // Extensions directories.
529 sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
530 Arguments::set_ext_dirs(buf);
531
532 FREE_C_HEAP_ARRAY(char, buf);
533
534 #undef SYS_EXT_DIR
535 #undef EXTENSIONS_DIR
536 }
537
538 void os::breakpoint() {
539 BREAKPOINT;
540 }
541
542 bool os::Solaris::valid_stack_address(Thread* thread, address sp) {
543 address stackStart = (address)thread->stack_base();
544 address stackEnd = (address)(stackStart - (address)thread->stack_size());
545 if (sp < stackStart && sp >= stackEnd) return true;
546 return false;
547 }
548
549 extern "C" void breakpoint() {
550 // use debugger to set breakpoint here
551 }
552
553 static thread_t main_thread;
554
555 // Thread start routine for all newly created threads
556 extern "C" void* thread_native_entry(void* thread_addr) {
557
558 Thread* thread = (Thread*)thread_addr;
559
560 thread->record_stack_base_and_size();
561
562 // Try to randomize the cache line index of hot stack frames.
563 // This helps when threads of the same stack traces evict each other's
564 // cache lines. The threads can be either from the same JVM instance, or
565 // from different JVM instances. The benefit is especially true for
566 // processors with hyperthreading technology.
|
1 /*
2 * Copyright (c) 1997, 2020, 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 *
520
521 // Callee copies into its own buffer.
522 Arguments::set_library_path(library_path);
523
524 FREE_C_HEAP_ARRAY(char, library_path);
525 FREE_C_HEAP_ARRAY(char, info);
526 }
527
528 // Extensions directories.
529 sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
530 Arguments::set_ext_dirs(buf);
531
532 FREE_C_HEAP_ARRAY(char, buf);
533
534 #undef SYS_EXT_DIR
535 #undef EXTENSIONS_DIR
536 }
537
538 void os::breakpoint() {
539 BREAKPOINT;
540 }
541
542 extern "C" void breakpoint() {
543 // use debugger to set breakpoint here
544 }
545
546 static thread_t main_thread;
547
548 // Thread start routine for all newly created threads
549 extern "C" void* thread_native_entry(void* thread_addr) {
550
551 Thread* thread = (Thread*)thread_addr;
552
553 thread->record_stack_base_and_size();
554
555 // Try to randomize the cache line index of hot stack frames.
556 // This helps when threads of the same stack traces evict each other's
557 // cache lines. The threads can be either from the same JVM instance, or
558 // from different JVM instances. The benefit is especially true for
559 // processors with hyperthreading technology.
|