This commit is contained in:
Mikael Vidstedt 2015-12-06 06:08:48 +00:00
commit 00df16e386
63 changed files with 8474 additions and 8412 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -39,7 +39,6 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@ -259,20 +258,3 @@ address InterpreterGenerator::generate_abstract_entry(void) {
return entry_point;
}
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
// This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
// the days we had adapter frames. When we deoptimize a situation where a
// compiled caller calls a compiled caller will have registers it expects
// to survive the call to the callee. If we deoptimize the callee the only
// way we can restore these registers is to have the oldest interpreter
// frame that we create restore these values. That is what this routine
// will accomplish.
// At the moment we have modified c2 to not have any callee save registers
// so this problem does not exist and this routine is just a place holder.
assert(f->is_interpreted_frame(), "must be interpreted");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,6 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@ -61,26 +60,6 @@
#define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
int AbstractInterpreter::BasicType_as_index(BasicType type) {
int i = 0;
switch (type) {
case T_BOOLEAN: i = 0; break;
case T_CHAR : i = 1; break;
case T_BYTE : i = 2; break;
case T_SHORT : i = 3; break;
case T_INT : i = 4; break;
case T_LONG : i = 5; break;
case T_VOID : i = 6; break;
case T_FLOAT : i = 7; break;
case T_DOUBLE : i = 8; break;
case T_OBJECT : i = 9; break;
case T_ARRAY : i = 9; break;
default : ShouldNotReachHere();
}
assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, "index out of bounds");
return i;
}
address AbstractInterpreterGenerator::generate_slow_signature_handler() {
// Slow_signature handler that respects the PPC C calling conventions.
//
@ -579,18 +558,3 @@ address InterpreterGenerator::generate_Reference_get_entry(void) {
return NULL;
}
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
// This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
// the days we had adapter frames. When we deoptimize a situation where a
// compiled caller calls a compiled caller will have registers it expects
// to survive the call to the callee. If we deoptimize the callee the only
// way we can restore these registers is to have the oldest interpreter
// frame that we create restore these values. That is what this routine
// will accomplish.
// At the moment we have modified c2 to not have any callee save registers
// so this problem does not exist and this routine is just a place holder.
assert(f->is_interpreted_frame(), "must be interpreted");
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2013, 2015 SAP AG. All rights reserved.
* Copyright (c) 2013, 2015 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,14 +28,17 @@
protected:
// Size of interpreter code. Increase if too small. Interpreter will
// Size of interpreter code. Increase if too small. Interpreter will
// fail with a guarantee ("not enough space for interpreter generation");
// if too small.
// Run with +PrintInterpreter to get the VM to print out the size.
// Max size with JVMTI
const static int InterpreterCodeSize = 230*K;
public:
// Support abs and sqrt like in compiler.
// For others we can use a normal (native) entry.
static bool math_entry_available(AbstractInterpreter::MethodKind kind);
#endif // CPU_PPC_VM_TEMPLATEINTERPRETER_PPC_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,6 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@ -62,30 +61,6 @@
//----------------------------------------------------------------------------------------------------
int AbstractInterpreter::BasicType_as_index(BasicType type) {
int i = 0;
switch (type) {
case T_BOOLEAN: i = 0; break;
case T_CHAR : i = 1; break;
case T_BYTE : i = 2; break;
case T_SHORT : i = 3; break;
case T_INT : i = 4; break;
case T_LONG : i = 5; break;
case T_VOID : i = 6; break;
case T_FLOAT : i = 7; break;
case T_DOUBLE : i = 8; break;
case T_OBJECT : i = 9; break;
case T_ARRAY : i = 9; break;
default : ShouldNotReachHere();
}
assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, "index out of bounds");
return i;
}
#ifndef _LP64
address AbstractInterpreterGenerator::generate_slow_signature_handler() {
address entry = __ pc();
@ -254,28 +229,3 @@ address InterpreterGenerator::generate_abstract_entry(void) {
return entry;
}
bool AbstractInterpreter::can_be_compiled(methodHandle m) {
// No special entry points that preclude compilation
return true;
}
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
// This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
// the days we had adapter frames. When we deoptimize a situation where a
// compiled caller calls a compiled caller will have registers it expects
// to survive the call to the callee. If we deoptimize the callee the only
// way we can restore these registers is to have the oldest interpreter
// frame that we create restore these values. That is what this routine
// will accomplish.
// At the moment we have modified c2 to not have any callee save registers
// so this problem does not exist and this routine is just a place holder.
assert(f->is_interpreted_frame(), "must be interpreted");
}
//----------------------------------------------------------------------------------------------------
// Exceptions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -175,6 +175,7 @@ class InterpreterMacroAssembler: public MacroAssembler {
movptr(rsp, Address(rbp, frame::interpreter_frame_monitor_block_top_offset * wordSize));
// NULL last_sp until next java call
movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD);
NOT_LP64(empty_FPU_stack());
}
// Helpers for swap and dup

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,6 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@ -184,20 +183,3 @@ address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKin
return entry_point;
}
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
// This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
// the days we had adapter frames. When we deoptimize a situation where a
// compiled caller calls a compiled caller will have registers it expects
// to survive the call to the callee. If we deoptimize the callee the only
// way we can restore these registers is to have the oldest interpreter
// frame that we create restore these values. That is what this routine
// will accomplish.
// At the moment we have modified c2 to not have any callee save registers
// so this problem does not exist and this routine is just a place holder.
assert(f->is_interpreted_frame(), "must be interpreted");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,6 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@ -298,19 +297,3 @@ address InterpreterGenerator::generate_math_entry(AbstractInterpreter::MethodKin
return entry_point;
}
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
// This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
// the days we had adapter frames. When we deoptimize a situation where a
// compiled caller calls a compiled caller will have registers it expects
// to survive the call to the callee. If we deoptimize the callee the only
// way we can restore these registers is to have the oldest interpreter
// frame that we create restore these values. That is what this routine
// will accomplish.
// At the moment we have modified c2 to not have any callee save registers
// so this problem does not exist and this routine is just a place holder.
assert(f->is_interpreted_frame(), "must be interpreted");
}

View File

@ -0,0 +1,305 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterGenerator.hpp"
#include "runtime/arguments.hpp"
#define __ _masm->
#ifndef CC_INTERP
/**
* Method entry for static native methods:
* int java.util.zip.CRC32.update(int crc, int b)
*/
address InterpreterGenerator::generate_CRC32_update_entry() {
if (UseCRC32Intrinsics) {
address entry = __ pc();
// rbx: Method*
// rsi: senderSP must preserved for slow path, set SP to it on fast path
// rdx: scratch
// rdi: scratch
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
ExternalAddress state(SafepointSynchronize::address_of_state());
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
SafepointSynchronize::_not_synchronized);
__ jcc(Assembler::notEqual, slow_path);
// We don't generate local frame and don't align stack because
// we call stub code and there is no safepoint on this path.
// Load parameters
const Register crc = rax; // crc
const Register val = rdx; // source java byte value
const Register tbl = rdi; // scratch
// Arguments are reversed on java expression stack
__ movl(val, Address(rsp, wordSize)); // byte value
__ movl(crc, Address(rsp, 2*wordSize)); // Initial CRC
__ lea(tbl, ExternalAddress(StubRoutines::crc_table_addr()));
__ notl(crc); // ~crc
__ update_byte_crc32(crc, val, tbl);
__ notl(crc); // ~crc
// result in rax
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set sp to sender sp
__ jmp(rdi);
// generate a vanilla native entry as the slow path
__ bind(slow_path);
__ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native));
return entry;
}
return NULL;
}
/**
* Method entry for static native methods:
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
*/
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
if (UseCRC32Intrinsics) {
address entry = __ pc();
// rbx,: Method*
// rsi: senderSP must preserved for slow path, set SP to it on fast path
// rdx: scratch
// rdi: scratch
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
ExternalAddress state(SafepointSynchronize::address_of_state());
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
SafepointSynchronize::_not_synchronized);
__ jcc(Assembler::notEqual, slow_path);
// We don't generate local frame and don't align stack because
// we call stub code and there is no safepoint on this path.
// Load parameters
const Register crc = rax; // crc
const Register buf = rdx; // source java byte array address
const Register len = rdi; // length
// value x86_32
// interp. arg ptr ESP + 4
// int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
// 3 2 1 0
// int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
// 4 2,3 1 0
// Arguments are reversed on java expression stack
__ movl(len, Address(rsp, 4 + 0)); // Length
// Calculate address of start element
if (kind == Interpreter::java_util_zip_CRC32_updateByteBuffer) {
__ movptr(buf, Address(rsp, 4 + 2 * wordSize)); // long buf
__ addptr(buf, Address(rsp, 4 + 1 * wordSize)); // + offset
__ movl(crc, Address(rsp, 4 + 4 * wordSize)); // Initial CRC
} else {
__ movptr(buf, Address(rsp, 4 + 2 * wordSize)); // byte[] array
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
__ addptr(buf, Address(rsp, 4 + 1 * wordSize)); // + offset
__ movl(crc, Address(rsp, 4 + 3 * wordSize)); // Initial CRC
}
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()), crc, buf, len);
// result in rax
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set sp to sender sp
__ jmp(rdi);
// generate a vanilla native entry as the slow path
__ bind(slow_path);
__ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native));
return entry;
}
return NULL;
}
/**
* Method entry for static native methods:
* int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end)
* int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end)
*/
address InterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
if (UseCRC32CIntrinsics) {
address entry = __ pc();
// Load parameters
const Register crc = rax; // crc
const Register buf = rcx; // source java byte array address
const Register len = rdx; // length
const Register end = len;
// value x86_32
// interp. arg ptr ESP + 4
// int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int end)
// 3 2 1 0
// int java.util.zip.CRC32.updateByteBuffer(int crc, long address, int off, int end)
// 4 2,3 1 0
// Arguments are reversed on java expression stack
__ movl(end, Address(rsp, 4 + 0)); // end
__ subl(len, Address(rsp, 4 + 1 * wordSize)); // end - offset == length
// Calculate address of start element
if (kind == Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer) {
__ movptr(buf, Address(rsp, 4 + 2 * wordSize)); // long address
__ addptr(buf, Address(rsp, 4 + 1 * wordSize)); // + offset
__ movl(crc, Address(rsp, 4 + 4 * wordSize)); // Initial CRC
} else {
__ movptr(buf, Address(rsp, 4 + 2 * wordSize)); // byte[] array
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
__ addptr(buf, Address(rsp, 4 + 1 * wordSize)); // + offset
__ movl(crc, Address(rsp, 4 + 3 * wordSize)); // Initial CRC
}
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32C()), crc, buf, len);
// result in rax
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set sp to sender sp
__ jmp(rdi);
return entry;
}
return NULL;
}
/**
* Method entry for static native method:
* java.lang.Float.intBitsToFloat(int bits)
*/
address InterpreterGenerator::generate_Float_intBitsToFloat_entry() {
if (UseSSE >= 1) {
address entry = __ pc();
// rsi: the sender's SP
// Skip safepoint check (compiler intrinsic versions of this method
// do not perform safepoint checks either).
// Load 'bits' into xmm0 (interpreter returns results in xmm0)
__ movflt(xmm0, Address(rsp, wordSize));
// Return
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set rsp to the sender's SP
__ jmp(rdi);
return entry;
}
return NULL;
}
/**
* Method entry for static native method:
* java.lang.Float.floatToRawIntBits(float value)
*/
address InterpreterGenerator::generate_Float_floatToRawIntBits_entry() {
if (UseSSE >= 1) {
address entry = __ pc();
// rsi: the sender's SP
// Skip safepoint check (compiler intrinsic versions of this method
// do not perform safepoint checks either).
// Load the parameter (a floating-point value) into rax.
__ movl(rax, Address(rsp, wordSize));
// Return
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set rsp to the sender's SP
__ jmp(rdi);
return entry;
}
return NULL;
}
/**
* Method entry for static native method:
* java.lang.Double.longBitsToDouble(long bits)
*/
address InterpreterGenerator::generate_Double_longBitsToDouble_entry() {
if (UseSSE >= 2) {
address entry = __ pc();
// rsi: the sender's SP
// Skip safepoint check (compiler intrinsic versions of this method
// do not perform safepoint checks either).
// Load 'bits' into xmm0 (interpreter returns results in xmm0)
__ movdbl(xmm0, Address(rsp, wordSize));
// Return
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set rsp to the sender's SP
__ jmp(rdi);
return entry;
}
return NULL;
}
/**
* Method entry for static native method:
* java.lang.Double.doubleToRawLongBits(double value)
*/
address InterpreterGenerator::generate_Double_doubleToRawLongBits_entry() {
if (UseSSE >= 2) {
address entry = __ pc();
// rsi: the sender's SP
// Skip safepoint check (compiler intrinsic versions of this method
// do not perform safepoint checks either).
// Load the parameter (a floating-point value) into rax.
__ movl(rdx, Address(rsp, 2*wordSize));
__ movl(rax, Address(rsp, wordSize));
// Return
__ pop(rdi); // get return address
__ mov(rsp, rsi); // set rsp to the sender's SP
__ jmp(rdi);
return entry;
}
return NULL;
}
#endif // CC_INTERP

View File

@ -0,0 +1,197 @@
/*
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/interpreterGenerator.hpp"
#include "runtime/arguments.hpp"
#define __ _masm->
#ifndef CC_INTERP
/**
* Method entry for static native methods:
* int java.util.zip.CRC32.update(int crc, int b)
*/
address InterpreterGenerator::generate_CRC32_update_entry() {
if (UseCRC32Intrinsics) {
address entry = __ pc();
// rbx,: Method*
// r13: senderSP must preserved for slow path, set SP to it on fast path
// c_rarg0: scratch (rdi on non-Win64, rcx on Win64)
// c_rarg1: scratch (rsi on non-Win64, rdx on Win64)
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
ExternalAddress state(SafepointSynchronize::address_of_state());
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
SafepointSynchronize::_not_synchronized);
__ jcc(Assembler::notEqual, slow_path);
// We don't generate local frame and don't align stack because
// we call stub code and there is no safepoint on this path.
// Load parameters
const Register crc = rax; // crc
const Register val = c_rarg0; // source java byte value
const Register tbl = c_rarg1; // scratch
// Arguments are reversed on java expression stack
__ movl(val, Address(rsp, wordSize)); // byte value
__ movl(crc, Address(rsp, 2*wordSize)); // Initial CRC
__ lea(tbl, ExternalAddress(StubRoutines::crc_table_addr()));
__ notl(crc); // ~crc
__ update_byte_crc32(crc, val, tbl);
__ notl(crc); // ~crc
// result in rax
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, r13); // set sp to sender sp
__ jmp(rdi);
// generate a vanilla native entry as the slow path
__ bind(slow_path);
__ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native));
return entry;
}
return NULL;
}
/**
* Method entry for static native methods:
* int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len)
* int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len)
*/
address InterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
if (UseCRC32Intrinsics) {
address entry = __ pc();
// rbx,: Method*
// r13: senderSP must preserved for slow path, set SP to it on fast path
Label slow_path;
// If we need a safepoint check, generate full interpreter entry.
ExternalAddress state(SafepointSynchronize::address_of_state());
__ cmp32(ExternalAddress(SafepointSynchronize::address_of_state()),
SafepointSynchronize::_not_synchronized);
__ jcc(Assembler::notEqual, slow_path);
// We don't generate local frame and don't align stack because
// we call stub code and there is no safepoint on this path.
// Load parameters
const Register crc = c_rarg0; // crc
const Register buf = c_rarg1; // source java byte array address
const Register len = c_rarg2; // length
const Register off = len; // offset (never overlaps with 'len')
// Arguments are reversed on java expression stack
// Calculate address of start element
if (kind == Interpreter::java_util_zip_CRC32_updateByteBuffer) {
__ movptr(buf, Address(rsp, 3*wordSize)); // long buf
__ movl2ptr(off, Address(rsp, 2*wordSize)); // offset
__ addq(buf, off); // + offset
__ movl(crc, Address(rsp, 5*wordSize)); // Initial CRC
} else {
__ movptr(buf, Address(rsp, 3*wordSize)); // byte[] array
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
__ movl2ptr(off, Address(rsp, 2*wordSize)); // offset
__ addq(buf, off); // + offset
__ movl(crc, Address(rsp, 4*wordSize)); // Initial CRC
}
// Can now load 'len' since we're finished with 'off'
__ movl(len, Address(rsp, wordSize)); // Length
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32()), crc, buf, len);
// result in rax
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, r13); // set sp to sender sp
__ jmp(rdi);
// generate a vanilla native entry as the slow path
__ bind(slow_path);
__ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native));
return entry;
}
return NULL;
}
/**
* Method entry for static native methods:
* int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end)
* int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end)
*/
address InterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) {
if (UseCRC32CIntrinsics) {
address entry = __ pc();
// Load parameters
const Register crc = c_rarg0; // crc
const Register buf = c_rarg1; // source java byte array address
const Register len = c_rarg2;
const Register off = c_rarg3; // offset
const Register end = len;
// Arguments are reversed on java expression stack
// Calculate address of start element
if (kind == Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer) {
__ movptr(buf, Address(rsp, 3 * wordSize)); // long buf
__ movl2ptr(off, Address(rsp, 2 * wordSize)); // offset
__ addq(buf, off); // + offset
__ movl(crc, Address(rsp, 5 * wordSize)); // Initial CRC
// Note on 5 * wordSize vs. 4 * wordSize:
// * int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end)
// 4 2,3 1 0
// end starts at SP + 8
// The Java(R) Virtual Machine Specification Java SE 7 Edition
// 4.10.2.3. Values of Types long and double
// "When calculating operand stack length, values of type long and double have length two."
} else {
__ movptr(buf, Address(rsp, 3 * wordSize)); // byte[] array
__ addptr(buf, arrayOopDesc::base_offset_in_bytes(T_BYTE)); // + header size
__ movl2ptr(off, Address(rsp, 2 * wordSize)); // offset
__ addq(buf, off); // + offset
__ movl(crc, Address(rsp, 4 * wordSize)); // Initial CRC
}
__ movl(end, Address(rsp, wordSize)); // end
__ subl(end, off); // end - off
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address, StubRoutines::updateBytesCRC32C()), crc, buf, len);
// result in rax
// _areturn
__ pop(rdi); // get return address
__ mov(rsp, r13); // set sp to sender sp
__ jmp(rdi);
return entry;
}
return NULL;
}
#endif // ! CC_INTERP

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -116,4 +116,87 @@ void AbstractInterpreter::layout_activation(Method* method,
method->constants()->cache();
}
#ifndef _LP64
int AbstractInterpreter::BasicType_as_index(BasicType type) {
int i = 0;
switch (type) {
case T_BOOLEAN: i = 0; break;
case T_CHAR : i = 1; break;
case T_BYTE : i = 2; break;
case T_SHORT : i = 3; break;
case T_INT : // fall through
case T_LONG : // fall through
case T_VOID : i = 4; break;
case T_FLOAT : i = 5; break; // have to treat float and double separately for SSE
case T_DOUBLE : i = 6; break;
case T_OBJECT : // fall through
case T_ARRAY : i = 7; break;
default : ShouldNotReachHere();
}
assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, "index out of bounds");
return i;
}
#else
int AbstractInterpreter::BasicType_as_index(BasicType type) {
int i = 0;
switch (type) {
case T_BOOLEAN: i = 0; break;
case T_CHAR : i = 1; break;
case T_BYTE : i = 2; break;
case T_SHORT : i = 3; break;
case T_INT : i = 4; break;
case T_LONG : i = 5; break;
case T_VOID : i = 6; break;
case T_FLOAT : i = 7; break;
case T_DOUBLE : i = 8; break;
case T_OBJECT : i = 9; break;
case T_ARRAY : i = 9; break;
default : ShouldNotReachHere();
}
assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers,
"index out of bounds");
return i;
}
#endif // _LP64
// These should never be compiled since the interpreter will prefer
// the compiled version to the intrinsic version.
bool AbstractInterpreter::can_be_compiled(methodHandle m) {
switch (method_kind(m)) {
case Interpreter::java_lang_math_sin : // fall thru
case Interpreter::java_lang_math_cos : // fall thru
case Interpreter::java_lang_math_tan : // fall thru
case Interpreter::java_lang_math_abs : // fall thru
case Interpreter::java_lang_math_log : // fall thru
case Interpreter::java_lang_math_log10 : // fall thru
case Interpreter::java_lang_math_sqrt : // fall thru
case Interpreter::java_lang_math_pow : // fall thru
case Interpreter::java_lang_math_exp :
return false;
default:
return true;
}
}
// How much stack a method activation needs in words.
int AbstractInterpreter::size_top_interpreter_activation(Method* method) {
const int entry_size = frame::interpreter_frame_monitor_size();
// total overhead size: entry_size + (saved rbp thru expr stack
// bottom). be sure to change this if you add/subtract anything
// to/from the overhead area
const int overhead_size =
-(frame::interpreter_frame_initial_sp_offset) + entry_size;
#ifndef _LP64
const int stub_code = 4; // see generate_call_stub
#else
const int stub_code = frame::entry_frame_after_call_words;
#endif
const int method_stack = (method->max_locals() + method->max_stack()) *
Interpreter::stackElementWords;
return (overhead_size + method_stack + stub_code);
}
#endif // CC_INTERP

File diff suppressed because it is too large Load Diff

View File

@ -43,8 +43,8 @@
#define __ _masm->
// Global Register Names
Register rbcp = LP64_ONLY(r13) NOT_LP64(rsi);
Register rlocals = LP64_ONLY(r14) NOT_LP64(rdi);
static const Register rbcp = LP64_ONLY(r13) NOT_LP64(rsi);
static const Register rlocals = LP64_ONLY(r14) NOT_LP64(rdi);
// Platform-dependent initialization
void TemplateTable::pd_initialize() {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -38,7 +38,6 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
@ -74,7 +73,3 @@ address InterpreterGenerator::generate_abstract_entry() {
bool AbstractInterpreter::can_be_compiled(methodHandle m) {
return true;
}
void Deoptimization::unwind_callee_save_values(frame* f,
vframeArray* vframe_array) {
}

View File

@ -29,37 +29,61 @@
//
// Defines Aix specific flags. They are not available on other platforms.
//
// (Please keep the switches sorted alphabetically.)
#define RUNTIME_OS_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct, range, constraint) \
\
/* Whether to allow the VM to run if EXTSHM=ON. EXTSHM is an environment */ \
/* variable used on AIX to activate certain hacks which allow more shm segments */\
/* for 32bit processes. For 64bit processes, it is pointless and may have */ \
/* harmful side effects (e.g. for some reasonn prevents allocation of 64k pages */\
/* via shmctl). */ \
/* Per default we quit with an error if that variable is found; for certain */ \
/* customer scenarios, we may want to be able to run despite that variable. */ \
product(bool, AllowExtshm, false, \
"Allow VM to run with EXTSHM=ON.") \
\
product(intx, AttachListenerTimeout, 1000, \
"Timeout in ms the attach listener waits for a request") \
range(0, 2147483) \
\
/* Maximum expected size of the data segment. That correlates with the */ \
/* to the maximum C Heap consumption we expect. */ \
/* We need to know this because we need to leave "breathing space" for the */ \
/* data segment when placing the java heap. If that space is too small, we */ \
/* reduce our chance of getting a low heap address (needed for compressed */ \
/* Oops). */ \
product(uintx, MaxExpectedDataSegmentSize, (SIZE_4G * 2), \
"Maximum expected Data Segment Size.") \
\
/* Use optimized addresses for the polling page. */ \
product(bool, OptimizePollingPageLocation, true, \
"Optimize the location of the polling page used for Safepoints") \
\
/* Use 64K pages for virtual memory (shmat). */ \
product(bool, Use64KPages, true, \
"Use 64K pages if available.") \
\
/* If UseLargePages == true allow or deny usage of 16M pages. 16M pages are */ \
/* a scarce resource and there may be situations where we do not want the VM */ \
/* to run with 16M pages. (Will fall back to 64K pages). */ \
product_pd(bool, Use16MPages, \
"Use 16M pages if available.") \
/* If VM uses 64K paged memory (shmat) for virtual memory: threshold below */ \
/* which virtual memory allocations are done with 4K memory (mmap). This is */ \
/* mainly for test purposes. */ \
develop(uintx, Use64KPagesThreshold, 0, \
"4K/64K page allocation threshold.") \
\
/* use optimized addresses for the polling page, */ \
/* e.g. map it to a special 32-bit address. */ \
product_pd(bool, OptimizePollingPageLocation, \
"Optimize the location of the polling page used for Safepoints") \
\
product_pd(intx, AttachListenerTimeout, \
"Timeout in ms the attach listener waits for a request") \
range(0, 2147483) \
/* Normally AIX commits memory on touch, but sometimes it is helpful to have */ \
/* explicit commit behaviour. This flag, if true, causes the VM to touch */ \
/* memory on os::commit_memory() (which normally is a noop). */ \
product(bool, UseExplicitCommit, false, \
"Explicit commit for virtual memory.") \
\
// Per default, do not allow 16M pages. 16M pages have to be switched on specifically.
define_pd_global(bool, Use16MPages, false);
define_pd_global(bool, OptimizePollingPageLocation, true);
define_pd_global(intx, AttachListenerTimeout, 1000);
//
// Defines Aix-specific default values. The flags are available on all
// platforms, but they may have different default values on other platforms.
//
// UseLargePages means nothing, for now, on AIX.
// Use Use64KPages or Use16MPages instead.
define_pd_global(bool, UseLargePages, false);
define_pd_global(bool, UseLargePagesIndividualAllocation, false);
define_pd_global(bool, UseOSErrorReporting, false);

View File

@ -0,0 +1,38 @@
/*
* Copyright 2012, 2015 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
// This is only a stub. Will flesh out later when/if we add further support
// for PASE.
#include "libo4.hpp"
bool libo4::init() { return false; }
void libo4::cleanup() {}
bool libo4::get_memory_info (unsigned long long* p_virt_total, unsigned long long* p_real_total,
unsigned long long* p_real_free, unsigned long long* p_pgsp_total, unsigned long long* p_pgsp_free) {
return false;
}
bool libo4::get_load_avg (double* p_avg1, double* p_avg5, double* p_avg15) { return false; }
bool libo4::realpath (const char* file_name, char* resolved_name, int resolved_name_len) { return false; }

View File

@ -0,0 +1,77 @@
/*
* Copyright 2012, 2015 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
// A C++ wrapper around the libo4 porting library. The libo4 porting library
// is a set of bridge functions into native AS/400 functionality.
#ifndef OS_AIX_VM_LIBO4_HPP
#define OS_AIX_VM_LIBO4_HPP
class libo4 {
public:
// Initialize the libo4 porting library.
// Returns true if succeeded, false if error.
static bool init();
// cleanup of the libo4 porting library.
static void cleanup();
// returns a number of memory statistics from the
// AS/400.
//
// Specify NULL for numbers you are not interested in.
//
// returns false if an error happened. Activate OsMisc trace for
// trace output.
//
static bool get_memory_info (unsigned long long* p_virt_total, unsigned long long* p_real_total,
unsigned long long* p_real_free, unsigned long long* p_pgsp_total, unsigned long long* p_pgsp_free);
// returns information about system load
// (similar to "loadavg()" under other Unices)
//
// Specify NULL for numbers you are not interested in.
//
// returns false if an error happened. Activate OsMisc trace for
// trace output.
//
static bool get_load_avg (double* p_avg1, double* p_avg5, double* p_avg15);
// this is a replacement for the "realpath()" API which does not really work
// on PASE
//
// Specify NULL for numbers you are not interested in.
//
// returns false if an error happened. Activate OsMisc trace for
// trace output.
//
static bool realpath (const char* file_name,
char* resolved_name, int resolved_name_len);
};
#endif // OS_AIX_VM_LIBO4_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012, 2013 SAP AG. All rights reserved.
* Copyright 2012, 2015 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -22,49 +22,50 @@
*
*/
#include "runtime/arguments.hpp"
#include "libperfstat_aix.hpp"
#include "misc_aix.hpp"
// For dlopen and friends
#include <fcntl.h>
#include <dlfcn.h>
#include <sys/systemcfg.h>
// handle to the libperfstat
// Handle to the libperfstat.
static void* g_libhandle = NULL;
// whether initialization worked
static bool g_initialized = false;
typedef int (*fun_perfstat_cpu_total_t) (perfstat_id_t *name, perfstat_cpu_total_t* userbuff,
typedef int (*fun_perfstat_cpu_total_t) (perfstat_id_t *name, PERFSTAT_CPU_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number);
typedef int (*fun_perfstat_memory_total_t) (perfstat_id_t *name, perfstat_memory_total_t* userbuff,
int sizeof_userbuff, int desired_number);
typedef int (*fun_perfstat_partition_total_t) (perfstat_id_t *name,
PERFSTAT_PARTITON_TOTAL_T_LATEST* userbuff, int sizeof_userbuff,
int desired_number);
typedef int (*fun_perfstat_wpar_total_t) (perfstat_id_wpar_t *name,
PERFSTAT_WPAR_TOTAL_T_LATEST* userbuff, int sizeof_userbuff,
int desired_number);
typedef void (*fun_perfstat_reset_t) ();
typedef cid_t (*fun_wpar_getcid_t) ();
static fun_perfstat_cpu_total_t g_fun_perfstat_cpu_total = NULL;
static fun_perfstat_memory_total_t g_fun_perfstat_memory_total = NULL;
static fun_perfstat_partition_total_t g_fun_perfstat_partition_total = NULL;
static fun_perfstat_wpar_total_t g_fun_perfstat_wpar_total = NULL;
static fun_perfstat_reset_t g_fun_perfstat_reset = NULL;
static fun_wpar_getcid_t g_fun_wpar_getcid = NULL;
bool libperfstat::init() {
if (g_initialized) {
return true;
}
g_initialized = false;
// dynamically load the libperfstat porting library.
// Dynamically load the libperfstat porting library.
g_libhandle = dlopen("/usr/lib/libperfstat.a(shr_64.o)", RTLD_MEMBER | RTLD_NOW);
if (!g_libhandle) {
if (Verbose) {
fprintf(stderr, "Cannot load libperfstat.a (dlerror: %s)", dlerror());
}
trcVerbose("Cannot load libperfstat.a (dlerror: %s)", dlerror());
return false;
}
// resolve function pointers
// Resolve function pointers
#define RESOLVE_FUN_NO_ERROR(name) \
g_fun_##name = (fun_##name##_t) dlsym(g_libhandle, #name);
@ -72,26 +73,28 @@ bool libperfstat::init() {
#define RESOLVE_FUN(name) \
RESOLVE_FUN_NO_ERROR(name) \
if (!g_fun_##name) { \
if (Verbose) { \
fprintf(stderr, "Cannot resolve " #name "() from libperfstat.a\n" \
trcVerbose("Cannot resolve " #name "() from libperfstat.a\n" \
" (dlerror: %s)", dlerror()); \
} \
return false; \
}
// These functions may or may not be there depending on the OS release.
RESOLVE_FUN_NO_ERROR(perfstat_partition_total);
RESOLVE_FUN_NO_ERROR(perfstat_wpar_total);
RESOLVE_FUN_NO_ERROR(wpar_getcid);
// These functions are required for every release.
RESOLVE_FUN(perfstat_cpu_total);
RESOLVE_FUN(perfstat_memory_total);
RESOLVE_FUN(perfstat_reset);
g_initialized = true;
trcVerbose("libperfstat loaded.");
return true;
}
void libperfstat::cleanup() {
g_initialized = false;
if (g_libhandle) {
dlclose(g_libhandle);
g_libhandle = NULL;
@ -99,26 +102,250 @@ void libperfstat::cleanup() {
g_fun_perfstat_cpu_total = NULL;
g_fun_perfstat_memory_total = NULL;
g_fun_perfstat_partition_total = NULL;
g_fun_perfstat_wpar_total = NULL;
g_fun_perfstat_reset = NULL;
g_fun_wpar_getcid = NULL;
}
int libperfstat::perfstat_memory_total(perfstat_id_t *name,
perfstat_memory_total_t* userbuff,
int sizeof_userbuff, int desired_number) {
assert(g_initialized, "libperfstat not initialized");
assert(g_fun_perfstat_memory_total, "");
if (g_fun_perfstat_memory_total == NULL) {
return -1;
}
return g_fun_perfstat_memory_total(name, userbuff, sizeof_userbuff, desired_number);
}
int libperfstat::perfstat_cpu_total(perfstat_id_t *name, perfstat_cpu_total_t* userbuff,
int libperfstat::perfstat_cpu_total(perfstat_id_t *name, PERFSTAT_CPU_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number) {
assert(g_initialized, "libperfstat not initialized");
assert(g_fun_perfstat_cpu_total, "");
if (g_fun_perfstat_cpu_total == NULL) {
return -1;
}
return g_fun_perfstat_cpu_total(name, userbuff, sizeof_userbuff, desired_number);
}
void libperfstat::perfstat_reset() {
assert(g_initialized, "libperfstat not initialized");
assert(g_fun_perfstat_reset, "");
g_fun_perfstat_reset();
int libperfstat::perfstat_partition_total(perfstat_id_t *name, PERFSTAT_PARTITON_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number) {
if (g_fun_perfstat_partition_total == NULL) {
return -1;
}
return g_fun_perfstat_partition_total(name, userbuff, sizeof_userbuff, desired_number);
}
int libperfstat::perfstat_wpar_total(perfstat_id_wpar_t *name, PERFSTAT_WPAR_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number) {
if (g_fun_perfstat_wpar_total == NULL) {
return -1;
}
return g_fun_perfstat_wpar_total(name, userbuff, sizeof_userbuff, desired_number);
}
void libperfstat::perfstat_reset() {
if (g_fun_perfstat_reset != NULL) {
g_fun_perfstat_reset();
}
}
cid_t libperfstat::wpar_getcid() {
if (g_fun_wpar_getcid == NULL) {
return (cid_t) -1;
}
return g_fun_wpar_getcid();
}
//////////////////// convenience functions, release-independent /////////////////////////////
// Excerpts from systemcfg.h definitions newer than AIX 5.3 (our oldest build platform)
#define PV_6 0x100000 /* Power PC 6 */
#define PV_6_1 0x100001 /* Power PC 6 DD1.x */
#define PV_7 0x200000 /* Power PC 7 */
#define PV_5_Compat 0x0F8000 /* Power PC 5 */
#define PV_6_Compat 0x108000 /* Power PC 6 */
#define PV_7_Compat 0x208000 /* Power PC 7 */
#define PV_8 0x300000 /* Power PC 8 */
#define PV_8_Compat 0x308000 /* Power PC 8 */
// Retrieve global cpu information.
bool libperfstat::get_cpuinfo(cpuinfo_t* pci) {
assert(pci, "get_cpuinfo: invalid parameter");
memset(pci, 0, sizeof(cpuinfo_t));
PERFSTAT_CPU_TOTAL_T_LATEST psct;
memset (&psct, '\0', sizeof(psct));
if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(PERFSTAT_CPU_TOTAL_T_LATEST), 1)) {
if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_61), 1)) {
if (-1 == libperfstat::perfstat_cpu_total(NULL, &psct, sizeof(perfstat_cpu_total_t_53), 1)) {
trcVerbose("perfstat_cpu_total() failed (errno=%d)", errno);
return false;
}
}
}
// Global cpu information.
strcpy (pci->description, psct.description);
pci->processorHZ = psct.processorHZ;
pci->ncpus = psct.ncpus;
for (int i = 0; i < 3; i++) {
pci->loadavg[i] = (double) psct.loadavg[i] / (1 << SBITS);
}
pci->user_clock_ticks = psct.user;
pci->sys_clock_ticks = psct.sys;
pci->idle_clock_ticks = psct.idle;
pci->wait_clock_ticks = psct.wait;
// Get the processor version from _system_configuration.
switch (_system_configuration.version) {
case PV_8:
strcpy(pci->version, "Power PC 8");
break;
case PV_7:
strcpy(pci->version, "Power PC 7");
break;
case PV_6_1:
strcpy(pci->version, "Power PC 6 DD1.x");
break;
case PV_6:
strcpy(pci->version, "Power PC 6");
break;
case PV_5:
strcpy(pci->version, "Power PC 5");
break;
case PV_5_2:
strcpy(pci->version, "Power PC 5_2");
break;
case PV_5_3:
strcpy(pci->version, "Power PC 5_3");
break;
case PV_5_Compat:
strcpy(pci->version, "PV_5_Compat");
break;
case PV_6_Compat:
strcpy(pci->version, "PV_6_Compat");
break;
case PV_7_Compat:
strcpy(pci->version, "PV_7_Compat");
break;
case PV_8_Compat:
strcpy(pci->version, "PV_8_Compat");
break;
default:
strcpy(pci->version, "unknown");
}
return true;
}
// Retrieve partition information.
bool libperfstat::get_partitioninfo(partitioninfo_t* ppi) {
assert(ppi, "get_partitioninfo: invalid parameter");
memset(ppi, 0, sizeof(partitioninfo_t));
PERFSTAT_PARTITON_TOTAL_T_LATEST pspt;
memset(&pspt, '\0', sizeof(pspt));
bool ame_details = true;
if (-1 == libperfstat::perfstat_partition_total(NULL, &pspt, sizeof(PERFSTAT_PARTITON_TOTAL_T_LATEST), 1)) {
if (-1 == libperfstat::perfstat_partition_total(NULL, &pspt, sizeof(perfstat_partition_total_t_71), 1)) {
ame_details = false;
if (-1 == libperfstat::perfstat_partition_total(NULL, &pspt, sizeof(perfstat_partition_total_t_61), 1)) {
if (-1 == libperfstat::perfstat_partition_total(NULL, &pspt, sizeof(perfstat_partition_total_t_53), 1)) {
if (-1 == libperfstat::perfstat_partition_total(NULL, &pspt, sizeof(perfstat_partition_total_t_53_5), 1)) {
trcVerbose("perfstat_partition_total() failed (errno=%d)", errno);
return false;
}
}
}
}
}
// partition type info
ppi->shared_enabled = pspt.type.b.shared_enabled;
ppi->smt_capable = pspt.type.b.smt_capable;
ppi->smt_enabled = pspt.type.b.smt_enabled;
ppi->lpar_capable = pspt.type.b.lpar_capable;
ppi->lpar_enabled = pspt.type.b.lpar_enabled;
ppi->dlpar_capable = pspt.type.b.dlpar_capable;
ppi->capped = pspt.type.b.capped;
ppi->kernel_is_64 = pspt.type.b.kernel_is_64;
ppi->pool_util_authority = pspt.type.b.pool_util_authority;
ppi->donate_capable = pspt.type.b.donate_capable;
ppi->donate_enabled = pspt.type.b.donate_enabled;
ppi->ams_capable = pspt.type.b.ams_capable;
ppi->ams_enabled = pspt.type.b.ams_enabled;
ppi->power_save = pspt.type.b.power_save;
ppi->ame_enabled = pspt.type.b.ame_enabled;
// partition total info
ppi->online_cpus = pspt.online_cpus;
ppi->entitled_proc_capacity = pspt.entitled_proc_capacity;
ppi->var_proc_capacity_weight = pspt.var_proc_capacity_weight;
ppi->phys_cpus_pool = pspt.phys_cpus_pool;
ppi->pool_id = pspt.pool_id;
ppi->entitled_pool_capacity = pspt.entitled_pool_capacity;
strcpy(ppi->name, pspt.name);
// Added values to ppi that we need for later computation of cpu utilization
// ( pool authorization needed for pool_idle_time ??? )
ppi->timebase_last = pspt.timebase_last;
ppi->pool_idle_time = pspt.pool_idle_time;
ppi->pcpu_tics_user = pspt.puser;
ppi->pcpu_tics_sys = pspt.psys;
ppi->pcpu_tics_idle = pspt.pidle;
ppi->pcpu_tics_wait = pspt.pwait;
// Additional AME information.
if (ame_details) {
ppi->true_memory = pspt.true_memory * 4096;
ppi->expanded_memory = pspt.expanded_memory * 4096;
ppi->target_memexp_factr = pspt.target_memexp_factr;
ppi->current_memexp_factr = pspt.current_memexp_factr;
ppi->cmcs_total_time = pspt.cmcs_total_time;
}
return true;
}
// Retrieve wpar information.
bool libperfstat::get_wparinfo(wparinfo_t* pwi) {
assert(pwi, "get_wparinfo: invalid parameter");
memset(pwi, 0, sizeof(wparinfo_t));
if (libperfstat::wpar_getcid() <= 0) {
return false;
}
PERFSTAT_WPAR_TOTAL_T_LATEST pswt;
memset (&pswt, '\0', sizeof(pswt));
if (-1 == libperfstat::perfstat_wpar_total(NULL, &pswt, sizeof(PERFSTAT_WPAR_TOTAL_T_LATEST), 1)) {
if (-1 == libperfstat::perfstat_wpar_total(NULL, &pswt, sizeof(perfstat_wpar_total_t_61), 1)) {
trcVerbose("perfstat_wpar_total() failed (errno=%d)", errno);
return false;
}
}
// WPAR type info.
pwi->app_wpar = pswt.type.b.app_wpar;
pwi->cpu_rset = pswt.type.b.cpu_rset;
pwi->cpu_xrset = pswt.type.b.cpu_xrset;
pwi->cpu_limits = pswt.type.b.cpu_limits;
pwi->mem_limits = pswt.type.b.mem_limits;
// WPAR total info.
strcpy(pwi->name, pswt.name);
pwi->wpar_id = pswt.wpar_id;
pwi->cpu_limit = pswt.cpu_limit;
pwi->mem_limit = pswt.mem_limit;
return true;
}

View File

@ -22,7 +22,7 @@
*
*/
// encapsulates the libperfstat library.
// Encapsulates the libperfstat library.
//
// The purpose of this code is to dynamically load the libperfstat library
// instead of statically linking against it. The libperfstat library is an
@ -32,7 +32,732 @@
#ifndef OS_AIX_VM_LIBPERFSTAT_AIX_HPP
#define OS_AIX_VM_LIBPERFSTAT_AIX_HPP
#include <libperfstat.h>
#include <sys/types.h>
#include <stdlib.h>
///////////////////////////////////////////////////////////////////////////////////////////////
// These are excerpts from the AIX 5.3, 6.1, 7.1 libperfstat.h -
// this is all we need from libperfstat.h and I want to avoid having to include <libperfstat.h>
//
// Note: I define all structures as if I were to include libperfstat.h on an AIX 5.2
// build machine.
//
// The ratio behind that is that if I would build on an AIX 5.2 build machine,
// include libperfstat.h and hard-link against libperfstat.a, the program should
// work without recompilation on all newer AIX versions.
//
#define IDENTIFIER_LENGTH 64 /* length of strings included in the structures */
typedef struct { /* structure element identifier */
char name[IDENTIFIER_LENGTH]; /* name of the identifier */
} perfstat_id_t;
#define CEC_ID_LEN 40 /* CEC identifier length */
#define MAXCORRALNAMELEN 25 /* length of the wpar name */
#define FIRST_WPARNAME "" /* pseudo-name for the first WPAR */
#define FIRST_WPARID -1 /* pseudo-id for the first WPAR */
typedef unsigned short cid_t; /* workload partition identifier */
typedef struct { /* Virtual memory utilization */
u_longlong_t virt_total; /* total virtual memory (in 4KB pages) */
u_longlong_t real_total; /* total real memory (in 4KB pages) */
u_longlong_t real_free; /* free real memory (in 4KB pages) */
u_longlong_t real_pinned; /* real memory which is pinned (in 4KB pages) */
u_longlong_t real_inuse; /* real memory which is in use (in 4KB pages) */
u_longlong_t pgbad; /* number of bad pages */
u_longlong_t pgexct; /* number of page faults */
u_longlong_t pgins; /* number of pages paged in */
u_longlong_t pgouts; /* number of pages paged out */
u_longlong_t pgspins; /* number of page ins from paging space */
u_longlong_t pgspouts; /* number of page outs from paging space */
u_longlong_t scans; /* number of page scans by clock */
u_longlong_t cycles; /* number of page replacement cycles */
u_longlong_t pgsteals; /* number of page steals */
u_longlong_t numperm; /* number of frames used for files (in 4KB pages) */
u_longlong_t pgsp_total; /* total paging space (in 4KB pages) */
u_longlong_t pgsp_free; /* free paging space (in 4KB pages) */
u_longlong_t pgsp_rsvd; /* reserved paging space (in 4KB pages) */
u_longlong_t real_system; /* real memory used by system segments (in 4KB pages). This is the sum of all the used pages in segment marked for system usage.
* Since segment classifications are not always guaranteed to be accurate, this number is only an approximation. */
u_longlong_t real_user; /* real memory used by non-system segments (in 4KB pages). This is the sum of all pages used in segments not marked for system usage.
* Since segment classifications are not always guaranteed to be accurate, this number is only an approximation. */
u_longlong_t real_process; /* real memory used by process segments (in 4KB pages). This is real_total-real_free-numperm-real_system. Since real_system is an
* approximation, this number is too. */
u_longlong_t virt_active; /* Active virtual pages. Virtual pages are considered active if they have been accessed */
} perfstat_memory_total_t;
typedef struct { /* global cpu information AIX 5.3 < TL10 */
int ncpus; /* number of active logical processors */
int ncpus_cfg; /* number of configured processors */
char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */
u_longlong_t processorHZ; /* processor speed in Hz */
u_longlong_t user; /* raw total number of clock ticks spent in user mode */
u_longlong_t sys; /* raw total number of clock ticks spent in system mode */
u_longlong_t idle; /* raw total number of clock ticks spent idle */
u_longlong_t wait; /* raw total number of clock ticks spent waiting for I/O */
u_longlong_t pswitch; /* number of process switches (change in currently running process) */
u_longlong_t syscall; /* number of system calls executed */
u_longlong_t sysread; /* number of read system calls executed */
u_longlong_t syswrite; /* number of write system calls executed */
u_longlong_t sysfork; /* number of forks system calls executed */
u_longlong_t sysexec; /* number of execs system calls executed */
u_longlong_t readch; /* number of characters tranferred with read system call */
u_longlong_t writech; /* number of characters tranferred with write system call */
u_longlong_t devintrs; /* number of device interrupts */
u_longlong_t softintrs; /* number of software interrupts */
time_t lbolt; /* number of ticks since last reboot */
u_longlong_t loadavg[3]; /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
* To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
u_longlong_t runque; /* length of the run queue (processes ready) */
u_longlong_t swpque; /* ength of the swap queue (processes waiting to be paged in) */
u_longlong_t bread; /* number of blocks read */
u_longlong_t bwrite; /* number of blocks written */
u_longlong_t lread; /* number of logical read requests */
u_longlong_t lwrite; /* number of logical write requests */
u_longlong_t phread; /* number of physical reads (reads on raw devices) */
u_longlong_t phwrite; /* number of physical writes (writes on raw devices) */
u_longlong_t runocc; /* updated whenever runque is updated, i.e. the runqueue is occupied.
* This can be used to compute the simple average of ready processes */
u_longlong_t swpocc; /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
* This can be used to compute the simple average processes waiting to be paged in */
u_longlong_t iget; /* number of inode lookups */
u_longlong_t namei; /* number of vnode lookup from a path name */
u_longlong_t dirblk; /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
u_longlong_t msg; /* number of IPC message operations */
u_longlong_t sema; /* number of IPC semaphore operations */
u_longlong_t rcvint; /* number of tty receive interrupts */
u_longlong_t xmtint; /* number of tyy transmit interrupts */
u_longlong_t mdmint; /* number of modem interrupts */
u_longlong_t tty_rawinch; /* number of raw input characters */
u_longlong_t tty_caninch; /* number of canonical input characters (always zero) */
u_longlong_t tty_rawoutch; /* number of raw output characters */
u_longlong_t ksched; /* number of kernel processes created */
u_longlong_t koverf; /* kernel process creation attempts where:
* -the user has forked to their maximum limit
* -the configuration limit of processes has been reached */
u_longlong_t kexit; /* number of kernel processes that became zombies */
u_longlong_t rbread; /* number of remote read requests */
u_longlong_t rcread; /* number of cached remote reads */
u_longlong_t rbwrt; /* number of remote writes */
u_longlong_t rcwrt; /* number of cached remote writes */
u_longlong_t traps; /* number of traps */
int ncpus_high; /* index of highest processor online */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t decrintrs; /* number of decrementer tics interrupts */
u_longlong_t mpcrintrs; /* number of mpc's received interrupts */
u_longlong_t mpcsintrs; /* number of mpc's sent interrupts */
u_longlong_t phantintrs; /* number of phantom interrupts */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
short iowait; /* number of processes that are asleep waiting for buffered I/O */
short physio; /* number of processes waiting for raw I/O */
longlong_t twait; /* number of threads that are waiting for filesystem direct(cio) */
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds) */
} perfstat_cpu_total_t_53;
typedef struct { /* global cpu information AIX 6.1|5.3 > TL09 */
int ncpus; /* number of active logical processors */
int ncpus_cfg; /* number of configured processors */
char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */
u_longlong_t processorHZ; /* processor speed in Hz */
u_longlong_t user; /* raw total number of clock ticks spent in user mode */
u_longlong_t sys; /* raw total number of clock ticks spent in system mode */
u_longlong_t idle; /* raw total number of clock ticks spent idle */
u_longlong_t wait; /* raw total number of clock ticks spent waiting for I/O */
u_longlong_t pswitch; /* number of process switches (change in currently running process) */
u_longlong_t syscall; /* number of system calls executed */
u_longlong_t sysread; /* number of read system calls executed */
u_longlong_t syswrite; /* number of write system calls executed */
u_longlong_t sysfork; /* number of forks system calls executed */
u_longlong_t sysexec; /* number of execs system calls executed */
u_longlong_t readch; /* number of characters tranferred with read system call */
u_longlong_t writech; /* number of characters tranferred with write system call */
u_longlong_t devintrs; /* number of device interrupts */
u_longlong_t softintrs; /* number of software interrupts */
time_t lbolt; /* number of ticks since last reboot */
u_longlong_t loadavg[3]; /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
* To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
u_longlong_t runque; /* length of the run queue (processes ready) */
u_longlong_t swpque; /* length of the swap queue (processes waiting to be paged in) */
u_longlong_t bread; /* number of blocks read */
u_longlong_t bwrite; /* number of blocks written */
u_longlong_t lread; /* number of logical read requests */
u_longlong_t lwrite; /* number of logical write requests */
u_longlong_t phread; /* number of physical reads (reads on raw devices) */
u_longlong_t phwrite; /* number of physical writes (writes on raw devices) */
u_longlong_t runocc; /* updated whenever runque is updated, i.e. the runqueue is occupied.
* This can be used to compute the simple average of ready processes */
u_longlong_t swpocc; /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
* This can be used to compute the simple average processes waiting to be paged in */
u_longlong_t iget; /* number of inode lookups */
u_longlong_t namei; /* number of vnode lookup from a path name */
u_longlong_t dirblk; /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
u_longlong_t msg; /* number of IPC message operations */
u_longlong_t sema; /* number of IPC semaphore operations */
u_longlong_t rcvint; /* number of tty receive interrupts */
u_longlong_t xmtint; /* number of tyy transmit interrupts */
u_longlong_t mdmint; /* number of modem interrupts */
u_longlong_t tty_rawinch; /* number of raw input characters */
u_longlong_t tty_caninch; /* number of canonical input characters (always zero) */
u_longlong_t tty_rawoutch; /* number of raw output characters */
u_longlong_t ksched; /* number of kernel processes created */
u_longlong_t koverf; /* kernel process creation attempts where:
* -the user has forked to their maximum limit
* -the configuration limit of processes has been reached */
u_longlong_t kexit; /* number of kernel processes that became zombies */
u_longlong_t rbread; /* number of remote read requests */
u_longlong_t rcread; /* number of cached remote reads */
u_longlong_t rbwrt; /* number of remote writes */
u_longlong_t rcwrt; /* number of cached remote writes */
u_longlong_t traps; /* number of traps */
int ncpus_high; /* index of highest processor online */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t decrintrs; /* number of decrementer tics interrupts */
u_longlong_t mpcrintrs; /* number of mpc's received interrupts */
u_longlong_t mpcsintrs; /* number of mpc's sent interrupts */
u_longlong_t phantintrs; /* number of phantom interrupts */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
short iowait; /* number of processes that are asleep waiting for buffered I/O */
short physio; /* number of processes waiting for raw I/O */
longlong_t twait; /* number of threads that are waiting for filesystem direct(cio) */
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds) */
u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */
u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
int spurrflag; /* set if running in spurr mode */
} perfstat_cpu_total_t_61;
typedef struct { /* global cpu information AIX 7.1 */
int ncpus; /* number of active logical processors */
int ncpus_cfg; /* number of configured processors */
char description[IDENTIFIER_LENGTH]; /* processor description (type/official name) */
u_longlong_t processorHZ; /* processor speed in Hz */
u_longlong_t user; /* raw total number of clock ticks spent in user mode */
u_longlong_t sys; /* raw total number of clock ticks spent in system mode */
u_longlong_t idle; /* raw total number of clock ticks spent idle */
u_longlong_t wait; /* raw total number of clock ticks spent waiting for I/O */
u_longlong_t pswitch; /* number of process switches (change in currently running process) */
u_longlong_t syscall; /* number of system calls executed */
u_longlong_t sysread; /* number of read system calls executed */
u_longlong_t syswrite; /* number of write system calls executed */
u_longlong_t sysfork; /* number of forks system calls executed */
u_longlong_t sysexec; /* number of execs system calls executed */
u_longlong_t readch; /* number of characters tranferred with read system call */
u_longlong_t writech; /* number of characters tranferred with write system call */
u_longlong_t devintrs; /* number of device interrupts */
u_longlong_t softintrs; /* number of software interrupts */
time_t lbolt; /* number of ticks since last reboot */
u_longlong_t loadavg[3]; /* (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
* To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>. */
u_longlong_t runque; /* length of the run queue (processes ready) */
u_longlong_t swpque; /* ength of the swap queue (processes waiting to be paged in) */
u_longlong_t bread; /* number of blocks read */
u_longlong_t bwrite; /* number of blocks written */
u_longlong_t lread; /* number of logical read requests */
u_longlong_t lwrite; /* number of logical write requests */
u_longlong_t phread; /* number of physical reads (reads on raw devices) */
u_longlong_t phwrite; /* number of physical writes (writes on raw devices) */
u_longlong_t runocc; /* updated whenever runque is updated, i.e. the runqueue is occupied.
* This can be used to compute the simple average of ready processes */
u_longlong_t swpocc; /* updated whenever swpque is updated. i.e. the swpqueue is occupied.
* This can be used to compute the simple average processes waiting to be paged in */
u_longlong_t iget; /* number of inode lookups */
u_longlong_t namei; /* number of vnode lookup from a path name */
u_longlong_t dirblk; /* number of 512-byte block reads by the directory search routine to locate an entry for a file */
u_longlong_t msg; /* number of IPC message operations */
u_longlong_t sema; /* number of IPC semaphore operations */
u_longlong_t rcvint; /* number of tty receive interrupts */
u_longlong_t xmtint; /* number of tyy transmit interrupts */
u_longlong_t mdmint; /* number of modem interrupts */
u_longlong_t tty_rawinch; /* number of raw input characters */
u_longlong_t tty_caninch; /* number of canonical input characters (always zero) */
u_longlong_t tty_rawoutch; /* number of raw output characters */
u_longlong_t ksched; /* number of kernel processes created */
u_longlong_t koverf; /* kernel process creation attempts where:
* -the user has forked to their maximum limit
* -the configuration limit of processes has been reached */
u_longlong_t kexit; /* number of kernel processes that became zombies */
u_longlong_t rbread; /* number of remote read requests */
u_longlong_t rcread; /* number of cached remote reads */
u_longlong_t rbwrt; /* number of remote writes */
u_longlong_t rcwrt; /* number of cached remote writes */
u_longlong_t traps; /* number of traps */
int ncpus_high; /* index of highest processor online */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t decrintrs; /* number of decrementer tics interrupts */
u_longlong_t mpcrintrs; /* number of mpc's received interrupts */
u_longlong_t mpcsintrs; /* number of mpc's sent interrupts */
u_longlong_t phantintrs; /* number of phantom interrupts */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
short iowait; /* number of processes that are asleep waiting for buffered I/O */
short physio; /* number of processes waiting for raw I/O */
longlong_t twait; /* number of threads that are waiting for filesystem direct(cio) */
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds) */
u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */
u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
int spurrflag; /* set if running in spurr mode */
u_longlong_t version; /* version number (1, 2, etc.,) */
/* >>>>> END OF STRUCTURE DEFINITION <<<<< */
#define CURR_VERSION_CPU_TOTAL 1 /* Incremented by one for every new release *
* of perfstat_cpu_total_t data structure */
} perfstat_cpu_total_t_71;
typedef union {
uint w;
struct {
unsigned smt_capable :1; /* OS supports SMT mode */
unsigned smt_enabled :1; /* SMT mode is on */
unsigned lpar_capable :1; /* OS supports logical partitioning */
unsigned lpar_enabled :1; /* logical partitioning is on */
unsigned shared_capable :1; /* OS supports shared processor LPAR */
unsigned shared_enabled :1; /* partition runs in shared mode */
unsigned dlpar_capable :1; /* OS supports dynamic LPAR */
unsigned capped :1; /* partition is capped */
unsigned kernel_is_64 :1; /* kernel is 64 bit */
unsigned pool_util_authority :1; /* pool utilization available */
unsigned donate_capable :1; /* capable of donating cycles */
unsigned donate_enabled :1; /* enabled for donating cycles */
unsigned ams_capable:1; /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */
unsigned ams_enabled:1; /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */
unsigned power_save:1; /* 1 = Power saving mode is enabled */
unsigned ame_enabled:1; /* Active Memory Expansion is enabled */
unsigned shared_extended :1;
unsigned spare :15; /* reserved for future usage */
} b;
} perfstat_partition_type_t;
typedef struct { /* partition total information AIX 5.3 < TL6 */
char name[IDENTIFIER_LENGTH]; /* name of the logical partition */
perfstat_partition_type_t type; /* set of bits describing the partition */
int lpar_id; /* logical partition identifier */
int group_id; /* identifier of the LPAR group this partition is a member of */
int pool_id; /* identifier of the shared pool of physical processors this partition is a member of */
int online_cpus; /* number of virtual CPUs currently online on the partition */
int max_cpus; /* maximum number of virtual CPUs this parition can ever have */
int min_cpus; /* minimum number of virtual CPUs this partition must have */
u_longlong_t online_memory; /* amount of memory currently online */
u_longlong_t max_memory; /* maximum amount of memory this partition can ever have */
u_longlong_t min_memory; /* minimum amount of memory this partition must have */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
int max_proc_capacity; /* maximum number of processor units this partition can ever have */
int min_proc_capacity; /* minimum number of processor units this partition must have */
int proc_capacity_increment; /* increment value to the entitled capacity */
int unalloc_proc_capacity; /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
int var_proc_capacity_weight; /* partition priority weight to receive extra capacity */
int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated in the shared processor pool this partition belongs to */
int online_phys_cpus_sys; /* number of physical CPUs currently active in the system containing this partition */
int max_phys_cpus_sys; /* maximum possible number of physical CPUs in the system containing this partition */
int phys_cpus_pool; /* number of the physical CPUs currently in the shared processor pool this partition belong to */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t pool_idle_time; /* number of clock tics a processor in the shared pool was idle */
u_longlong_t phantintrs; /* number of phantom interrupts received by the partition */
u_longlong_t invol_virt_cswitch; /* number involuntary virtual CPU context switches */
u_longlong_t vol_virt_cswitch; /* number voluntary virtual CPU context switches */
u_longlong_t timebase_last; /* most recently cpu time base */
u_longlong_t reserved_pages; /* Currenlty number of 16GB pages. Cannot participate in DR operations */
u_longlong_t reserved_pagesize; /* Currently 16GB pagesize Cannot participate in DR operations */
} perfstat_partition_total_t_53_5;
typedef struct { /* partition total information AIX 5.3 < TL10 */
char name[IDENTIFIER_LENGTH]; /* name of the logical partition */
perfstat_partition_type_t type; /* set of bits describing the partition */
int lpar_id; /* logical partition identifier */
int group_id; /* identifier of the LPAR group this partition is a member of */
int pool_id; /* identifier of the shared pool of physical processors this partition is a member of */
int online_cpus; /* number of virtual CPUs currently online on the partition */
int max_cpus; /* maximum number of virtual CPUs this parition can ever have */
int min_cpus; /* minimum number of virtual CPUs this partition must have */
u_longlong_t online_memory; /* amount of memory currently online */
u_longlong_t max_memory; /* maximum amount of memory this partition can ever have */
u_longlong_t min_memory; /* minimum amount of memory this partition must have */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
int max_proc_capacity; /* maximum number of processor units this partition can ever have */
int min_proc_capacity; /* minimum number of processor units this partition must have */
int proc_capacity_increment; /* increment value to the entitled capacity */
int unalloc_proc_capacity; /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
int var_proc_capacity_weight; /* partition priority weight to receive extra capacity */
int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated in the shared processor pool this partition belongs to */
int online_phys_cpus_sys; /* number of physical CPUs currently active in the system containing this partition */
int max_phys_cpus_sys; /* maximum possible number of physical CPUs in the system containing this partition */
int phys_cpus_pool; /* number of the physical CPUs currently in the shared processor pool this partition belong to */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t pool_idle_time; /* number of clock tics a processor in the shared pool was idle */
u_longlong_t phantintrs; /* number of phantom interrupts received by the partition */
u_longlong_t invol_virt_cswitch; /* number involuntary virtual CPU context switches */
u_longlong_t vol_virt_cswitch; /* number voluntary virtual CPU context switches */
u_longlong_t timebase_last; /* most recently cpu time base */
u_longlong_t reserved_pages; /* Currenlty number of 16GB pages. Cannot participate in DR operations */
u_longlong_t reserved_pagesize; /* Currently 16GB pagesize Cannot participate in DR operations */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t shcpus_in_sys; /* Number of physical processors allocated for shared processor use */
u_longlong_t max_pool_capacity; /* Maximum processor capacity of partitions pool */
u_longlong_t entitled_pool_capacity; /* Entitled processor capacity of partitions pool */
u_longlong_t pool_max_time; /* Summation of maximum time that could be consumed by the pool (nano seconds) */
u_longlong_t pool_busy_time; /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t pool_scaled_busy_time; /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t shcpu_tot_time; /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
u_longlong_t shcpu_busy_time; /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
u_longlong_t shcpu_scaled_busy_time; /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
int ams_pool_id; /* AMS pool id of the pool the LPAR belongs to */
int var_mem_weight; /* variable memory capacity weight */
u_longlong_t iome; /* I/O memory entitlement of the partition in bytes*/
u_longlong_t pmem; /* Physical memory currently backing the partition's logical memory in bytes*/
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds)*/
u_longlong_t hypv_pagesize; /* Hypervisor page size in KB*/
} perfstat_partition_total_t_53;
typedef struct { /* partition total information AIX 6.1|5.3 > TL09 */
char name[IDENTIFIER_LENGTH]; /* name of the logical partition */
perfstat_partition_type_t type; /* set of bits describing the partition */
int lpar_id; /* logical partition identifier */
int group_id; /* identifier of the LPAR group this partition is a member of */
int pool_id; /* identifier of the shared pool of physical processors this partition is a member of */
int online_cpus; /* number of virtual CPUs currently online on the partition */
int max_cpus; /* maximum number of virtual CPUs this parition can ever have */
int min_cpus; /* minimum number of virtual CPUs this partition must have */
u_longlong_t online_memory; /* amount of memory currently online */
u_longlong_t max_memory; /* maximum amount of memory this partition can ever have */
u_longlong_t min_memory; /* minimum amount of memory this partition must have */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
int max_proc_capacity; /* maximum number of processor units this partition can ever have */
int min_proc_capacity; /* minimum number of processor units this partition must have */
int proc_capacity_increment; /* increment value to the entitled capacity */
int unalloc_proc_capacity; /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
int var_proc_capacity_weight; /* partition priority weight to receive extra capacity */
int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated in the shared processor pool this partition belongs to */
int online_phys_cpus_sys; /* number of physical CPUs currently active in the system containing this partition */
int max_phys_cpus_sys; /* maximum possible number of physical CPUs in the system containing this partition */
int phys_cpus_pool; /* number of the physical CPUs currently in the shared processor pool this partition belong to */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t pool_idle_time; /* number of clock tics a processor in the shared pool was idle */
u_longlong_t phantintrs; /* number of phantom interrupts received by the partition */
u_longlong_t invol_virt_cswitch; /* number involuntary virtual CPU context switches */
u_longlong_t vol_virt_cswitch; /* number voluntary virtual CPU context switches */
u_longlong_t timebase_last; /* most recently cpu time base */
u_longlong_t reserved_pages; /* Currenlty number of 16GB pages. Cannot participate in DR operations */
u_longlong_t reserved_pagesize; /* Currently 16GB pagesize Cannot participate in DR operations */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t shcpus_in_sys; /* Number of physical processors allocated for shared processor use */
u_longlong_t max_pool_capacity; /* Maximum processor capacity of partitions pool */
u_longlong_t entitled_pool_capacity; /* Entitled processor capacity of partitions pool */
u_longlong_t pool_max_time; /* Summation of maximum time that could be consumed by the pool (nano seconds) */
u_longlong_t pool_busy_time; /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t pool_scaled_busy_time; /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t shcpu_tot_time; /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
u_longlong_t shcpu_busy_time; /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
u_longlong_t shcpu_scaled_busy_time; /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
int ams_pool_id; /* AMS pool id of the pool the LPAR belongs to */
int var_mem_weight; /* variable memory capacity weight */
u_longlong_t iome; /* I/O memory entitlement of the partition in bytes*/
u_longlong_t pmem; /* Physical memory currently backing the partition's logical memory in bytes*/
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds)*/
u_longlong_t hypv_pagesize; /* Hypervisor page size in KB*/
uint online_lcpus; /* number of online logical cpus */
uint smt_thrds; /* number of hardware threads that are running */
u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */
u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
int spurrflag; /* set if running in spurr mode */
} perfstat_partition_total_t_61;
typedef struct { /* partition total information AIX 7.1 */
char name[IDENTIFIER_LENGTH]; /* name of the logical partition */
perfstat_partition_type_t type; /* set of bits describing the partition */
int lpar_id; /* logical partition identifier */
int group_id; /* identifier of the LPAR group this partition is a member of */
int pool_id; /* identifier of the shared pool of physical processors this partition is a member of */
int online_cpus; /* number of virtual CPUs currently online on the partition */
int max_cpus; /* maximum number of virtual CPUs this parition can ever have */
int min_cpus; /* minimum number of virtual CPUs this partition must have */
u_longlong_t online_memory; /* amount of memory currently online */
u_longlong_t max_memory; /* maximum amount of memory this partition can ever have */
u_longlong_t min_memory; /* minimum amount of memory this partition must have */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
int max_proc_capacity; /* maximum number of processor units this partition can ever have */
int min_proc_capacity; /* minimum number of processor units this partition must have */
int proc_capacity_increment; /* increment value to the entitled capacity */
int unalloc_proc_capacity; /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
int var_proc_capacity_weight; /* partition priority weight to receive extra capacity */
int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated in the shared processor pool this partition belongs to */
int online_phys_cpus_sys; /* number of physical CPUs currently active in the system containing this partition */
int max_phys_cpus_sys; /* maximum possible number of physical CPUs in the system containing this partition */
int phys_cpus_pool; /* number of the physical CPUs currently in the shared processor pool this partition belong to */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t pool_idle_time; /* number of clock tics a processor in the shared pool was idle */
u_longlong_t phantintrs; /* number of phantom interrupts received by the partition */
u_longlong_t invol_virt_cswitch; /* number involuntary virtual CPU context switches */
u_longlong_t vol_virt_cswitch; /* number voluntary virtual CPU context switches */
u_longlong_t timebase_last; /* most recently cpu time base */
u_longlong_t reserved_pages; /* Currenlty number of 16GB pages. Cannot participate in DR operations */
u_longlong_t reserved_pagesize; /* Currently 16GB pagesize Cannot participate in DR operations */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t shcpus_in_sys; /* Number of physical processors allocated for shared processor use */
u_longlong_t max_pool_capacity; /* Maximum processor capacity of partitions pool */
u_longlong_t entitled_pool_capacity; /* Entitled processor capacity of partitions pool */
u_longlong_t pool_max_time; /* Summation of maximum time that could be consumed by the pool (nano seconds) */
u_longlong_t pool_busy_time; /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t pool_scaled_busy_time; /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t shcpu_tot_time; /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
u_longlong_t shcpu_busy_time; /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
u_longlong_t shcpu_scaled_busy_time; /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
int ams_pool_id; /* AMS pool id of the pool the LPAR belongs to */
int var_mem_weight; /* variable memory capacity weight */
u_longlong_t iome; /* I/O memory entitlement of the partition in bytes*/
u_longlong_t pmem; /* Physical memory currently backing the partition's logical memory in bytes*/
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds)*/
u_longlong_t hypv_pagesize; /* Hypervisor page size in KB*/
uint online_lcpus; /* number of online logical cpus */
uint smt_thrds; /* number of hardware threads that are running */
u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */
u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
int spurrflag; /* set if running in spurr mode */
char hardwareid[CEC_ID_LEN]; /* CEC Identifier */
uint power_save_mode; /* Power save mode for the LPAR. Introduced through LI 53K PRF : Feature 728 292*/
ushort ame_version; /* AME Version */
u_longlong_t true_memory; /* True Memory Size in 4KB pages */
u_longlong_t expanded_memory; /* Expanded Memory Size in 4KB pages */
u_longlong_t target_memexp_factr; /* Target Memory Expansion Factor scaled by 100 */
u_longlong_t current_memexp_factr; /* Current Memory Expansion Factor scaled by 100 */
u_longlong_t target_cpool_size; /* Target Compressed Pool Size in bytes */
u_longlong_t max_cpool_size; /* Max Size of Compressed Pool in bytes */
u_longlong_t min_ucpool_size; /* Min Size of Uncompressed Pool in bytes */
u_longlong_t ame_deficit_size; /*Deficit memory size in bytes */
u_longlong_t version; /* version number (1, 2, etc.,) */
u_longlong_t cmcs_total_time; /* Total CPU time spent due to active memory expansion */
} perfstat_partition_total_t_71;
typedef struct { /* partition total information AIX 7.1 >= TL1*/
char name[IDENTIFIER_LENGTH]; /* name of the logical partition */
perfstat_partition_type_t type; /* set of bits describing the partition */
int lpar_id; /* logical partition identifier */
int group_id; /* identifier of the LPAR group this partition is a member of */
int pool_id; /* identifier of the shared pool of physical processors this partition is a member of */
int online_cpus; /* number of virtual CPUs currently online on the partition */
int max_cpus; /* maximum number of virtual CPUs this parition can ever have */
int min_cpus; /* minimum number of virtual CPUs this partition must have */
u_longlong_t online_memory; /* amount of memory currently online */
u_longlong_t max_memory; /* maximum amount of memory this partition can ever have */
u_longlong_t min_memory; /* minimum amount of memory this partition must have */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
int max_proc_capacity; /* maximum number of processor units this partition can ever have */
int min_proc_capacity; /* minimum number of processor units this partition must have */
int proc_capacity_increment; /* increment value to the entitled capacity */
int unalloc_proc_capacity; /* number of processor units currently unallocated in the shared processor pool this partition belongs to */
int var_proc_capacity_weight; /* partition priority weight to receive extra capacity */
int unalloc_var_proc_capacity_weight; /* number of variable processor capacity weight units currently unallocated in the shared processor pool this partition belongs to */
int online_phys_cpus_sys; /* number of physical CPUs currently active in the system containing this partition */
int max_phys_cpus_sys; /* maximum possible number of physical CPUs in the system containing this partition */
int phys_cpus_pool; /* number of the physical CPUs currently in the shared processor pool this partition belong to */
u_longlong_t puser; /* raw number of physical processor tics in user mode */
u_longlong_t psys; /* raw number of physical processor tics in system mode */
u_longlong_t pidle; /* raw number of physical processor tics idle */
u_longlong_t pwait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t pool_idle_time; /* number of clock tics a processor in the shared pool was idle */
u_longlong_t phantintrs; /* number of phantom interrupts received by the partition */
u_longlong_t invol_virt_cswitch; /* number involuntary virtual CPU context switches */
u_longlong_t vol_virt_cswitch; /* number voluntary virtual CPU context switches */
u_longlong_t timebase_last; /* most recently cpu time base */
u_longlong_t reserved_pages; /* Currenlty number of 16GB pages. Cannot participate in DR operations */
u_longlong_t reserved_pagesize; /* Currently 16GB pagesize Cannot participate in DR operations */
u_longlong_t idle_donated_purr; /* number of idle cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_donated_spurr; /* number of idle spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_purr; /* number of busy cycles donated by a dedicated partition enabled for donation */
u_longlong_t busy_donated_spurr; /* number of busy spurr cycles donated by a dedicated partition enabled for donation */
u_longlong_t idle_stolen_purr; /* number of idle cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t idle_stolen_spurr; /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_purr; /* number of busy cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t busy_stolen_spurr; /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */
u_longlong_t shcpus_in_sys; /* Number of physical processors allocated for shared processor use */
u_longlong_t max_pool_capacity; /* Maximum processor capacity of partitions pool */
u_longlong_t entitled_pool_capacity; /* Entitled processor capacity of partitions pool */
u_longlong_t pool_max_time; /* Summation of maximum time that could be consumed by the pool (nano seconds) */
u_longlong_t pool_busy_time; /* Summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t pool_scaled_busy_time; /* Scaled summation of busy (non-idle) time accumulated across all partitions in the pool (nano seconds) */
u_longlong_t shcpu_tot_time; /* Summation of total time across all physical processors allocated for shared processor use (nano seconds) */
u_longlong_t shcpu_busy_time; /* Summation of busy (non-idle) time accumulated across all shared processor partitions (nano seconds) */
u_longlong_t shcpu_scaled_busy_time; /* Scaled summation of busy time accumulated across all shared processor partitions (nano seconds) */
int ams_pool_id; /* AMS pool id of the pool the LPAR belongs to */
int var_mem_weight; /* variable memory capacity weight */
u_longlong_t iome; /* I/O memory entitlement of the partition in bytes*/
u_longlong_t pmem; /* Physical memory currently backing the partition's logical memory in bytes*/
u_longlong_t hpi; /* number of hypervisor page-ins */
u_longlong_t hpit; /* Time spent in hypervisor page-ins (in nanoseconds)*/
u_longlong_t hypv_pagesize; /* Hypervisor page size in KB*/
uint online_lcpus; /* number of online logical cpus */
uint smt_thrds; /* number of hardware threads that are running */
u_longlong_t puser_spurr; /* number of spurr cycles spent in user mode */
u_longlong_t psys_spurr; /* number of spurr cycles spent in kernel mode */
u_longlong_t pidle_spurr; /* number of spurr cycles spent in idle mode */
u_longlong_t pwait_spurr; /* number of spurr cycles spent in wait mode */
int spurrflag; /* set if running in spurr mode */
char hardwareid[CEC_ID_LEN]; /* CEC Identifier */
uint power_save_mode; /* Power save mode for the LPAR. Introduced through LI 53K PRF : Feature 728 292*/
ushort ame_version; /* AME Version */
u_longlong_t true_memory; /* True Memory Size in 4KB pages */
u_longlong_t expanded_memory; /* Expanded Memory Size in 4KB pages */
u_longlong_t target_memexp_factr; /* Target Memory Expansion Factor scaled by 100 */
u_longlong_t current_memexp_factr; /* Current Memory Expansion Factor scaled by 100 */
u_longlong_t target_cpool_size; /* Target Compressed Pool Size in bytes */
u_longlong_t max_cpool_size; /* Max Size of Compressed Pool in bytes */
u_longlong_t min_ucpool_size; /* Min Size of Uncompressed Pool in bytes */
u_longlong_t ame_deficit_size; /*Deficit memory size in bytes */
u_longlong_t version; /* version number (1, 2, etc.,) */
u_longlong_t cmcs_total_time; /* Total CPU time spent due to active memory expansion */
u_longlong_t purr_coalescing; /* If the calling partition is authorized to see pool wide statistics then PURR cycles consumed to coalesce data else set to zero.*/
u_longlong_t spurr_coalescing; /* If the calling partition is authorized to see pool wide statistics then SPURR cycles consumed to coalesce data else set to zero.*/
u_longlong_t MemPoolSize; /* Indicates the memory pool size of the pool that the partition belongs to (in bytes)., mpsz */
u_longlong_t IOMemEntInUse; /* I/O memory entitlement of the LPAR in use in bytes. iomu */
u_longlong_t IOMemEntFree; /* free I/O memory entitlement in bytes. iomf */
u_longlong_t IOHighWaterMark; /* high water mark of I/O memory entitlement usage in bytes. iohwn */
u_longlong_t purr_counter; /* number of purr cycles spent in user + kernel mode */
u_longlong_t spurr_counter; /* number of spurr cycles spent in user + kernel mode */
/* Marketing Requirement(MR): MR1124083744 */
u_longlong_t real_free; /* free real memory (in 4KB pages) */
u_longlong_t real_avail; /* number of pages available for user application (memfree + numperm - minperm - minfree) */
/* >>>>> END OF STRUCTURE DEFINITION <<<<< */
#define CURR_VERSION_PARTITION_TOTAL 5 /* Incremented by one for every new release *
* of perfstat_partition_total_t data structure */
} perfstat_partition_total_t_71_1;
typedef union { /* WPAR Type & Flags */
uint w;
struct {
unsigned app_wpar :1; /* Application WPAR */
unsigned cpu_rset :1; /* WPAR restricted to CPU resource set */
unsigned cpu_xrset:1; /* WPAR restricted to CPU Exclusive resource set */
unsigned cpu_limits :1; /* CPU resource limits enforced */
unsigned mem_limits :1; /* Memory resource limits enforced */
unsigned spare :27; /* reserved for future usage */
} b;
} perfstat_wpar_type_t;
typedef struct { /* Workload partition Information AIX 5.3 & 6.1*/
char name[MAXCORRALNAMELEN+1]; /* name of the Workload Partition */
perfstat_wpar_type_t type; /* set of bits describing the wpar */
cid_t wpar_id; /* workload partition identifier */
uint online_cpus; /* Number of Virtual CPUs in partition rset or number of virtual CPUs currently online on the Global partition*/
int cpu_limit; /* CPU limit in 100ths of % - 1..10000 */
int mem_limit; /* Memory limit in 100ths of % - 1..10000 */
u_longlong_t online_memory; /* amount of memory currently online in Global Partition */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
} perfstat_wpar_total_t_61;
typedef struct { /* Workload partition Information AIX 7.1*/
char name[MAXCORRALNAMELEN+1]; /* name of the Workload Partition */
perfstat_wpar_type_t type; /* set of bits describing the wpar */
cid_t wpar_id; /* workload partition identifier */
uint online_cpus; /* Number of Virtual CPUs in partition rset or number of virtual CPUs currently online on the Global partition*/
int cpu_limit; /* CPU limit in 100ths of % - 1..10000 */
int mem_limit; /* Memory limit in 100ths of % - 1..10000 */
u_longlong_t online_memory; /* amount of memory currently online in Global Partition */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
u_longlong_t version; /* version number (1, 2, etc.,) */
/* >>>>> END OF STRUCTURE DEFINITION <<<<< */
#define CURR_VERSION_WPAR_TOTAL 1 /* Incremented by one for every new release *
* of perfstat_wpar_total_t data structure */
} perfstat_wpar_total_t_71;
typedef void * rsethandle_t; /* Type to identify a resource set handle: rsethandle_t */
typedef enum { WPARNAME, WPARID, RSETHANDLE } wparid_specifier; /* Type of wparid_specifier */
typedef struct { /* WPAR identifier */
wparid_specifier spec; /* Specifier to choose wpar id or name */
union {
cid_t wpar_id; /* WPAR ID */
rsethandle_t rset; /* Rset Handle */
char wparname[MAXCORRALNAMELEN+1]; /* WPAR NAME */
} u;
char name[IDENTIFIER_LENGTH]; /* name of the structure element identifier */
} perfstat_id_wpar_t;
// end: libperfstat.h (AIX 5.2, 5.3, 6.1, 7.1)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define PERFSTAT_PARTITON_TOTAL_T_LATEST perfstat_partition_total_t_71_1/* latest perfstat_partition_total_t structure */
#define PERFSTAT_CPU_TOTAL_T_LATEST perfstat_cpu_total_t_71 /* latest perfstat_cpu_total_t structure */
#define PERFSTAT_WPAR_TOTAL_T_LATEST perfstat_wpar_total_t_71 /* latest perfstat_wpar_total_t structure */
class libperfstat {
@ -41,19 +766,107 @@ public:
// Load the libperfstat library (must be in LIBPATH).
// Returns true if succeeded, false if error.
static bool init();
// cleanup of the libo4 porting library.
static void cleanup();
// direct wrappers for the libperfstat functionality. All they do is
// Direct wrappers for the libperfstat functionality. All they do is
// to call the functions with the same name via function pointers.
static int perfstat_cpu_total(perfstat_id_t *name, perfstat_cpu_total_t* userbuff,
// Get all available data also on newer AIX versions (PERFSTAT_CPU_TOTAL_T_LATEST).
static int perfstat_cpu_total(perfstat_id_t *name, PERFSTAT_CPU_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number);
static int perfstat_memory_total(perfstat_id_t *name, perfstat_memory_total_t* userbuff,
int sizeof_userbuff, int desired_number);
static int perfstat_partition_total(perfstat_id_t *name, PERFSTAT_PARTITON_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number);
static void perfstat_reset();
static int perfstat_wpar_total(perfstat_id_wpar_t *name, PERFSTAT_WPAR_TOTAL_T_LATEST* userbuff,
int sizeof_userbuff, int desired_number);
static cid_t wpar_getcid();
////////////////////////////////////////////////////////////////
// The convenience functions get_partitioninfo(), get_cpuinfo(), get_wparinfo() return
// information about partition, cpu and wpars, respectivly. They can be used without
// regard for which OS release we are on. On older AIX release, some output structure
// members will be 0.
// Result struct for get_partitioninfo().
struct partitioninfo_t {
// partition type info
unsigned smt_capable :1; /* OS supports SMT mode */
unsigned smt_enabled :1; /* SMT mode is on */
unsigned lpar_capable :1; /* OS supports logical partitioning */
unsigned lpar_enabled :1; /* logical partitioning is on */
unsigned shared_capable :1; /* OS supports shared processor LPAR */
unsigned shared_enabled :1; /* partition runs in shared mode */
unsigned dlpar_capable :1; /* OS supports dynamic LPAR */
unsigned capped :1; /* partition is capped */
unsigned kernel_is_64 :1; /* kernel is 64 bit */
unsigned pool_util_authority :1; /* pool utilization available */
unsigned donate_capable :1; /* capable of donating cycles */
unsigned donate_enabled :1; /* enabled for donating cycles */
unsigned ams_capable:1; /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */
unsigned ams_enabled:1; /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */
unsigned power_save:1; /* 1 = Power saving mode is enabled */
unsigned ame_enabled:1; /* Active Memory Expansion is enabled */
// partition total info
int online_cpus; /* number of virtual CPUs currently online on the partition */
int entitled_proc_capacity; /* number of processor units this partition is entitled to receive */
int var_proc_capacity_weight; /* partition priority weight to receive extra capacity */
int phys_cpus_pool; /* number of the physical CPUs currently in the shared processor pool this partition belong to */
int pool_id; /* identifier of the shared pool of physical processors this partition is a member of */
u_longlong_t entitled_pool_capacity; /* Entitled processor capacity of partitions pool */
char name[IDENTIFIER_LENGTH]; /* name of the logical partition */
u_longlong_t timebase_last; /* most recently cpu time base (an incremented long int on PowerPC) */
u_longlong_t pool_idle_time; /* pool idle time = number of clock tics a processor in the shared pool was idle */
u_longlong_t pcpu_tics_user; /* raw number of physical processor tics in user mode */
u_longlong_t pcpu_tics_sys; /* raw number of physical processor tics in system mode */
u_longlong_t pcpu_tics_idle; /* raw number of physical processor tics idle */
u_longlong_t pcpu_tics_wait; /* raw number of physical processor tics waiting for I/O */
u_longlong_t true_memory; /* True Memory Size in 4KB pages */
u_longlong_t expanded_memory; /* Expanded Memory Size in 4KB pages */
u_longlong_t target_memexp_factr; /* Target Memory Expansion Factor scaled by 100 */
u_longlong_t current_memexp_factr; /* Current Memory Expansion Factor scaled by 100 */
u_longlong_t cmcs_total_time; /* Total CPU time spent due to active memory expansion */
};
// Result struct for get_cpuinfo().
struct cpuinfo_t {
char description[IDENTIFIER_LENGTH]; // processor description (type/official name)
u_longlong_t processorHZ; // processor speed in Hz
int ncpus; // number of active logical processors
double loadavg[3]; // (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
// To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>.
char version[20]; // processor version from _system_configuration (sys/systemcfg.h)
unsigned long long user_clock_ticks; // raw total number of clock ticks spent in user mode
unsigned long long sys_clock_ticks; // raw total number of clock ticks spent in system mode
unsigned long long idle_clock_ticks; // raw total number of clock ticks spent idle
unsigned long long wait_clock_ticks; // raw total number of clock ticks spent waiting for I/O
};
// Result struct for get_wparinfo().
struct wparinfo_t {
char name[MAXCORRALNAMELEN+1]; /* name of the Workload Partition */
unsigned short wpar_id; /* workload partition identifier */
unsigned app_wpar :1; /* Application WPAR */
unsigned cpu_rset :1; /* WPAR restricted to CPU resource set */
unsigned cpu_xrset:1; /* WPAR restricted to CPU Exclusive resource set */
unsigned cpu_limits :1; /* CPU resource limits enforced */
unsigned mem_limits :1; /* Memory resource limits enforced */
int cpu_limit; /* CPU limit in 100ths of % - 1..10000 */
int mem_limit; /* Memory limit in 100ths of % - 1..10000 */
};
static bool get_partitioninfo(partitioninfo_t* ppi);
static bool get_cpuinfo(cpuinfo_t* pci);
static bool get_wparinfo(wparinfo_t* pwi);
};
#endif // OS_AIX_VM_LIBPERFSTAT_AIX_HPP

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012, 2013 SAP AG. All rights reserved.
* Copyright 2012, 2015 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,7 +35,6 @@
#endif
#include "loadlib_aix.hpp"
// for CritSect
#include "misc_aix.hpp"
#include "porting_aix.hpp"
#include "utilities/debug.hpp"

View File

@ -26,6 +26,8 @@
#include "runtime/stubRoutines.hpp"
#include <pthread.h>
#include <unistd.h>
#include <errno.h>
void MiscUtils::init_critsect(MiscUtils::critsect_t* cs) {
const int rc = pthread_mutex_init(cs, NULL);

View File

@ -29,6 +29,8 @@
// misc_aix.hpp, misc_aix.cpp: convenience functions needed for the OpenJDK AIX
// port.
#include "utilities/globalDefinitions.hpp"
#include "runtime/globals.hpp"
#include "utilities/debug.hpp"
#include <pthread.h>
@ -40,7 +42,6 @@
} \
}
#define ERRBYE(s) { trcVerbose(s); return -1; }
#define trc(fmt, ...)
#define assert0(b) assert((b), "")
#define guarantee0(b) guarantee((b), "")

View File

@ -35,7 +35,7 @@
void OSThread::pd_initialize() {
assert(this != NULL, "check");
_thread_id = 0;
_pthread_id = 0;
_kernel_thread_id = 0;
_siginfo = NULL;
_ucontext = NULL;
_expanding_stack = 0;

View File

@ -27,7 +27,7 @@
#define OS_AIX_VM_OSTHREAD_AIX_HPP
public:
typedef pid_t thread_id_t;
typedef pthread_t thread_id_t;
private:
int _thread_type;
@ -43,9 +43,13 @@
private:
// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
pthread_t _pthread_id;
// On AIX, we use the pthread id as OSThread::thread_id and keep the kernel thread id
// separately for diagnostic purposes.
//
// Note: this kernel thread id is saved at thread start. Depending on the
// AIX scheduling mode, this may not be the current thread id (usually not
// a problem though as we run with AIXTHREAD_SCOPE=S).
tid_t _kernel_thread_id;
sigset_t _caller_sigmask; // Caller's signal mask
@ -66,11 +70,16 @@
return false;
}
#endif // ASSERT
pthread_t pthread_id() const {
return _pthread_id;
tid_t kernel_thread_id() const {
return _kernel_thread_id;
}
void set_pthread_id(pthread_t tid) {
_pthread_id = tid;
void set_kernel_thread_id(tid_t tid) {
_kernel_thread_id = tid;
}
pthread_t pthread_id() const {
// Here: same as OSThread::thread_id()
return _thread_id;
}
// ***************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -34,9 +34,6 @@ static bool zero_page_read_protected() { return false; }
class Aix {
friend class os;
// Length of strings included in the libperfstat structures.
#define IDENTIFIER_LENGTH 64
static bool libjsig_is_loaded; // libjsig that interposes sigaction(),
// __sigaction(), signal() is loaded
static struct sigaction *(*get_signal_action)(int);
@ -45,13 +42,15 @@ class Aix {
static void check_signal_handler(int sig);
protected:
private:
static julong _physical_memory;
static pthread_t _main_thread;
static Mutex* _createThread_lock;
static int _page_size;
static int _logical_cpus;
// Page size of newly created pthreads.
static int _stack_page_size;
// -1 = uninitialized, 0 = AIX, 1 = OS/400 (PASE)
static int _on_pase;
@ -63,6 +62,9 @@ class Aix {
// for OS/400 e.g. 0x0504 for OS/400 V5R4
static int _os_version;
// 4 Byte kernel version: Version, Release, Tech Level, Service Pack.
static unsigned int _os_kernel_version;
// -1 = uninitialized,
// 0 - SPEC1170 not requested (XPG_SUS_ENV is OFF or not set)
// 1 - SPEC1170 requested (XPG_SUS_ENV is ON)
@ -73,35 +75,6 @@ class Aix {
// 1 - EXTSHM=ON
static int _extshm;
// page sizes on AIX.
//
// AIX supports four different page sizes - 4K, 64K, 16MB, 16GB. The latter two
// (16M "large" resp. 16G "huge" pages) require special setup and are normally
// not available.
//
// AIX supports multiple page sizes per process, for:
// - Stack (of the primordial thread, so not relevant for us)
// - Data - data, bss, heap, for us also pthread stacks
// - Text - text code
// - shared memory
//
// Default page sizes can be set via linker options (-bdatapsize, -bstacksize, ...)
// and via environment variable LDR_CNTRL (DATAPSIZE, STACKPSIZE, ...)
//
// For shared memory, page size can be set dynamically via shmctl(). Different shared memory
// regions can have different page sizes.
//
// More information can be found at AIBM info center:
// http://publib.boulder.ibm.com/infocenter/aix/v6r1/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/multiple_page_size_app_support.htm
//
// -----
// We want to support 4K and 64K and, if the machine is set up correctly, 16MB pages.
//
// page size of the stack of newly created pthreads
// (should be LDR_CNTRL DATAPSIZE because stack is allocated on heap by pthread lib)
static int _stack_page_size;
static julong available_memory();
static julong physical_memory() { return _physical_memory; }
static void initialize_system_info();
@ -125,9 +98,6 @@ class Aix {
public:
static void init_thread_fpu_state();
static pthread_t main_thread(void) { return _main_thread; }
// returns kernel thread id (similar to LWP id on Solaris), which can be
// used to access /proc
static pid_t gettid();
static void set_createThread_lock(Mutex* lk) { _createThread_lock = lk; }
static Mutex* createThread_lock(void) { return _createThread_lock; }
static void hotspot_sigmask(Thread* thread);
@ -215,6 +185,14 @@ class Aix {
return _os_version;
}
// Get 4 byte AIX kernel version number:
// highest 2 bytes: Version, Release
// if available: lowest 2 bytes: Tech Level, Service Pack.
static unsigned int os_kernel_version() {
if (_os_kernel_version) return _os_kernel_version;
return os_version() << 16;
}
// Convenience method: returns true if running on PASE V5R4 or older.
static bool on_pase_V5R4_or_older() {
return on_pase() && os_version() <= 0x0504;
@ -257,27 +235,12 @@ class Aix {
};
// Result struct for get_cpuinfo().
struct cpuinfo_t {
char description[IDENTIFIER_LENGTH]; // processor description (type/official name)
u_longlong_t processorHZ; // processor speed in Hz
int ncpus; // number of active logical processors
double loadavg[3]; // (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
// To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>.
char version[20]; // processor version from _system_configuration (sys/systemcfg.h)
};
// Functions to retrieve memory information on AIX, PASE.
// (on AIX, using libperfstat, on PASE with libo4.so).
// Returns true if ok, false if error.
static bool get_meminfo(meminfo_t* pmi);
// Function to retrieve cpu information on AIX
// (on AIX, using libperfstat)
// Returns true if ok, false if error.
static bool get_cpuinfo(cpuinfo_t* pci);
}; // os::Aix class
};
class PlatformEvent : public CHeapObj<mtInternal> {

View File

@ -60,6 +60,8 @@ inline bool os::allocate_stack_guard_pages() {
// On Aix, reservations are made on a page by page basis, nothing to do.
inline void os::pd_split_reserved_memory(char *base, size_t size,
size_t split, bool realloc) {
// TODO: Determine whether Sys V memory is split. If yes, we need to treat
// this the same way Windows treats its VirtualAlloc allocations.
}
// Bang the shadow pages if they need to be touched to be mapped.

View File

@ -1801,24 +1801,32 @@ void os::print_memory_info(outputStream* st) {
void os::print_siginfo(outputStream *st, void *siginfo) {
EXCEPTION_RECORD* er = (EXCEPTION_RECORD*)siginfo;
st->print("siginfo:");
st->print(" ExceptionCode=0x%x", er->ExceptionCode);
if (er->ExceptionCode == EXCEPTION_ACCESS_VIOLATION &&
er->NumberParameters >= 2) {
char tmp[64];
if (os::exception_name(er->ExceptionCode, tmp, sizeof(tmp)) == NULL) {
strcpy(tmp, "EXCEPTION_??");
}
st->print(" %s (0x%x)", tmp, er->ExceptionCode);
if ((er->ExceptionCode == EXCEPTION_ACCESS_VIOLATION ||
er->ExceptionCode == EXCEPTION_IN_PAGE_ERROR) &&
er->NumberParameters >= 2) {
switch (er->ExceptionInformation[0]) {
case 0: st->print(", reading address"); break;
case 1: st->print(", writing address"); break;
case 8: st->print(", data execution prevention violation at address"); break;
default: st->print(", ExceptionInformation=" INTPTR_FORMAT,
er->ExceptionInformation[0]);
}
st->print(" " INTPTR_FORMAT, er->ExceptionInformation[1]);
} else if (er->ExceptionCode == EXCEPTION_IN_PAGE_ERROR &&
er->NumberParameters >= 2 && UseSharedSpaces) {
FileMapInfo* mapinfo = FileMapInfo::current_info();
if (mapinfo->is_in_shared_space((void*)er->ExceptionInformation[1])) {
st->print("\n\nError accessing class data sharing archive." \
" Mapped file inaccessible during execution, " \
" possible disk/network problem.");
if (er->ExceptionCode == EXCEPTION_IN_PAGE_ERROR && UseSharedSpaces) {
FileMapInfo* mapinfo = FileMapInfo::current_info();
if (mapinfo->is_in_shared_space((void*)er->ExceptionInformation[1])) {
st->print("\n\nError accessing class data sharing archive." \
" Mapped file inaccessible during execution, " \
" possible disk/network problem.");
}
}
} else {
int num = er->NumberParameters;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012, 2013 SAP AG. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -35,8 +35,7 @@
/******************************/ \
/* Threads (NOTE: incomplete) */ \
/******************************/ \
nonstatic_field(OSThread, _thread_id, pid_t) \
nonstatic_field(OSThread, _pthread_id, pthread_t)
nonstatic_field(OSThread, _thread_id, pthread_t) \
#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type) \
@ -45,7 +44,6 @@
/* Posix Thread IDs */ \
/**********************/ \
\
declare_integer_type(pid_t) \
declare_unsigned_integer_type(pthread_t)
#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)

View File

@ -25,7 +25,6 @@
#ifndef SHARE_VM_GC_G1_G1PREDICTIONS_HPP
#define SHARE_VM_GC_G1_G1PREDICTIONS_HPP
#include "memory/allocation.inline.hpp"
#include "utilities/numberSeq.hpp"
// Utility class containing various helper methods for prediction.

View File

@ -23,7 +23,38 @@
*/
#include "precompiled.hpp"
#include "gc/g1/g1RootClosures.inline.hpp"
#include "gc/g1/g1OopClosures.inline.hpp"
#include "gc/g1/g1RootClosures.hpp"
#include "gc/g1/g1SharedClosures.hpp"
// Closures used for standard G1 evacuation.
class G1EvacuationClosures : public G1EvacuationRootClosures {
G1SharedClosures<G1MarkNone> _closures;
public:
G1EvacuationClosures(G1CollectedHeap* g1h,
G1ParScanThreadState* pss,
bool gcs_are_young) :
_closures(g1h, pss, gcs_are_young, /* must_claim_cld */ false) {}
OopClosure* weak_oops() { return &_closures._buffered_oops; }
OopClosure* strong_oops() { return &_closures._buffered_oops; }
CLDClosure* weak_clds() { return &_closures._clds; }
CLDClosure* strong_clds() { return &_closures._clds; }
CLDClosure* thread_root_clds() { return NULL; }
CLDClosure* second_pass_weak_clds() { return NULL; }
CodeBlobClosure* strong_codeblobs() { return &_closures._codeblobs; }
CodeBlobClosure* weak_codeblobs() { return &_closures._codeblobs; }
void flush() { _closures._buffered_oops.done(); }
double closure_app_seconds() { return _closures._buffered_oops.closure_app_seconds(); }
OopClosure* raw_strong_oops() { return &_closures._oops; }
bool trace_metadata() { return false; }
};
// Closures used during initial mark.
// The treatment of "weak" roots is selectable through the template parameter,

View File

@ -24,9 +24,11 @@
#include "gc/g1/bufferingOopClosure.hpp"
#include "gc/g1/g1CodeBlobClosure.hpp"
#include "gc/g1/g1CollectedHeap.hpp"
#include "gc/g1/g1OopClosures.inline.hpp"
#include "gc/g1/g1RootClosures.hpp"
#include "gc/g1/g1OopClosures.hpp"
#include "memory/iterator.hpp"
class G1CollectedHeap;
class G1ParScanThreadState;
// Simple holder object for a complete set of closures used by the G1 evacuation code.
template <G1Mark Mark>
@ -47,31 +49,3 @@ public:
_codeblobs(&_oops),
_buffered_oops(&_oops) {}
};
class G1EvacuationClosures : public G1EvacuationRootClosures {
G1SharedClosures<G1MarkNone> _closures;
public:
G1EvacuationClosures(G1CollectedHeap* g1h,
G1ParScanThreadState* pss,
bool gcs_are_young) :
_closures(g1h, pss, gcs_are_young, /* must_claim_cld */ false) {}
OopClosure* weak_oops() { return &_closures._buffered_oops; }
OopClosure* strong_oops() { return &_closures._buffered_oops; }
CLDClosure* weak_clds() { return &_closures._clds; }
CLDClosure* strong_clds() { return &_closures._clds; }
CLDClosure* thread_root_clds() { return NULL; }
CLDClosure* second_pass_weak_clds() { return NULL; }
CodeBlobClosure* strong_codeblobs() { return &_closures._codeblobs; }
CodeBlobClosure* weak_codeblobs() { return &_closures._codeblobs; }
void flush() { _closures._buffered_oops.done(); }
double closure_app_seconds() { return _closures._buffered_oops.closure_app_seconds(); }
OopClosure* raw_strong_oops() { return &_closures._oops; }
bool trace_metadata() { return false; }
};

View File

@ -1020,24 +1020,6 @@ HeapRegionRemSet::finish_cleanup_task(HRRSCleanupTask* hrrs_cleanup_task) {
}
#ifndef PRODUCT
void PerRegionTable::test_fl_mem_size() {
PerRegionTable* dummy = alloc(NULL);
size_t min_prt_size = sizeof(void*) + dummy->bm()->size_in_words() * HeapWordSize;
assert(dummy->mem_size() > min_prt_size,
"PerRegionTable memory usage is suspiciously small, only has " SIZE_FORMAT " bytes. "
"Should be at least " SIZE_FORMAT " bytes.", dummy->mem_size(), min_prt_size);
free(dummy);
guarantee(dummy->mem_size() == fl_mem_size(), "fl_mem_size() does not return the correct element size");
// try to reset the state
_free_list = NULL;
delete dummy;
}
void HeapRegionRemSet::test_prt() {
PerRegionTable::test_fl_mem_size();
}
void HeapRegionRemSet::test() {
os::sleep(Thread::current(), (jlong)5000, false);
G1CollectedHeap* g1h = G1CollectedHeap::heap();

View File

@ -392,7 +392,6 @@ public:
// Run unit tests.
#ifndef PRODUCT
static void test_prt();
static void test();
#endif
};

View File

@ -39,6 +39,7 @@
LogOutput** LogConfiguration::_outputs = NULL;
size_t LogConfiguration::_n_outputs = 0;
bool LogConfiguration::_post_initialized = false;
void LogConfiguration::post_initialize() {
assert(LogConfiguration_lock != NULL, "Lock must be initialized before post-initialization");
@ -51,6 +52,8 @@ void LogConfiguration::post_initialize() {
MutexLocker ml(LogConfiguration_lock);
describe(log.trace_stream());
}
_post_initialized = true;
}
void LogConfiguration::initialize(jlong vm_start_time) {
@ -422,3 +425,12 @@ void LogConfiguration::print_command_line_help(FILE* out) {
"\t Turn off all logging, including warnings and errors,\n"
"\t and then enable messages tagged with 'rt' using 'trace' level to file 'rttrace.txt'.\n");
}
void LogConfiguration::rotate_all_outputs() {
for (size_t idx = 0; idx < _n_outputs; idx++) {
if (_outputs[idx]->is_rotatable()) {
_outputs[idx]->rotate(true);
}
}
}

View File

@ -40,6 +40,7 @@ class LogConfiguration : public AllStatic {
private:
static LogOutput** _outputs;
static size_t _n_outputs;
static bool _post_initialized;
// Create a new output. Returns NULL if failed.
static LogOutput* new_output(char* name, const char* options = NULL);
@ -94,6 +95,13 @@ class LogConfiguration : public AllStatic {
// Prints usage help for command line log configuration.
static void print_command_line_help(FILE* out);
static bool is_post_initialized() {
return _post_initialized;
}
// Rotates all LogOutput
static void rotate_all_outputs();
};
#endif // SHARE_VM_LOGGING_LOGCONFIGURATION_HPP

View File

@ -96,7 +96,7 @@ char * LogDecorations::create_pid_decoration(char* pos) {
char * LogDecorations::create_tid_decoration(char* pos) {
int written = jio_snprintf(pos, DecorationsBufferSize - (pos - _decorations_buffer),
INTX_FORMAT, Thread::current()->osthread()->thread_id());
INTX_FORMAT, os::current_thread_id());
ASSERT_AND_RETURN(written, pos)
}

View File

@ -35,13 +35,15 @@ LogDiagnosticCommand::LogDiagnosticCommand(outputStream* output, bool heap_alloc
_what("what", "Configures what tags to log.", "STRING", false),
_decorators("decorators", "Configures which decorators to use. Use 'none' or an empty value to remove all.", "STRING", false),
_disable("disable", "Turns off all logging and clears the log configuration.", "BOOLEAN", false),
_list("list", "Lists current log configuration.", "BOOLEAN", false) {
_list("list", "Lists current log configuration.", "BOOLEAN", false),
_rotate("rotate", "Rotates all logs.", "BOOLEAN", false) {
_dcmdparser.add_dcmd_option(&_output);
_dcmdparser.add_dcmd_option(&_output_options);
_dcmdparser.add_dcmd_option(&_what);
_dcmdparser.add_dcmd_option(&_decorators);
_dcmdparser.add_dcmd_option(&_disable);
_dcmdparser.add_dcmd_option(&_list);
_dcmdparser.add_dcmd_option(&_rotate);
}
int LogDiagnosticCommand::num_arguments() {
@ -86,6 +88,11 @@ void LogDiagnosticCommand::execute(DCmdSource source, TRAPS) {
any_command = true;
}
if (_rotate.has_value()) {
LogConfiguration::rotate_all_outputs();
any_command = true;
}
if (!any_command) {
// If no argument was provided, print usage
print_help(LogDiagnosticCommand::name());

View File

@ -43,6 +43,7 @@ class LogDiagnosticCommand : public DCmdWithParser {
DCmdArgument<char *> _decorators;
DCmdArgument<bool> _disable;
DCmdArgument<bool> _list;
DCmdArgument<bool> _rotate;
public:
LogDiagnosticCommand(outputStream* output, bool heap_allocated);
@ -55,7 +56,7 @@ class LogDiagnosticCommand : public DCmdWithParser {
}
static const char* description() {
return "Lists, enables, disables or changes a log output configuration.";
return "Lists current log configuration, enables/disables/configures a log output, or rotates all logs.";
}
// Used by SecurityManager. This DCMD requires ManagementPermission = control.

View File

@ -155,12 +155,7 @@ int LogFileOutput::write(const LogDecorations& decorations, const char* msg) {
int written = LogFileStreamOutput::write(decorations, msg);
_current_size += written;
if (should_rotate()) {
MutexLockerEx ml(&_rotation_lock, true /* no safepoint check */);
if (should_rotate()) {
rotate();
}
}
rotate(false);
return written;
}
@ -182,7 +177,14 @@ void LogFileOutput::archive() {
}
}
void LogFileOutput::rotate() {
void LogFileOutput::rotate(bool force) {
if (!should_rotate(force)) {
return;
}
MutexLockerEx ml(&_rotation_lock, true /* no safepoint check */);
// Archive the current log file
archive();

View File

@ -58,13 +58,13 @@ class LogFileOutput : public LogFileStreamOutput {
size_t _current_size;
void archive();
void rotate();
bool configure_rotation(const char* options);
char *make_file_name(const char* file_name, const char* pid_string, const char* timestamp_string);
static size_t parse_value(const char* value_str);
bool should_rotate() const {
return _file_count > 0 && _rotate_size > 0 && _current_size >= _rotate_size;
bool should_rotate(bool force) {
return is_rotatable() &&
(force || (_rotate_size > 0 && _current_size >= _rotate_size));
}
public:
@ -73,6 +73,12 @@ class LogFileOutput : public LogFileStreamOutput {
virtual bool initialize(const char* options);
virtual int write(const LogDecorations& decorations, const char* msg);
virtual bool is_rotatable() {
return LogConfiguration::is_post_initialized() && (_file_count > 0);
}
virtual void rotate(bool force);
virtual const char* name() const {
return _name;
}

View File

@ -75,6 +75,14 @@ class LogOutput : public CHeapObj<mtLogging> {
virtual const char* name() const = 0;
virtual bool initialize(const char* options) = 0;
virtual int write(const LogDecorations &decorations, const char* msg) = 0;
virtual bool is_rotatable() {
return false;
}
virtual void rotate(bool force) {
// Do nothing by default.
}
};
#endif // SHARE_VM_LOGGING_LOGOUTPUT_HPP

View File

@ -3933,7 +3933,6 @@ void execute_internal_vm_tests() {
#if INCLUDE_ALL_GCS
run_unit_test(TestOldFreeSpaceCalculation_test());
run_unit_test(TestG1BiasedArray_test());
run_unit_test(HeapRegionRemSet::test_prt());
run_unit_test(TestBufferingOopClosure_test());
run_unit_test(TestCodeCacheRemSet_test());
if (UseG1GC) {

View File

@ -571,6 +571,23 @@ void Deoptimization::cleanup_deopt_info(JavaThread *thread,
thread->dec_in_deopt_handler();
}
// Moved from cpu directories because none of the cpus has callee save values.
// If a cpu implements callee save values, move this to deoptimization_<cpu>.cpp.
void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) {
// This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in
// the days we had adapter frames. When we deoptimize a situation where a
// compiled caller calls a compiled caller will have registers it expects
// to survive the call to the callee. If we deoptimize the callee the only
// way we can restore these registers is to have the oldest interpreter
// frame that we create restore these values. That is what this routine
// will accomplish.
// At the moment we have modified c2 to not have any callee save registers
// so this problem does not exist and this routine is just a place holder.
assert(f->is_interpreted_frame(), "must be interpreted");
}
// Return BasicType of value being returned
JRT_LEAF(BasicType, Deoptimization::unpack_frames(JavaThread* thread, int exec_mode))

View File

@ -232,14 +232,12 @@ void javaVFrame::print_lock_info_on(outputStream* st, int frame_count) {
// disable the extra printing below.
mark = NULL;
}
} else if (frame_count != 0 && ObjectMonitor::Knob_Verbose) {
} else if (frame_count != 0) {
// This is not the first frame so we either own this monitor
// or we owned the monitor before and called wait(). Because
// wait() could have been called on any monitor in a lower
// numbered frame on the stack, we have to check all the
// monitors on the list for this frame.
// Note: Only enable this new output line in verbose mode
// since existing tests are not ready for it.
mark = monitor->owner()->mark();
if (mark->has_monitor() &&
( // we have marked ourself as pending on this monitor

View File

@ -69,6 +69,26 @@ ElfSymbolTable::~ElfSymbolTable() {
}
}
bool ElfSymbolTable::compare(const Elf_Sym* sym, address addr, int* stringtableIndex, int* posIndex, int* offset, ElfFuncDescTable* funcDescTable) {
if (STT_FUNC == ELF_ST_TYPE(sym->st_info)) {
Elf_Word st_size = sym->st_size;
address sym_addr;
if (funcDescTable != NULL && funcDescTable->get_index() == sym->st_shndx) {
// We need to go another step trough the function descriptor table (currently PPC64 only)
sym_addr = funcDescTable->lookup(sym->st_value);
} else {
sym_addr = (address)sym->st_value;
}
if (sym_addr <= addr && (Elf_Word)(addr - sym_addr) < st_size) {
*offset = (int)(addr - sym_addr);
*posIndex = sym->st_name;
*stringtableIndex = m_shdr.sh_link;
return true;
}
}
return false;
}
bool ElfSymbolTable::lookup(address addr, int* stringtableIndex, int* posIndex, int* offset, ElfFuncDescTable* funcDescTable) {
assert(stringtableIndex, "null string table index pointer");
assert(posIndex, "null string table offset pointer");
@ -83,21 +103,8 @@ bool ElfSymbolTable::lookup(address addr, int* stringtableIndex, int* posIndex,
int count = m_shdr.sh_size / sym_size;
if (m_symbols != NULL) {
for (int index = 0; index < count; index ++) {
if (STT_FUNC == ELF_ST_TYPE(m_symbols[index].st_info)) {
Elf_Word st_size = m_symbols[index].st_size;
address sym_addr;
if (funcDescTable != NULL && funcDescTable->get_index() == m_symbols[index].st_shndx) {
// We need to go another step trough the function descriptor table (currently PPC64 only)
sym_addr = funcDescTable->lookup(m_symbols[index].st_value);
} else {
sym_addr = (address)m_symbols[index].st_value;
}
if (sym_addr <= addr && (Elf_Word)(addr - sym_addr) < st_size) {
*offset = (int)(addr - sym_addr);
*posIndex = m_symbols[index].st_name;
*stringtableIndex = m_shdr.sh_link;
return true;
}
if (compare(&m_symbols[index], addr, stringtableIndex, posIndex, offset, funcDescTable)) {
return true;
}
}
} else {
@ -111,21 +118,8 @@ bool ElfSymbolTable::lookup(address addr, int* stringtableIndex, int* posIndex,
Elf_Sym sym;
for (int index = 0; index < count; index ++) {
if (fread(&sym, sym_size, 1, m_file) == 1) {
if (STT_FUNC == ELF_ST_TYPE(sym.st_info)) {
Elf_Word st_size = sym.st_size;
address sym_addr;
if (funcDescTable != NULL && funcDescTable->get_index() == sym.st_shndx) {
// We need to go another step trough the function descriptor table (currently PPC64 only)
sym_addr = funcDescTable->lookup(sym.st_value);
} else {
sym_addr = (address)sym.st_value;
}
if (sym_addr <= addr && (Elf_Word)(addr - sym_addr) < st_size) {
*offset = (int)(addr - sym_addr);
*posIndex = sym.st_name;
*stringtableIndex = m_shdr.sh_link;
return true;
}
if (compare(&sym, addr, stringtableIndex, posIndex, offset, funcDescTable)) {
return true;
}
} else {
m_status = NullDecoder::file_invalid;
@ -134,7 +128,7 @@ bool ElfSymbolTable::lookup(address addr, int* stringtableIndex, int* posIndex,
}
fseek(m_file, cur_pos, SEEK_SET);
}
return true;
return false;
}
#endif // !_WINDOWS && !__APPLE__

View File

@ -63,6 +63,8 @@ class ElfSymbolTable: public CHeapObj<mtInternal> {
Elf_Shdr m_shdr;
NullDecoder::decoder_status m_status;
bool compare(const Elf_Sym* sym, address addr, int* stringtableIndex, int* posIndex, int* offset, ElfFuncDescTable* funcDescTable);
};
#endif // !_WINDOWS and !__APPLE__

View File

@ -23,20 +23,22 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import jdk.test.lib.OutputAnalyzer;
import jdk.test.lib.ProcessTools;
import jdk.test.lib.process.ProcessTools;
/*
* @test
* @summary Test of diagnostic command GC.run_finalization
* @library /testlibrary
* @library /test/lib/share/classes
* @modules java.base/sun.misc
* java.compiler
* java.management
* jdk.jvmstat/sun.jvmstat.monitor
* @build jdk.test.lib.*
* @build jdk.test.lib.dcmd.*
* @build jdk.test.lib.process.*
* @build RunFinalizationTest FinalizationRunner
* @run main RunFinalizationTest
*/
@ -50,8 +52,21 @@ public class RunFinalizationTest {
javaArgs.add(TEST_APP_NAME);
ProcessBuilder testAppPb = ProcessTools.createJavaProcessBuilder(javaArgs.toArray(new String[javaArgs.size()]));
OutputAnalyzer out = ProcessTools.executeProcess(testAppPb);
out.stderrShouldNotMatch("^" + FinalizationRunner.FAILED + ".*")
.stdoutShouldMatch("^" + FinalizationRunner.PASSED + ".*");
final AtomicBoolean failed = new AtomicBoolean();
final AtomicBoolean passed = new AtomicBoolean();
Process runner = ProcessTools.startProcess(
"FinalizationRunner",
testAppPb,
l -> {
failed.compareAndSet(false, l.contains(FinalizationRunner.FAILED));
passed.compareAndSet(false, l.contains(FinalizationRunner.PASSED));
}
);
runner.waitFor();
if (failed.get() || !passed.get()) {
throw new Error("RunFinalizationTest failed");
}
}
}

View File

@ -41,7 +41,10 @@ package jdk.test.lib;
* multiple times, then the line number won't provide enough context to
* understand the failure.
* </pre>
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib}
*/
@Deprecated
public class Asserts {
/**

View File

@ -27,6 +27,11 @@ import java.io.FileNotFoundException;
import java.nio.file.Path;
import java.nio.file.Paths;
/**
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib}
*/
@Deprecated
public final class JDKToolFinder {
private JDKToolFinder() {

View File

@ -46,7 +46,10 @@ import java.util.List;
* Process p = pb.start();
* }
* </pre>
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib}
*/
@Deprecated
public class JDKToolLauncher {
private final String executable;
private final List<String> vmArgs = new ArrayList<String>();

View File

@ -41,7 +41,11 @@ public final class OutputAnalyzer {
*
* @param process Process to analyze
* @throws IOException If an I/O error occurs.
*
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib/process}
*/
@Deprecated
public OutputAnalyzer(Process process) throws IOException {
OutputBuffer output = ProcessTools.getOutput(process);
exitValue = process.exitValue();

View File

@ -23,6 +23,11 @@
package jdk.test.lib;
/**
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib/process}
*/
@Deprecated
public class OutputBuffer {
private final String stdout;
private final String stderr;

View File

@ -25,6 +25,11 @@ package jdk.test.lib;
import java.util.regex.Pattern;
/**
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib}
*/
@Deprecated
public class Platform {
private static final String osName = System.getProperty("os.name");
private static final String dataModel = System.getProperty("sun.arch.data.model");

View File

@ -31,6 +31,11 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib/process}
*/
@Deprecated
public final class ProcessTools {
private ProcessTools() {

View File

@ -27,6 +27,11 @@ import java.io.OutputStream;
import java.io.InputStream;
import java.io.IOException;
/**
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib/process}
*/
@Deprecated
public final class StreamPumper implements Runnable {
private static final int BUF_SIZE = 256;

View File

@ -55,7 +55,11 @@ import sun.misc.Unsafe;
/**
* Common library for various test helper functions.
*
* @deprecated This class is deprecated. Use the one from
* {@code <root>/test/lib/share/classes/jdk/test/lib}
*/
@Deprecated
public final class Utils {
/**