< prev index next >

src/os/bsd/vm/os_bsd.hpp

Print this page
rev 7968 : 8074552:  SafeFetch32 and SafeFetchN do not work in error handling
Summary: handle SafeFetch faults in secondary signal handlers
Reviewed-by: dholmes
Contributed-by: Thomas Stuefe


  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;
 116 
 117   static int get_our_sigflags(int);
 118   static void set_our_sigflags(int, int);
 119   static void signal_sets_init();
 120   static void install_signal_handlers();
 121   static void set_signal_handler(int, bool);




  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 void ucontext_set_pc(ucontext_t* uc, address pc);
 103   static intptr_t* ucontext_get_sp(ucontext_t* uc);
 104   static intptr_t* ucontext_get_fp(ucontext_t* uc);
 105 
 106   // For Analyzer Forte AsyncGetCallTrace profiling support:
 107   //
 108   // This interface should be declared in os_bsd_i486.hpp, but
 109   // that file provides extensions to the os class and not the
 110   // Bsd class.
 111   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc,
 112                                               intptr_t** ret_sp, intptr_t** ret_fp);
 113 
 114   // This boolean allows users to forward their own non-matching signals
 115   // to JVM_handle_bsd_signal, harmlessly.
 116   static bool signal_handlers_are_installed;
 117 
 118   static int get_our_sigflags(int);
 119   static void set_our_sigflags(int, int);
 120   static void signal_sets_init();
 121   static void install_signal_handlers();
 122   static void set_signal_handler(int, bool);


< prev index next >