Skip to content

Commit 11a37c8

Browse files
committed
8351165: Remove unused includes from vmStructs
Reviewed-by: kbarrett
1 parent c3b4819 commit 11a37c8

File tree

9 files changed

+7
-39
lines changed

9 files changed

+7
-39
lines changed

src/hotspot/share/classfile/compactHashtable.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -241,7 +241,6 @@ template <
241241
bool (*EQUALS)(V value, K key, int len)
242242
>
243243
class CompactHashtable : public SimpleCompactHashtable {
244-
friend class VMStructs;
245244

246245
V decode(u4 offset) const {
247246
return DECODE(_base_address, offset);

src/hotspot/share/classfile/stringTable.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class SerializeClosure;
4040
class StringTableConfig;
4141

4242
class StringTable : AllStatic {
43-
friend class VMStructs;
4443
friend class StringTableConfig;
4544

4645
static volatile bool _has_work;

src/hotspot/share/classfile/symbolTable.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -47,7 +47,6 @@ class constantPoolHandle;
4747
class SymbolClosure;
4848

4949
class SymbolTable : public AllStatic {
50-
friend class VMStructs;
5150
friend class Symbol;
5251
friend class ClassFileParser;
5352
friend class SymbolTableConfig;

src/hotspot/share/classfile/systemDictionary.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class SystemDictionary : AllStatic {
7979
friend class AOTLinkedClassBulkLoader;
8080
friend class BootstrapInfo;
8181
friend class vmClasses;
82-
friend class VMStructs;
8382

8483
public:
8584

src/hotspot/share/memory/arena.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ class Arena : public CHeapObjBase {
129129
protected:
130130
friend class HandleMark;
131131
friend class NoHandleMark;
132-
friend class VMStructs;
133132

134133
Chunk* _first; // First chunk
135134
Chunk* _chunk; // current chunk

src/hotspot/share/memory/resourceArea.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
//------------------------------ResourceArea-----------------------------------
4444
// A ResourceArea is an Arena that supports safe usage of ResourceMark.
4545
class ResourceArea: public Arena {
46-
friend class VMStructs;
47-
4846
#ifdef ASSERT
4947
int _nesting; // current # of nested ResourceMarks
5048
void verify_has_resource_mark();

src/hotspot/share/runtime/sharedRuntime.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,8 +54,6 @@ enum class SharedStubId :int {
5454
#undef SHARED_STUB_ID_ENUM_DECLARE
5555

5656
class SharedRuntime: AllStatic {
57-
friend class VMStructs;
58-
5957
private:
6058
// Declare shared stub fields
6159
#define SHARED_STUB_FIELD_DECLARE(name, type) \

src/hotspot/share/runtime/vmStructs.cpp

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,9 @@
2323
*/
2424

2525
#include "cds/filemap.hpp"
26-
#include "ci/ciField.hpp"
27-
#include "ci/ciInstance.hpp"
28-
#include "ci/ciMethodData.hpp"
29-
#include "ci/ciObjArrayKlass.hpp"
30-
#include "ci/ciSymbol.hpp"
3126
#include "classfile/classLoaderDataGraph.hpp"
32-
#include "classfile/dictionary.hpp"
3327
#include "classfile/javaClasses.hpp"
3428
#include "classfile/javaThreadStatus.hpp"
35-
#include "classfile/stringTable.hpp"
36-
#include "classfile/symbolTable.hpp"
37-
#include "classfile/systemDictionary.hpp"
3829
#include "classfile/vmClasses.hpp"
3930
#include "classfile/vmSymbols.hpp"
4031
#include "code/codeBlob.hpp"
@@ -103,10 +94,8 @@
10394
#include "runtime/osThread.hpp"
10495
#include "runtime/perfMemory.hpp"
10596
#include "runtime/serviceThread.hpp"
106-
#include "runtime/sharedRuntime.hpp"
10797
#include "runtime/stubRoutines.hpp"
10898
#include "runtime/synchronizer.hpp"
109-
#include "runtime/threadSMR.hpp"
11099
#include "runtime/vframeArray.hpp"
111100
#include "runtime/vmStructs.hpp"
112101
#include "runtime/vm_version.hpp"
@@ -411,7 +400,7 @@
411400
volatile_static_field(PerfMemory, _initialized, int) \
412401
\
413402
/********************/ \
414-
/* SystemDictionary */ \
403+
/* VM Classes */ \
415404
/********************/ \
416405
\
417406
static_field(vmClasses, VM_CLASS_AT(Object_klass), InstanceKlass*) \
@@ -635,7 +624,6 @@
635624
nonstatic_field(JavaThread, _monitor_owner_id, int64_t) \
636625
volatile_nonstatic_field(JavaThread, _terminated, JavaThread::TerminatedTypes) \
637626
nonstatic_field(Thread, _osthread, OSThread*) \
638-
nonstatic_field(Thread, _resource_area, ResourceArea*) \
639627
\
640628
/************/ \
641629
/* OSThread */ \
@@ -1009,17 +997,14 @@
1009997
declare_type(PerfData, CHeapObj<mtInternal>) \
1010998
\
1011999
/********************/ \
1012-
/* SystemDictionary */ \
1000+
/* VM Classes */ \
10131001
/********************/ \
10141002
\
1015-
declare_toplevel_type(SystemDictionary) \
10161003
declare_toplevel_type(vmClasses) \
10171004
declare_toplevel_type(vmSymbols) \
10181005
\
10191006
declare_toplevel_type(GrowableArrayBase) \
10201007
declare_toplevel_type(GrowableArray<int>) \
1021-
declare_toplevel_type(Arena) \
1022-
declare_type(ResourceArea, Arena) \
10231008
\
10241009
/***********************************************************/ \
10251010
/* Thread hierarchy (needed for run-time type information) */ \
@@ -1090,8 +1075,6 @@
10901075
/* CodeBlob hierarchy (needed for run-time type information) */ \
10911076
/*************************************************************/ \
10921077
\
1093-
declare_toplevel_type(SharedRuntime) \
1094-
\
10951078
declare_toplevel_type(CodeBlob) \
10961079
declare_type(RuntimeBlob, CodeBlob) \
10971080
declare_type(BufferBlob, RuntimeBlob) \
@@ -1163,12 +1146,6 @@
11631146
declare_toplevel_type(BasicLock) \
11641147
declare_toplevel_type(BasicObjectLock) \
11651148
\
1166-
/*********************/ \
1167-
/* Adapter Blob Entries */ \
1168-
/*********************/ \
1169-
declare_toplevel_type(AdapterHandlerEntry) \
1170-
declare_toplevel_type(AdapterHandlerEntry*) \
1171-
\
11721149
/********************/ \
11731150
/* -XX flags */ \
11741151
/********************/ \

test/hotspot/jtreg/serviceability/sa/ClhsdbPrintStatics.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@ public static void main(String[] args) throws Exception {
4949
System.out.println("Started LingeredApp with pid " + theApp.getPid());
5050

5151
List<String> cmds = List.of(
52-
"printstatics", "printstatics SystemDictionary",
52+
"printstatics",
5353
"printstatics Threads", "printstatics Universe",
5454
"printstatics JvmtiExport");
5555

0 commit comments

Comments
 (0)