< prev index next >

src/hotspot/os/bsd/os_bsd.hpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2017, 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  *


  86 
  87   // For Analyzer Forte AsyncGetCallTrace profiling support:
  88   //
  89   // This interface should be declared in os_bsd_i486.hpp, but
  90   // that file provides extensions to the os class and not the
  91   // Bsd class.
  92   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, const ucontext_t* uc,
  93                                               intptr_t** ret_sp, intptr_t** ret_fp);
  94 
  95   static bool get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* uc, frame* fr);
  96 
  97   // This boolean allows users to forward their own non-matching signals
  98   // to JVM_handle_bsd_signal, harmlessly.
  99   static bool signal_handlers_are_installed;
 100 
 101   static int get_our_sigflags(int);
 102   static void set_our_sigflags(int, int);
 103   static void signal_sets_init();
 104   static void install_signal_handlers();
 105   static void set_signal_handler(int, bool);
 106   static bool is_sig_ignored(int sig);
 107 
 108   static sigset_t* unblocked_signals();
 109   static sigset_t* vm_signals();
 110 
 111   // For signal-chaining
 112   static struct sigaction *get_chained_signal_action(int sig);
 113   static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
 114 
 115   // Real-time clock functions
 116   static void clock_init(void);
 117 
 118   // Stack repair handling
 119 
 120   // none present
 121 
 122  private:
 123   typedef int (*sched_getcpu_func_t)(void);
 124   typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
 125   typedef int (*numa_max_node_func_t)(void);
 126   typedef int (*numa_available_func_t)(void);


   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  *


  86 
  87   // For Analyzer Forte AsyncGetCallTrace profiling support:
  88   //
  89   // This interface should be declared in os_bsd_i486.hpp, but
  90   // that file provides extensions to the os class and not the
  91   // Bsd class.
  92   static ExtendedPC fetch_frame_from_ucontext(Thread* thread, const ucontext_t* uc,
  93                                               intptr_t** ret_sp, intptr_t** ret_fp);
  94 
  95   static bool get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* uc, frame* fr);
  96 
  97   // This boolean allows users to forward their own non-matching signals
  98   // to JVM_handle_bsd_signal, harmlessly.
  99   static bool signal_handlers_are_installed;
 100 
 101   static int get_our_sigflags(int);
 102   static void set_our_sigflags(int, int);
 103   static void signal_sets_init();
 104   static void install_signal_handlers();
 105   static void set_signal_handler(int, bool);

 106 
 107   static sigset_t* unblocked_signals();
 108   static sigset_t* vm_signals();
 109 
 110   // For signal-chaining
 111   static struct sigaction *get_chained_signal_action(int sig);
 112   static bool chained_handler(int sig, siginfo_t* siginfo, void* context);
 113 
 114   // Real-time clock functions
 115   static void clock_init(void);
 116 
 117   // Stack repair handling
 118 
 119   // none present
 120 
 121  private:
 122   typedef int (*sched_getcpu_func_t)(void);
 123   typedef int (*numa_node_to_cpus_func_t)(int node, unsigned long *buffer, int bufferlen);
 124   typedef int (*numa_max_node_func_t)(void);
 125   typedef int (*numa_available_func_t)(void);


< prev index next >