src/os/linux/vm/jvm_linux.h

Wed, 27 Aug 2014 08:19:12 -0400

author
zgu
date
Wed, 27 Aug 2014 08:19:12 -0400
changeset 7074
833b0f92429a
parent 3344
11c26bfcf8c7
child 6876
710a3c8b516e
permissions
-rw-r--r--

8046598: Scalable Native memory tracking development
Summary: Enhance scalability of native memory tracking
Reviewed-by: coleenp, ctornqvi, gtriantafill

duke@435 1 /*
stefank@2314 2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef OS_LINUX_VM_JVM_LINUX_H
stefank@2314 26 #define OS_LINUX_VM_JVM_LINUX_H
stefank@2314 27
duke@435 28 /*
duke@435 29 // HotSpot integration note:
duke@435 30 //
duke@435 31 // This is derived from the JDK classic file:
duke@435 32 // "$JDK/src/solaris/javavm/export/jvm_md.h":15 (ver. 1.10 98/04/22)
duke@435 33 // All local includes have been commented out.
duke@435 34 */
duke@435 35
duke@435 36 #ifndef JVM_MD_H
duke@435 37 #define JVM_MD_H
duke@435 38
duke@435 39 /*
duke@435 40 * This file is currently collecting system-specific dregs for the
duke@435 41 * JNI conversion, which should be sorted out later.
duke@435 42 */
duke@435 43
duke@435 44 #include <dirent.h> /* For DIR */
duke@435 45 #include <sys/param.h> /* For MAXPATHLEN */
phh@3344 46 #include <sys/socket.h> /* For socklen_t */
duke@435 47 #include <unistd.h> /* For F_OK, R_OK, W_OK */
duke@435 48
duke@435 49 #define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"}
duke@435 50 #define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"}
duke@435 51 #define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"}
duke@435 52 #define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"}
duke@435 53 #define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"}
duke@435 54 #define AGENT_ONATTACH_SYMBOLS {"Agent_OnAttach"}
duke@435 55
duke@435 56 #define JNI_LIB_PREFIX "lib"
duke@435 57 #define JNI_LIB_SUFFIX ".so"
duke@435 58
duke@435 59 // Hack: MAXPATHLEN is 4095 on some Linux and 4096 on others. This may
duke@435 60 // cause problems if JVM and the rest of JDK are built on different
duke@435 61 // Linux releases. Here we define JVM_MAXPATHLEN to be MAXPATHLEN + 1,
duke@435 62 // so buffers declared in VM are always >= 4096.
duke@435 63 #define JVM_MAXPATHLEN MAXPATHLEN + 1
duke@435 64
duke@435 65 #define JVM_R_OK R_OK
duke@435 66 #define JVM_W_OK W_OK
duke@435 67 #define JVM_X_OK X_OK
duke@435 68 #define JVM_F_OK F_OK
duke@435 69
duke@435 70 /*
duke@435 71 * File I/O
duke@435 72 */
duke@435 73
duke@435 74 #include <sys/types.h>
duke@435 75 #include <sys/stat.h>
duke@435 76 #include <fcntl.h>
duke@435 77 #include <errno.h>
duke@435 78
duke@435 79 /* O Flags */
duke@435 80
duke@435 81 #define JVM_O_RDONLY O_RDONLY
duke@435 82 #define JVM_O_WRONLY O_WRONLY
duke@435 83 #define JVM_O_RDWR O_RDWR
duke@435 84 #define JVM_O_O_APPEND O_APPEND
duke@435 85 #define JVM_O_EXCL O_EXCL
duke@435 86 #define JVM_O_CREAT O_CREAT
duke@435 87
duke@435 88 /* Signal definitions */
duke@435 89
duke@435 90 #define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */
duke@435 91 #define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */
duke@435 92 #define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */
duke@435 93 #define SHUTDOWN2_SIGNAL SIGINT
duke@435 94 #define SHUTDOWN3_SIGNAL SIGTERM
duke@435 95
duke@435 96 #endif /* JVM_MD_H */
duke@435 97
stefank@2314 98 #endif // OS_LINUX_VM_JVM_LINUX_H

mercurial