< prev index next >

src/os/aix/vm/os_aix.hpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2013 SAP AG. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.


 152 
 153   // Initialize libo4 (on PASE) and libperfstat (on AIX). Call this
 154   // before relying on functions from either lib, e.g. Aix::get_meminfo().
 155   static void initialize_libo4();
 156   static void initialize_libperfstat();
 157 
 158   static bool supports_variable_stack_size();
 159 
 160  public:
 161   static void init_thread_fpu_state();
 162   static pthread_t main_thread(void)                                { return _main_thread; }
 163   // returns kernel thread id (similar to LWP id on Solaris), which can be
 164   // used to access /proc
 165   static pid_t gettid();
 166   static void set_createThread_lock(Mutex* lk)                      { _createThread_lock = lk; }
 167   static Mutex* createThread_lock(void)                             { return _createThread_lock; }
 168   static void hotspot_sigmask(Thread* thread);
 169 
 170   // Given an address, returns the size of the page backing that address
 171   static size_t query_pagesize(void* p);
 172 
 173   // Return `true' if the calling thread is the primordial thread. The
 174   // primordial thread is the thread which contains the main function,
 175   // *not* necessarily the thread which initialized the VM by calling
 176   // JNI_CreateJavaVM.
 177   static bool is_primordial_thread(void);
 178 
 179   static int page_size(void) {
 180     assert(_page_size != -1, "not initialized");
 181     return _page_size;
 182   }
 183 
 184   // Accessor methods for stack page size which may be different from usual page size.
 185   static int stack_page_size(void) {
 186     assert(_stack_page_size != -1, "not initialized");
 187     return _stack_page_size;
 188   }
 189 
 190   // default shm page size. Read: what page size shared memory
 191   // will be backed with if no page size was set explicitly using shmctl(SHM_PAGESIZE).
 192   // Should be LDR_CNTRL SHMPSIZE.
 193   static int shm_default_page_size(void) {
 194     assert(_shm_default_page_size != -1, "not initialized");
 195     return _shm_default_page_size;
 196   }
 197 


   1 /*
   2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright 2013 SAP AG. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.


 152 
 153   // Initialize libo4 (on PASE) and libperfstat (on AIX). Call this
 154   // before relying on functions from either lib, e.g. Aix::get_meminfo().
 155   static void initialize_libo4();
 156   static void initialize_libperfstat();
 157 
 158   static bool supports_variable_stack_size();
 159 
 160  public:
 161   static void init_thread_fpu_state();
 162   static pthread_t main_thread(void)                                { return _main_thread; }
 163   // returns kernel thread id (similar to LWP id on Solaris), which can be
 164   // used to access /proc
 165   static pid_t gettid();
 166   static void set_createThread_lock(Mutex* lk)                      { _createThread_lock = lk; }
 167   static Mutex* createThread_lock(void)                             { return _createThread_lock; }
 168   static void hotspot_sigmask(Thread* thread);
 169 
 170   // Given an address, returns the size of the page backing that address
 171   static size_t query_pagesize(void* p);






 172 
 173   static int page_size(void) {
 174     assert(_page_size != -1, "not initialized");
 175     return _page_size;
 176   }
 177 
 178   // Accessor methods for stack page size which may be different from usual page size.
 179   static int stack_page_size(void) {
 180     assert(_stack_page_size != -1, "not initialized");
 181     return _stack_page_size;
 182   }
 183 
 184   // default shm page size. Read: what page size shared memory
 185   // will be backed with if no page size was set explicitly using shmctl(SHM_PAGESIZE).
 186   // Should be LDR_CNTRL SHMPSIZE.
 187   static int shm_default_page_size(void) {
 188     assert(_shm_default_page_size != -1, "not initialized");
 189     return _shm_default_page_size;
 190   }
 191 


< prev index next >