< prev index next >

src/hotspot/os/linux/gc/z/zNUMA_linux.cpp

Print this page




   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  */
  23 
  24 #include "gc/z/zErrno.hpp"
  25 #include "gc/z/zCPU.hpp"
  26 #include "gc/z/zNUMA.hpp"
  27 #include "runtime/globals.hpp"
  28 #include "runtime/os.hpp"
  29 #include "utilities/debug.hpp"
  30 
  31 #include <unistd.h>
  32 #include <sys/syscall.h>
  33 
  34 #ifndef MPOL_F_NODE
  35 #define MPOL_F_NODE     (1<<0)  // Return next IL mode instead of node mask
  36 #endif
  37 
  38 #ifndef MPOL_F_ADDR
  39 #define MPOL_F_ADDR     (1<<1)  // Look up VMA using address
  40 #endif
  41 
  42 static int z_get_mempolicy(uint32_t* mode, const unsigned long *nmask, unsigned long maxnode, uintptr_t addr, int flags) {
  43   return syscall(SYS_get_mempolicy, mode, nmask, maxnode, addr, flags);
  44 }
  45 
  46 void ZNUMA::initialize_platform() {
  47   _enabled = UseNUMA;




   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  */
  23 
  24 #include "gc/z/zErrno.hpp"
  25 #include "gc/z/zCPU.hpp"
  26 #include "gc/z/zNUMA.hpp"

  27 #include "runtime/os.hpp"
  28 #include "utilities/debug.hpp"
  29 
  30 #include <unistd.h>
  31 #include <sys/syscall.h>
  32 
  33 #ifndef MPOL_F_NODE
  34 #define MPOL_F_NODE     (1<<0)  // Return next IL mode instead of node mask
  35 #endif
  36 
  37 #ifndef MPOL_F_ADDR
  38 #define MPOL_F_ADDR     (1<<1)  // Look up VMA using address
  39 #endif
  40 
  41 static int z_get_mempolicy(uint32_t* mode, const unsigned long *nmask, unsigned long maxnode, uintptr_t addr, int flags) {
  42   return syscall(SYS_get_mempolicy, mode, nmask, maxnode, addr, flags);
  43 }
  44 
  45 void ZNUMA::initialize_platform() {
  46   _enabled = UseNUMA;


< prev index next >