src/os/aix/vm/libperfstat_aix.hpp

Wed, 31 Jan 2018 19:24:57 -0500

author
dbuck
date
Wed, 31 Jan 2018 19:24:57 -0500
changeset 9289
427b2fb1944f
parent 0
f90c822e73f8
permissions
-rw-r--r--

8189170: Add option to disable stack overflow checking in primordial thread for use with JNI_CreateJavaJVM
Reviewed-by: dcubed

     1 /*
     2  * Copyright 2012, 2013 SAP AG. 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  *
    23  */
    25 // encapsulates the libperfstat library.
    26 //
    27 // The purpose of this code is to dynamically load the libperfstat library
    28 // instead of statically linking against it. The libperfstat library is an
    29 // AIX-specific library which only exists on AIX, not on PASE. If I want to
    30 // share binaries between AIX and PASE, I cannot directly link against libperfstat.so.
    32 #ifndef OS_AIX_VM_LIBPERFSTAT_AIX_HPP
    33 #define OS_AIX_VM_LIBPERFSTAT_AIX_HPP
    35 #include <libperfstat.h>
    37 class libperfstat {
    39 public:
    41   // Load the libperfstat library (must be in LIBPATH).
    42   // Returns true if succeeded, false if error.
    43   static bool init();
    45   // cleanup of the libo4 porting library.
    46   static void cleanup();
    48   // direct wrappers for the libperfstat functionality. All they do is
    49   // to call the functions with the same name via function pointers.
    50   static int perfstat_cpu_total(perfstat_id_t *name, perfstat_cpu_total_t* userbuff,
    51                                 int sizeof_userbuff, int desired_number);
    53   static int perfstat_memory_total(perfstat_id_t *name, perfstat_memory_total_t* userbuff,
    54                                    int sizeof_userbuff, int desired_number);
    56   static void perfstat_reset();
    57 };
    59 #endif // OS_AIX_VM_LIBPERFSTAT_AIX_HPP

mercurial