8259882: Reduce the inclusion of perfData.hpp
Reviewed-by: redestad, coleenp
This commit is contained in:
parent
92c2f084a2
commit
ba38661504
@ -65,6 +65,7 @@
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/javaCalls.hpp"
|
||||
#include "runtime/os.inline.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/threadCritical.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vm_version.hpp"
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#include "jimage.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "utilities/exceptions.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "runtime/javaCalls.hpp"
|
||||
#include "runtime/jniHandles.inline.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/safepointVerifiers.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/sweeper.hpp"
|
||||
@ -2684,6 +2685,10 @@ const char* CompileBroker::compiler_name(int comp_level) {
|
||||
}
|
||||
}
|
||||
|
||||
jlong CompileBroker::total_compilation_ticks() {
|
||||
return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
|
||||
}
|
||||
|
||||
void CompileBroker::print_times(const char* name, CompilerStatistics* stats) {
|
||||
tty->print_cr(" %s {speed: %6.3f bytes/s; standard: %6.3f s, %d bytes, %d methods; osr: %6.3f s, %d bytes, %d methods; nmethods_size: %d bytes; nmethods_code_size: %d bytes}",
|
||||
name, stats->bytes_per_second(),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2021, 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
|
||||
@ -30,7 +30,7 @@
|
||||
#include "compiler/compileTask.hpp"
|
||||
#include "compiler/compilerDirectives.hpp"
|
||||
#include "runtime/atomic.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "utilities/stack.hpp"
|
||||
#if INCLUDE_JVMCI
|
||||
#include "jvmci/jvmciCompiler.hpp"
|
||||
@ -367,9 +367,7 @@ public:
|
||||
return old == 0;
|
||||
}
|
||||
// Return total compilation ticks
|
||||
static jlong total_compilation_ticks() {
|
||||
return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
|
||||
}
|
||||
static jlong total_compilation_ticks();
|
||||
|
||||
// Redefine Classes support
|
||||
static void mark_on_stack();
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "memory/allocation.hpp"
|
||||
#include "memory/metaspaceCounters.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "services/memoryService.hpp"
|
||||
|
||||
class EpsilonSpaceCounters: public CHeapObj<mtGC> {
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "logging/log.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "utilities/copy.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2021, 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
|
||||
@ -27,9 +27,9 @@
|
||||
|
||||
#include "oops/markWord.hpp"
|
||||
#include "oops/oop.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
|
||||
/* Copyright (c) 1992, 2019, Oracle and/or its affiliates, and Stanford University.
|
||||
/* Copyright (c) 1992, 2021, Oracle and/or its affiliates, and Stanford University.
|
||||
See the LICENSE file for license information. */
|
||||
|
||||
// Age table for adaptive feedback-mediated tenuring (scavenging)
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.inline.hpp"
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
#include "runtime/vmThread.hpp"
|
||||
@ -371,6 +372,14 @@ MemoryUsage CollectedHeap::memory_usage() {
|
||||
return MemoryUsage(InitialHeapSize, used(), capacity(), max_capacity());
|
||||
}
|
||||
|
||||
void CollectedHeap::set_gc_cause(GCCause::Cause v) {
|
||||
if (UsePerfData) {
|
||||
_gc_lastcause = _gc_cause;
|
||||
_perf_gc_lastcause->set_value(GCCause::to_string(_gc_lastcause));
|
||||
_perf_gc_cause->set_value(GCCause::to_string(v));
|
||||
}
|
||||
_gc_cause = v;
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
void CollectedHeap::check_for_non_bad_heap_word_value(HeapWord* addr, size_t size) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2021, 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
|
||||
@ -32,7 +32,7 @@
|
||||
#include "memory/heapInspection.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
#include "services/memoryUsage.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
@ -246,14 +246,7 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||
|
||||
virtual uint32_t hash_oop(oop obj) const;
|
||||
|
||||
void set_gc_cause(GCCause::Cause v) {
|
||||
if (UsePerfData) {
|
||||
_gc_lastcause = _gc_cause;
|
||||
_perf_gc_lastcause->set_value(GCCause::to_string(_gc_lastcause));
|
||||
_perf_gc_cause->set_value(GCCause::to_string(v));
|
||||
}
|
||||
_gc_cause = v;
|
||||
}
|
||||
void set_gc_cause(GCCause::Cause v);
|
||||
GCCause::Cause gc_cause() { return _gc_cause; }
|
||||
|
||||
oop obj_allocate(Klass* klass, int size, TRAPS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2021, 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
|
||||
@ -26,6 +26,7 @@
|
||||
#include "gc/shared/generationCounters.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
|
||||
void GenerationCounters::initialize(const char* name, int ordinal, int spaces,
|
||||
size_t min_capacity, size_t max_capacity,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2021, 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
|
||||
@ -26,7 +26,7 @@
|
||||
#define SHARE_GC_SHARED_GENERATIONCOUNTERS_HPP
|
||||
|
||||
#include "memory/virtualspace.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
|
||||
// A GenerationCounter is a holder class for performance counters
|
||||
// that track a generation
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "memory/universe.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "runtime/threadSMR.hpp"
|
||||
#include "utilities/copy.hpp"
|
||||
|
@ -26,7 +26,9 @@
|
||||
#define SHARE_GC_SHARED_THREADLOCALALLOCBUFFER_HPP
|
||||
|
||||
#include "gc/shared/gcUtil.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/sizes.hpp"
|
||||
|
||||
class ThreadLocalAllocStats;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2021, 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
|
||||
@ -28,9 +28,9 @@
|
||||
#include "logging/logLevel.hpp"
|
||||
#include "logging/logTag.hpp"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/vmEnums.hpp"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, 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
|
||||
@ -46,6 +46,7 @@
|
||||
#include "runtime/objectMonitor.inline.hpp"
|
||||
#include "runtime/orderAccess.hpp"
|
||||
#include "runtime/osThread.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/safepointMechanism.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, 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
|
||||
@ -31,7 +31,7 @@
|
||||
#include "oops/weakHandle.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/park.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
|
||||
class ObjectMonitor;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2021, 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
|
||||
@ -26,6 +26,7 @@
|
||||
#define SHARE_RUNTIME_PERFDATA_HPP
|
||||
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "runtime/perfMemory.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
|
||||
@ -349,9 +350,6 @@ class PerfLongSampleHelper : public CHeapObj<mtInternal> {
|
||||
virtual jlong take_sample() = 0;
|
||||
};
|
||||
|
||||
typedef PerfLongSampleHelper PerfSampleHelper;
|
||||
|
||||
|
||||
/*
|
||||
* PerfLong is the base class for the various Long PerfData subtypes.
|
||||
* it contains implementation details that are common among its derived
|
||||
@ -395,8 +393,6 @@ class PerfLongConstant : public PerfLong {
|
||||
}
|
||||
};
|
||||
|
||||
typedef PerfLongConstant PerfConstant;
|
||||
|
||||
/*
|
||||
* The PerfLongVariant class, and its alias PerfVariant, implement
|
||||
* a PerfData subtype that holds a jlong data value that can be modified
|
||||
@ -459,8 +455,6 @@ class PerfLongCounter : public PerfLongVariant {
|
||||
sample_helper) { }
|
||||
};
|
||||
|
||||
typedef PerfLongCounter PerfCounter;
|
||||
|
||||
/*
|
||||
* The PerfLongVariable class, and its alias PerfVariable, implement
|
||||
* a PerfData subtype that holds a jlong data value that can
|
||||
@ -489,8 +483,6 @@ class PerfLongVariable : public PerfLongVariant {
|
||||
inline void set_value(jlong val) { (*(jlong*)_valuep) = val; }
|
||||
};
|
||||
|
||||
typedef PerfLongVariable PerfVariable;
|
||||
|
||||
/*
|
||||
* The PerfByteArray provides a PerfData subtype that allows the creation
|
||||
* of a contiguous region of the PerfData memory region for storing a vector
|
||||
|
45
src/hotspot/share/runtime/perfDataTypes.hpp
Normal file
45
src/hotspot/share/runtime/perfDataTypes.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2021, 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SHARE_RUNTIME_PERFDATATYPES_HPP
|
||||
#define SHARE_RUNTIME_PERFDATATYPES_HPP
|
||||
|
||||
// Forward declaration of the types used by the performance counters. The
|
||||
// actual class declarations are in perfData.hpp.
|
||||
//
|
||||
// To reduce HotSpot build time, if you just need to declare a pointer to the
|
||||
// following types, include this file instead of perfData.hpp.
|
||||
|
||||
class PerfLongSampleHelper;
|
||||
class PerfLongConstant;
|
||||
class PerfLongCounter;
|
||||
class PerfLongVariable;
|
||||
class PerfStringVariable;
|
||||
|
||||
typedef PerfLongSampleHelper PerfSampleHelper;
|
||||
typedef PerfLongConstant PerfConstant;
|
||||
typedef PerfLongCounter PerfCounter;
|
||||
typedef PerfLongVariable PerfVariable;
|
||||
|
||||
#endif // SHARE_RUNTIME_PERFDATATYPES_HPP
|
@ -43,6 +43,7 @@
|
||||
#include "runtime/objectMonitor.hpp"
|
||||
#include "runtime/objectMonitor.inline.hpp"
|
||||
#include "runtime/osThread.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/safepointMechanism.inline.hpp"
|
||||
#include "runtime/safepointVerifiers.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "runtime/basicLock.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
|
||||
class LogStream;
|
||||
class ObjectMonitor;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, 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,6 +38,7 @@
|
||||
#include "runtime/interfaceSupport.inline.hpp"
|
||||
#include "runtime/mutexLocker.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/safepoint.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2021, 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
|
||||
@ -25,7 +25,7 @@
|
||||
#ifndef SHARE_RUNTIME_VMTHREAD_HPP
|
||||
#define SHARE_RUNTIME_VMTHREAD_HPP
|
||||
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/perfDataTypes.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "runtime/task.hpp"
|
||||
#include "runtime/vmOperations.hpp"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2021, 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
|
||||
@ -28,6 +28,7 @@
|
||||
#include "jmm.h"
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
#include "runtime/perfData.hpp"
|
||||
#include "runtime/timer.hpp"
|
||||
|
||||
class OopClosure;
|
||||
|
Loading…
x
Reference in New Issue
Block a user