< prev index next >

src/hotspot/os/solaris/os_solaris.hpp

Print this page
rev 58072 : [mq]: v2
   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  *


 102   static size_t page_size_for_alignment(size_t alignment);
 103   static bool setup_large_pages(caddr_t start, size_t bytes, size_t align);
 104 
 105   static void try_enable_extended_io();
 106 
 107   static struct sigaction *(*get_signal_action)(int);
 108   static struct sigaction *get_preinstalled_handler(int);
 109   static int (*get_libjsig_version)();
 110   static void save_preinstalled_handler(int, struct sigaction&);
 111   static void check_signal_handler(int sig);
 112 
 113   typedef int (*pthread_setname_np_func_t)(pthread_t, const char*);
 114   static pthread_setname_np_func_t _pthread_setname_np;
 115 
 116  public:
 117   // Large Page Support--ISM.
 118   static bool largepage_range(char* addr, size_t size);
 119 
 120   static address handler_start, handler_end; // start and end pc of thr_sighndlrinfo
 121 
 122   static bool valid_stack_address(Thread* thread, address sp);
 123   static bool valid_ucontext(Thread* thread, const ucontext_t* valid, const ucontext_t* suspect);
 124   static const ucontext_t* get_valid_uc_in_signal_handler(Thread* thread,
 125                                                     const ucontext_t* uc);
 126 
 127   static ExtendedPC  ucontext_get_ExtendedPC(const ucontext_t* uc);
 128   static intptr_t*   ucontext_get_sp(const ucontext_t* uc);
 129   // ucontext_get_fp() is only used by Solaris X86 (see note below)
 130   static intptr_t*   ucontext_get_fp(const ucontext_t* uc);
 131   static address    ucontext_get_pc(const ucontext_t* uc);
 132   static void ucontext_set_pc(ucontext_t* uc, address pc);
 133 
 134   // For Analyzer Forte AsyncGetCallTrace profiling support:
 135   // Parameter ret_fp is only used by Solaris X86.
 136   //
 137   // We should have different declarations of this interface in
 138   // os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file
 139   // provides extensions to the os class and not the Solaris class.
 140   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, const ucontext_t* uc,
 141                                               intptr_t** ret_sp, intptr_t** ret_fp);
 142 


   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  *


 102   static size_t page_size_for_alignment(size_t alignment);
 103   static bool setup_large_pages(caddr_t start, size_t bytes, size_t align);
 104 
 105   static void try_enable_extended_io();
 106 
 107   static struct sigaction *(*get_signal_action)(int);
 108   static struct sigaction *get_preinstalled_handler(int);
 109   static int (*get_libjsig_version)();
 110   static void save_preinstalled_handler(int, struct sigaction&);
 111   static void check_signal_handler(int sig);
 112 
 113   typedef int (*pthread_setname_np_func_t)(pthread_t, const char*);
 114   static pthread_setname_np_func_t _pthread_setname_np;
 115 
 116  public:
 117   // Large Page Support--ISM.
 118   static bool largepage_range(char* addr, size_t size);
 119 
 120   static address handler_start, handler_end; // start and end pc of thr_sighndlrinfo
 121 

 122   static bool valid_ucontext(Thread* thread, const ucontext_t* valid, const ucontext_t* suspect);
 123   static const ucontext_t* get_valid_uc_in_signal_handler(Thread* thread,
 124                                                     const ucontext_t* uc);
 125 
 126   static ExtendedPC  ucontext_get_ExtendedPC(const ucontext_t* uc);
 127   static intptr_t*   ucontext_get_sp(const ucontext_t* uc);
 128   // ucontext_get_fp() is only used by Solaris X86 (see note below)
 129   static intptr_t*   ucontext_get_fp(const ucontext_t* uc);
 130   static address    ucontext_get_pc(const ucontext_t* uc);
 131   static void ucontext_set_pc(ucontext_t* uc, address pc);
 132 
 133   // For Analyzer Forte AsyncGetCallTrace profiling support:
 134   // Parameter ret_fp is only used by Solaris X86.
 135   //
 136   // We should have different declarations of this interface in
 137   // os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file
 138   // provides extensions to the os class and not the Solaris class.
 139   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, const ucontext_t* uc,
 140                                               intptr_t** ret_sp, intptr_t** ret_fp);
 141 


< prev index next >