mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-31 13:38:47 +00:00
8368966: Remove spurious VMStructs friends
Reviewed-by: stefank, ayang
This commit is contained in:
parent
5251405ce9
commit
dfd383224d
@ -37,7 +37,6 @@
|
||||
// which ensures that for each oop, at most one ciObject is created.
|
||||
// This invariant allows efficient implementation of ciObject.
|
||||
class ciObjectFactory : public ArenaObj {
|
||||
friend class VMStructs;
|
||||
friend class ciEnv;
|
||||
|
||||
private:
|
||||
|
||||
@ -254,7 +254,6 @@ template <
|
||||
bool (*EQUALS)(V value, K key, int len)
|
||||
>
|
||||
class CompactHashtable : public SimpleCompactHashtable {
|
||||
friend class VMStructs;
|
||||
|
||||
V decode(u4 encoded_value) const {
|
||||
return DECODE(_base_address, encoded_value);
|
||||
|
||||
@ -325,7 +325,6 @@ public:
|
||||
// RuntimeBlob: used for non-compiled method code (adapters, stubs, blobs)
|
||||
|
||||
class RuntimeBlob : public CodeBlob {
|
||||
friend class VMStructs;
|
||||
public:
|
||||
|
||||
// Creation
|
||||
@ -634,7 +633,6 @@ class DeoptimizationBlob: public SingletonBlob {
|
||||
#ifdef COMPILER2
|
||||
|
||||
class UncommonTrapBlob: public SingletonBlob {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
// Creation support
|
||||
UncommonTrapBlob(
|
||||
@ -658,7 +656,6 @@ class UncommonTrapBlob: public SingletonBlob {
|
||||
// ExceptionBlob: used for exception unwinding in compiled code (currently only used by Compiler 2)
|
||||
|
||||
class ExceptionBlob: public SingletonBlob {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
// Creation support
|
||||
ExceptionBlob(
|
||||
@ -695,7 +692,6 @@ class ExceptionBlob: public SingletonBlob {
|
||||
// SafepointBlob: handles illegal_instruction exceptions during a safepoint
|
||||
|
||||
class SafepointBlob: public SingletonBlob {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
// Creation support
|
||||
SafepointBlob(
|
||||
|
||||
@ -42,7 +42,6 @@ class DepChange;
|
||||
// finding nmethods which might need to be deoptimized.
|
||||
//
|
||||
class nmethodBucket: public CHeapObj<mtClass> {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
nmethod* _nmethod;
|
||||
nmethodBucket* volatile _next;
|
||||
@ -68,7 +67,6 @@ class nmethodBucket: public CHeapObj<mtClass> {
|
||||
// and uint64_t integer recording the safepoint counter at the last cleanup.
|
||||
//
|
||||
class DependencyContext : public StackObj {
|
||||
friend class VMStructs;
|
||||
friend class TestDependencyContext;
|
||||
private:
|
||||
nmethodBucket* volatile* _dependency_context_addr;
|
||||
|
||||
@ -90,7 +90,6 @@ class ExceptionCache : public CHeapObj<mtCode> {
|
||||
|
||||
// cache pc descs found in earlier inquiries
|
||||
class PcDescCache {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
enum { cache_size = 4 };
|
||||
// The array elements MUST be volatile! Several threads may modify
|
||||
|
||||
@ -33,8 +33,6 @@ typedef void (*initializer)(void);
|
||||
|
||||
// Per-compiler statistics
|
||||
class CompilerStatistics {
|
||||
friend class VMStructs;
|
||||
|
||||
class Data {
|
||||
friend class VMStructs;
|
||||
public:
|
||||
|
||||
@ -479,7 +479,6 @@ private:
|
||||
// pointers are updated based on their base pointers new value and an offset.
|
||||
#if COMPILER2_OR_JVMCI
|
||||
class DerivedPointerTable : public AllStatic {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
class Entry;
|
||||
static bool _active; // do not record pointers for verify pass etc.
|
||||
|
||||
@ -30,8 +30,6 @@
|
||||
// No interaction with application is required for Epsilon, and therefore
|
||||
// the barrier set is empty.
|
||||
class EpsilonBarrierSet: public BarrierSet {
|
||||
friend class VMStructs;
|
||||
|
||||
public:
|
||||
EpsilonBarrierSet();
|
||||
|
||||
|
||||
@ -32,8 +32,6 @@
|
||||
#include "services/memoryService.hpp"
|
||||
|
||||
class EpsilonSpaceCounters: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
PerfVariable* _capacity;
|
||||
PerfVariable* _used;
|
||||
|
||||
@ -37,8 +37,6 @@ class G1NUMA;
|
||||
// some accessors (e.g. allocating into them, or getting their occupancy).
|
||||
// Also keeps track of retained regions across GCs.
|
||||
class G1Allocator : public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
G1CollectedHeap* _g1h;
|
||||
G1NUMA* _numa;
|
||||
|
||||
@ -62,7 +62,6 @@ class Thread;
|
||||
// cards.
|
||||
//
|
||||
class G1BarrierSet: public CardTableBarrierSet {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
BufferNode::Allocator _satb_mark_queue_buffer_allocator;
|
||||
G1SATBMarkQueueSet _satb_mark_queue_set;
|
||||
|
||||
@ -35,9 +35,7 @@
|
||||
// into "N"-word subregions (where "N" = 2^"LogN". An array with an entry
|
||||
// for each such subregion indicates how far back one must go to find the
|
||||
// start of the chunk that includes the first word of the subregion.
|
||||
class G1BlockOffsetTable: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
class G1BlockOffsetTable : public CHeapObj<mtGC> {
|
||||
private:
|
||||
// The reserved region covered by the table.
|
||||
MemRegion _reserved;
|
||||
|
||||
@ -45,7 +45,6 @@ class G1CardTableChangedListener : public G1MappingChangedListener {
|
||||
};
|
||||
|
||||
class G1CardTable : public CardTable {
|
||||
friend class VMStructs;
|
||||
friend class G1CardTableChangedListener;
|
||||
|
||||
G1CardTableChangedListener _listener;
|
||||
|
||||
@ -33,8 +33,6 @@ class G1Policy;
|
||||
// The concurrent mark thread triggers the various steps of the concurrent marking
|
||||
// cycle, including various marking cleanup.
|
||||
class G1ConcurrentMarkThread: public ConcurrentGCThread {
|
||||
friend class VMStructs;
|
||||
|
||||
G1ConcurrentMark* _cm;
|
||||
|
||||
enum ServiceState : uint {
|
||||
|
||||
@ -36,7 +36,6 @@ class G1ConcurrentRefine;
|
||||
// Concurrent refinement control thread watching card mark accrual on the card table
|
||||
// and starting refinement work.
|
||||
class G1ConcurrentRefineThread: public ConcurrentGCThread {
|
||||
friend class VMStructs;
|
||||
friend class G1CollectedHeap;
|
||||
|
||||
Monitor _notifier;
|
||||
|
||||
@ -40,8 +40,6 @@ class G1CSetCandidateGroup;
|
||||
class outputStream;
|
||||
|
||||
class G1HeapRegionRemSet : public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
// A set of nmethods whose code contains pointers into
|
||||
// the region that owns this RSet.
|
||||
G1CodeRootSet _code_roots;
|
||||
|
||||
@ -45,7 +45,6 @@ class WorkerThreads;
|
||||
// The implementation gives an error when trying to commit or uncommit pages that
|
||||
// have already been committed or uncommitted.
|
||||
class G1PageBasedVirtualSpace {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
// Reserved area addresses.
|
||||
char* _low_boundary;
|
||||
|
||||
@ -60,8 +60,6 @@
|
||||
*/
|
||||
|
||||
class MutableNUMASpace : public MutableSpace {
|
||||
friend class VMStructs;
|
||||
|
||||
class LGRPSpace : public CHeapObj<mtGC> {
|
||||
uint _lgrp_id;
|
||||
MutableSpace* _space;
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
// that track a space;
|
||||
|
||||
class CSpaceCounters: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
PerfVariable* _capacity;
|
||||
PerfVariable* _used;
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
// that track a collector
|
||||
|
||||
class CollectorCounters: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
PerfCounter* _invocations;
|
||||
PerfCounter* _time;
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
// that track a generation
|
||||
|
||||
class GCPolicyCounters: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
// Constant PerfData types don't need to retain a reference.
|
||||
// However, it's a good idea to document them here.
|
||||
// PerfStringConstant* _name;
|
||||
|
||||
@ -32,8 +32,6 @@
|
||||
// that track a generation
|
||||
|
||||
class GenerationCounters: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
PerfVariable* _current_size;
|
||||
|
||||
// Constant PerfData types don't need to retain a reference.
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
// that track a collections (logical spaces) in a heap;
|
||||
|
||||
class HSpaceCounters: public CHeapObj<mtGC> {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
PerfVariable* _capacity;
|
||||
PerfVariable* _used;
|
||||
|
||||
@ -33,8 +33,6 @@ class nmethod;
|
||||
class NMethodToOopClosure;
|
||||
|
||||
class ScavengableNMethods : public AllStatic {
|
||||
friend class VMStructs;
|
||||
|
||||
static nmethod* _head;
|
||||
static BoolObjectClosure* _is_scavengable;
|
||||
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
// not an inner class of StringDedup. This is because we need a simple public
|
||||
// identifier for use by VMStructs.
|
||||
class StringDedupThread : public JavaThread {
|
||||
friend class VMStructs;
|
||||
|
||||
StringDedupThread();
|
||||
~StringDedupThread() = default;
|
||||
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
#define ShenandoahMinCardSizeInBytes 128
|
||||
|
||||
class ShenandoahCardTable: public CardTable {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
// We maintain two copies of the card table to facilitate concurrent remembered set scanning
|
||||
// and concurrent clearing of stale remembered set information. During the init_mark safepoint,
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
#include "gc/shenandoah/shenandoahSharedVariables.hpp"
|
||||
|
||||
class ShenandoahControlThread: public ShenandoahController {
|
||||
friend class VMStructs;
|
||||
|
||||
private:
|
||||
typedef enum {
|
||||
none,
|
||||
|
||||
@ -38,8 +38,6 @@ class ShenandoahGenerationalHeap;
|
||||
class ShenandoahHeap;
|
||||
|
||||
class ShenandoahGenerationalControlThread: public ShenandoahController {
|
||||
friend class VMStructs;
|
||||
|
||||
public:
|
||||
typedef enum {
|
||||
none,
|
||||
|
||||
@ -45,8 +45,6 @@ class ShenandoahOldHeuristics;
|
||||
* sleep time.
|
||||
*/
|
||||
class ShenandoahRegulatorThread: public ConcurrentGCThread {
|
||||
friend class VMStructs;
|
||||
|
||||
public:
|
||||
explicit ShenandoahRegulatorThread(ShenandoahGenerationalControlThread* control_thread);
|
||||
|
||||
|
||||
@ -84,7 +84,6 @@ class DispatchTable {
|
||||
};
|
||||
|
||||
class TemplateInterpreter: public AbstractInterpreter {
|
||||
friend class VMStructs;
|
||||
friend class InterpreterMacroAssembler;
|
||||
friend class TemplateInterpreterGenerator;
|
||||
friend class TemplateTable;
|
||||
|
||||
@ -79,7 +79,6 @@ friend class AbstractInterpreterGenerator;
|
||||
friend class ZeroInterpreterGenerator;
|
||||
friend class InterpreterMacroAssembler;
|
||||
friend class frame;
|
||||
friend class VMStructs;
|
||||
|
||||
public:
|
||||
enum messages {
|
||||
|
||||
@ -36,7 +36,6 @@ class InterpreterCodelet;
|
||||
// of the c++ interpreter
|
||||
|
||||
class ZeroInterpreter: public AbstractInterpreter {
|
||||
friend class VMStructs;
|
||||
public:
|
||||
// Initialization/debugging
|
||||
static void initialize_stub();
|
||||
|
||||
@ -70,7 +70,6 @@ class HeapBlock {
|
||||
};
|
||||
|
||||
class FreeBlock: public HeapBlock {
|
||||
friend class VMStructs;
|
||||
protected:
|
||||
FreeBlock* _link;
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
#include "utilities/exceptions.hpp"
|
||||
|
||||
class MetaspacePerfCounters {
|
||||
friend class VMStructs;
|
||||
PerfVariable* _capacity;
|
||||
PerfVariable* _used;
|
||||
PerfVariable* _max_capacity;
|
||||
|
||||
@ -37,7 +37,6 @@ class ClassFileParser;
|
||||
// the list later?
|
||||
|
||||
class InstanceClassLoaderKlass: public InstanceKlass {
|
||||
friend class VMStructs;
|
||||
friend class InstanceKlass;
|
||||
public:
|
||||
static const KlassKind Kind = InstanceClassLoaderKlassKind;
|
||||
|
||||
@ -41,7 +41,6 @@ class ClassFileParser;
|
||||
|
||||
|
||||
class InstanceMirrorKlass: public InstanceKlass {
|
||||
friend class VMStructs;
|
||||
friend class InstanceKlass;
|
||||
|
||||
public:
|
||||
|
||||
@ -100,7 +100,6 @@ Chunk layout:
|
||||
|
||||
|
||||
class InstanceStackChunkKlass: public InstanceKlass {
|
||||
friend class VMStructs;
|
||||
friend class InstanceKlass;
|
||||
friend class Continuations;
|
||||
|
||||
|
||||
@ -43,8 +43,6 @@ class MachOper;
|
||||
|
||||
//---------------------------Matcher-------------------------------------------
|
||||
class Matcher : public PhaseTransform {
|
||||
friend class VMStructs;
|
||||
|
||||
public:
|
||||
|
||||
// Machine-dependent definitions
|
||||
|
||||
@ -41,8 +41,6 @@ class SwitchRange;
|
||||
|
||||
//------------------------------InlineTree-------------------------------------
|
||||
class InlineTree : public AnyObj {
|
||||
friend class VMStructs;
|
||||
|
||||
Compile* C; // cache
|
||||
JVMState* _caller_jvms; // state of caller
|
||||
ciMethod* _method; // method being called by the caller_jvms
|
||||
|
||||
@ -68,7 +68,6 @@ extern bool is_vm_statically_linked();
|
||||
* string prior to JDK 1.6 was removed (partial initialization)
|
||||
*/
|
||||
class JDK_Version {
|
||||
friend class VMStructs;
|
||||
friend class Universe;
|
||||
friend void JDK_Version_init();
|
||||
private:
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
// A hidden from external view JavaThread for deflating idle monitors.
|
||||
|
||||
class MonitorDeflationThread : public JavaThread {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
|
||||
static void monitor_deflation_thread_entry(JavaThread* thread, TRAPS);
|
||||
|
||||
@ -28,8 +28,6 @@
|
||||
#include "runtime/thread.hpp"
|
||||
|
||||
class NonJavaThread: public Thread {
|
||||
friend class VMStructs;
|
||||
|
||||
NonJavaThread* volatile _next;
|
||||
|
||||
class List;
|
||||
@ -103,7 +101,6 @@ class NamedThread: public NonJavaThread {
|
||||
|
||||
// A single WatcherThread is used for simulating timer interrupts.
|
||||
class WatcherThread: public NonJavaThread {
|
||||
friend class VMStructs;
|
||||
protected:
|
||||
virtual void run();
|
||||
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
// breakpoints inside registered MXBean notification listeners.
|
||||
|
||||
class NotificationThread : public JavaThread {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
|
||||
static void notification_thread_entry(JavaThread* thread, TRAPS);
|
||||
|
||||
@ -168,7 +168,6 @@ public:
|
||||
};
|
||||
|
||||
class os: AllStatic {
|
||||
friend class VMStructs;
|
||||
friend class JVMCIVMStructs;
|
||||
friend class MallocTracker;
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@
|
||||
class JvmtiDeferredEvent;
|
||||
|
||||
class ServiceThread : public JavaThread {
|
||||
friend class VMStructs;
|
||||
private:
|
||||
DEBUG_ONLY(static JavaThread* _instance;)
|
||||
static JvmtiDeferredEvent* _jvmti_event;
|
||||
|
||||
@ -58,11 +58,8 @@
|
||||
#include "oops/constMethod.hpp"
|
||||
#include "oops/cpCache.hpp"
|
||||
#include "oops/fieldInfo.hpp"
|
||||
#include "oops/instanceClassLoaderKlass.hpp"
|
||||
#include "oops/instanceKlass.hpp"
|
||||
#include "oops/instanceMirrorKlass.hpp"
|
||||
#include "oops/instanceOop.hpp"
|
||||
#include "oops/instanceStackChunkKlass.hpp"
|
||||
#include "oops/klass.hpp"
|
||||
#include "oops/klassVtable.hpp"
|
||||
#include "oops/markWord.hpp"
|
||||
@ -84,7 +81,6 @@
|
||||
#include "runtime/deoptimization.hpp"
|
||||
#include "runtime/flags/jvmFlag.hpp"
|
||||
#include "runtime/globals.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
#include "runtime/javaCalls.hpp"
|
||||
#include "runtime/javaThread.hpp"
|
||||
#include "runtime/jniHandles.hpp"
|
||||
|
||||
@ -317,8 +317,6 @@ public:
|
||||
// - void Derived::deallocate(E*) - member function responsible for deallocation
|
||||
template <typename E, typename Derived>
|
||||
class GrowableArrayWithAllocator : public GrowableArrayView<E> {
|
||||
friend class VMStructs;
|
||||
|
||||
void expand_to(int j);
|
||||
void grow(int j);
|
||||
|
||||
@ -714,6 +712,7 @@ public:
|
||||
|
||||
template <typename E>
|
||||
class GrowableArray : public GrowableArrayWithAllocator<E, GrowableArray<E>> {
|
||||
friend class VMStructs;
|
||||
friend class GrowableArrayWithAllocator<E, GrowableArray>;
|
||||
friend class GrowableArrayTest;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user