hotspot/src/os/aix/vm/libo4.hpp
author goetz
Thu, 21 Jan 2016 12:37:47 +0100
changeset 35594 cc13089c6327
parent 34647 fafb32d71489
child 39298 0517ab37a67c
permissions -rw-r--r--
8147937: Adapt SAP copyrights to new company name. Reviewed-by: simonis, stuefe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     1
/*
35594
cc13089c6327 8147937: Adapt SAP copyrights to new company name.
goetz
parents: 34647
diff changeset
     2
 * Copyright (c) 2012, 2015 SAP SE. All rights reserved.
34647
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     4
 *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     7
 * published by the Free Software Foundation.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     8
 *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    13
 * accompanied this code).
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    14
 *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    18
 *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    21
 * questions.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    22
 *
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    23
 */
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    24
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    25
// A C++ wrapper around the libo4 porting library. The libo4 porting library
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    26
// is a set of bridge functions into native AS/400 functionality.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    27
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    28
#ifndef OS_AIX_VM_LIBO4_HPP
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    29
#define OS_AIX_VM_LIBO4_HPP
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    30
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    31
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    32
class libo4 {
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    33
public:
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    34
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    35
  // Initialize the libo4 porting library.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    36
  // Returns true if succeeded, false if error.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    37
  static bool init();
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    38
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    39
  // cleanup of the libo4 porting library.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    40
  static void cleanup();
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    41
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    42
  // returns a number of memory statistics from the
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    43
  // AS/400.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    44
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    45
  // Specify NULL for numbers you are not interested in.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    46
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    47
  // returns false if an error happened. Activate OsMisc trace for
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    48
  // trace output.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    49
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    50
  static bool get_memory_info (unsigned long long* p_virt_total, unsigned long long* p_real_total,
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    51
    unsigned long long* p_real_free, unsigned long long* p_pgsp_total, unsigned long long* p_pgsp_free);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    52
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    53
  // returns information about system load
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    54
  // (similar to "loadavg()" under other Unices)
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    55
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    56
  // Specify NULL for numbers you are not interested in.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    57
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    58
  // returns false if an error happened. Activate OsMisc trace for
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    59
  // trace output.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    60
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    61
  static bool get_load_avg (double* p_avg1, double* p_avg5, double* p_avg15);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    62
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    63
  // this is a replacement for the "realpath()" API which does not really work
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    64
  // on PASE
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    65
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    66
  // Specify NULL for numbers you are not interested in.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    67
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    68
  // returns false if an error happened. Activate OsMisc trace for
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    69
  // trace output.
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    70
  //
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    71
  static bool realpath (const char* file_name,
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    72
      char* resolved_name, int resolved_name_len);
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    73
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    74
};
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    75
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    76
#endif // OS_AIX_VM_LIBO4_HPP
fafb32d71489 8143125: [aix] Further Developments for AIX
stuefe
parents:
diff changeset
    77