/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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 "classfile/vmSymbols.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/perfData.hpp"
#include "utilities/exceptions.hpp"
#include "utilities/globalDefinitions.hpp"
/*
* The jvmstat global and subsysem jvmstat counter name spaces. The top
* level name spaces imply the interface stability level of the counter,
* which generally follows the Java package, class, and property naming
* conventions. The CounterNS enumeration values should be used to index
* into this array.
*/
// top level name spaces
"java", // stable and supported name space
"com.sun", // unstable but supported name space
"sun", // unstable and unsupported name space
// subsystem name spaces
"java.gc", // Garbage Collection name spaces
"com.sun.gc",
"sun.gc",
"java.ci", // Compiler name spaces
"com.sun.ci",
"sun.ci",
"java.cls", // Class Loader name spaces
"com.sun.cls",
"sun.cls",
"java.rt", // Runtime name spaces
"com.sun.rt",
"sun.rt",
"java.os", // Operating System name spaces
"com.sun.os",
"sun.os",
"java.threads", // Threads System name spaces
"com.sun.threads",
"sun.threads",
"java.property", // Java Property name spaces
"com.sun.property",
"sun.property",
"",
};
_on_c_heap(false) {
// No prefix is added to counters with the NULL_NS namespace.
// set the F_Supported flag based on the counter name prefix.
}
else {
}
}
else {
// set the F_Supported flag based on the given namespace.
}
else {
}
}
}
}
if (is_on_c_heap()) {
}
}
size += pad_length;
// align size to assure allocation in units of 8 bytes
// out of PerfMemory memory resources. allocate on the C heap
// to avoid vm termination.
_on_c_heap = true;
}
// compute the addresses for the name and data
// data is in the last dsize*dlen bytes of the entry
// copy the name, including null terminator, into PerfData memory
// set the header values in PerfData memory
if (PerfTraceDataCreation) {
" units = %d, dsize = %d, vlen = %d,"
" pad_length = %d, size = %d, on_c_heap = %s,"
}
// record the start of the entry and the location of the data field.
// mark the PerfData memory region as having been updated.
}
}
}
sample();
}
sample();
}
if (_sample_helper != NULL) {
}
}
}
}
// copy n bytes of the string, assuring the null string is
// copied if s2 == NULL.
// assure the string is null terminated when strlen(s2) >= _length
}
}
const char* initial_value)
if (PrintMiscellaneous && Verbose) {
warning("Truncating PerfStringConstant: name = %s,"
}
}
}
// destroy already called, or initialization never happened
return;
delete p;
}
delete(_all);
delete(_sampled);
delete(_constants);
_constants = NULL;
}
}
// add to the list of all perf data items
if (_constants == NULL) {
}
_constants->append(p);
return;
}
if (sampled) {
}
}
}
}
return NULL;
return clone;
}
return NULL;
return clone;
}
if (_constants == NULL)
return NULL;
return clone;
}
return result;
}
int instance) {
}
}
const char* name,
const char* s,
TRAPS) {
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, false);
return p;
}
const char* name,
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, false);
return p;
}
const char* name,
const char* s,
TRAPS) {
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, false);
return p;
}
const char* name,
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, false);
return p;
}
const char* name,
// Sampled counters not supported if UsePerfData is false
if (!UsePerfData) return NULL;
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, true);
return p;
}
const char* name,
TRAPS) {
// Sampled counters not supported if UsePerfData is false
if (!UsePerfData) return NULL;
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, true);
return p;
}
const char* name,
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, false);
return p;
}
const char* name,
// Sampled counters not supported if UsePerfData is false
if (!UsePerfData) return NULL;
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, true);
return p;
}
const char* name,
TRAPS) {
// Sampled counters not supported if UsePerfData is false
if (!UsePerfData) return NULL;
if (!p->is_valid()) {
// allocation of native resources failed.
delete p;
}
add_item(p, true);
return p;
}
}
}
PerfDataList::~PerfDataList() {
delete _set;
}
return false;
}
else
return NULL;
}
return copy;
}