< prev index next >

src/os/bsd/vm/os_bsd.hpp

Print this page


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


  57 
  58 #ifdef __APPLE__
  59   // mach_absolute_time
  60   static mach_timebase_info_data_t _timebase_info;
  61   static volatile uint64_t         _max_abstime;
  62 #else
  63   static int (*_clock_gettime)(clockid_t, struct timespec *);
  64 #endif
  65 
  66   static GrowableArray<int>* _cpu_to_node;
  67 
  68  protected:
  69 
  70   static julong _physical_memory;
  71   static pthread_t _main_thread;
  72   static int _page_size;
  73 
  74   static julong available_memory();
  75   static julong physical_memory() { return _physical_memory; }
  76   static void initialize_system_info();
  77 
  78   static bool supports_variable_stack_size();
  79 
  80   static void rebuild_cpu_to_node_map();
  81   static GrowableArray<int>* cpu_to_node()    { return _cpu_to_node; }
  82 
  83   static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
  84 
  85  public:
  86 
  87   static void init_thread_fpu_state();
  88   static pthread_t main_thread(void)                                { return _main_thread; }
  89 
  90   static void hotspot_sigmask(Thread* thread);
  91 
  92   static bool is_initial_thread(void);
  93   static pid_t gettid();
  94 
  95   static int page_size(void)                                        { return _page_size; }
  96   static void set_page_size(int val)                                { _page_size = val; }
  97 
  98   static address   ucontext_get_pc(ucontext_t* uc);


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


  57 
  58 #ifdef __APPLE__
  59   // mach_absolute_time
  60   static mach_timebase_info_data_t _timebase_info;
  61   static volatile uint64_t         _max_abstime;
  62 #else
  63   static int (*_clock_gettime)(clockid_t, struct timespec *);
  64 #endif
  65 
  66   static GrowableArray<int>* _cpu_to_node;
  67 
  68  protected:
  69 
  70   static julong _physical_memory;
  71   static pthread_t _main_thread;
  72   static int _page_size;
  73 
  74   static julong available_memory();
  75   static julong physical_memory() { return _physical_memory; }
  76   static void initialize_system_info();


  77 
  78   static void rebuild_cpu_to_node_map();
  79   static GrowableArray<int>* cpu_to_node()    { return _cpu_to_node; }
  80 
  81   static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
  82 
  83  public:
  84 
  85   static void init_thread_fpu_state();
  86   static pthread_t main_thread(void)                                { return _main_thread; }
  87 
  88   static void hotspot_sigmask(Thread* thread);
  89 
  90   static bool is_initial_thread(void);
  91   static pid_t gettid();
  92 
  93   static int page_size(void)                                        { return _page_size; }
  94   static void set_page_size(int val)                                { _page_size = val; }
  95 
  96   static address   ucontext_get_pc(ucontext_t* uc);


< prev index next >