Skip to content

8362587: Sort share/oops includes #26386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/compressedOops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
*
*/

#include "gc/shared/collectedHeap.hpp"
#include "logging/log.hpp"
#include "logging/logStream.hpp"
#include "memory/memRegion.hpp"
#include "memory/reservedSpace.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/compressedOops.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "runtime/arguments.hpp"
#include "runtime/globals.hpp"

Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/oops/compressedOops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "memory/memRegion.hpp"
#include "oops/oopsHierarchy.hpp"
#include "utilities/globalDefinitions.hpp"

#include <type_traits>

class outputStream;
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/cpCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include "classfile/systemDictionaryShared.hpp"
#include "classfile/vmClasses.hpp"
#include "code/codeCache.hpp"
#include "interpreter/bytecodeStream.hpp"
#include "interpreter/bytecodes.hpp"
#include "interpreter/bytecodeStream.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/linkResolver.hpp"
#include "interpreter/rewriter.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/fieldInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
*
*/

#include "memory/resourceArea.hpp"
#include "cds/cdsConfig.hpp"
#include "memory/resourceArea.hpp"
#include "oops/fieldInfo.inline.hpp"
#include "runtime/atomic.hpp"
#include "utilities/packedTable.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/fieldStreams.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#ifndef SHARE_OOPS_FIELDSTREAMS_HPP
#define SHARE_OOPS_FIELDSTREAMS_HPP

#include "oops/instanceKlass.hpp"
#include "oops/fieldInfo.hpp"
#include "oops/instanceKlass.hpp"
#include "runtime/fieldDescriptor.hpp"

// The is the base class for iteration over the fields array
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/oops/instanceKlass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
#include "interpreter/rewriter.hpp"
#include "jvm.h"
#include "jvmtifiles/jvmti.h"
#include "logging/log.hpp"
#include "klass.inline.hpp"
#include "logging/log.hpp"
#include "logging/logMessage.hpp"
#include "logging/logStream.hpp"
#include "memory/allocation.inline.hpp"
Expand All @@ -61,8 +61,8 @@
#include "memory/oopFactory.hpp"
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "oops/fieldStreams.inline.hpp"
#include "oops/constantPool.hpp"
#include "oops/fieldStreams.inline.hpp"
#include "oops/instanceClassLoaderKlass.hpp"
#include "oops/instanceKlass.inline.hpp"
#include "oops/instanceMirrorKlass.hpp"
Expand All @@ -78,8 +78,8 @@
#include "prims/jvmtiThreadState.hpp"
#include "prims/methodComparator.hpp"
#include "runtime/arguments.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/atomic.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/fieldDescriptor.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/javaCalls.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/oops/instanceOop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define SHARE_OOPS_INSTANCEOOP_HPP

#include "oops/oop.hpp"

#include <type_traits>

// An instanceOop is an instance of a Java Class
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/klassVtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/flags/flagSetting.hpp"
#include "runtime/java.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
#include "runtime/safepointVerifiers.hpp"
#include "utilities/copy.hpp"

Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/oops/markWord.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
#ifndef SHARE_OOPS_MARKWORD_INLINE_HPP
#define SHARE_OOPS_MARKWORD_INLINE_HPP

#include "oops/compressedOops.inline.hpp"
#include "oops/markWord.hpp"

#include "oops/compressedOops.inline.hpp"

narrowKlass markWord::narrow_klass() const {
#ifdef _LP64
assert(UseCompactObjectHeaders, "only used with compact object headers");
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
*
*/

#include "oops/metadata.hpp"
#include "memory/resourceArea.hpp"
#include "oops/metadata.hpp"
#include "prims/jvmtiRedefineClasses.hpp"

void Metadata::set_on_stack(const bool value) {
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/oops/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
#include "code/debugInfoRec.hpp"
#include "compiler/compilationPolicy.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "interpreter/bytecodes.hpp"
#include "interpreter/bytecodeStream.hpp"
#include "interpreter/bytecodeTracer.hpp"
#include "interpreter/bytecodes.hpp"
#include "interpreter/interpreter.hpp"
#include "interpreter/oopMapCache.hpp"
#include "logging/log.hpp"
Expand All @@ -51,8 +51,8 @@
#include "memory/resourceArea.hpp"
#include "memory/universe.hpp"
#include "nmt/memTracker.hpp"
#include "oops/constMethod.hpp"
#include "oops/constantPool.hpp"
#include "oops/constMethod.hpp"
#include "oops/jmethodIDTable.hpp"
#include "oops/klass.inline.hpp"
#include "oops/method.inline.hpp"
Expand All @@ -64,8 +64,8 @@
#include "oops/trainingData.hpp"
#include "prims/jvmtiExport.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/atomic.hpp"
#include "runtime/arguments.hpp"
#include "runtime/atomic.hpp"
#include "runtime/continuationEntry.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/handles.inline.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/method.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include "compiler/compilerDefinitions.hpp"
#include "oops/annotations.hpp"
#include "oops/constantPool.hpp"
#include "oops/methodFlags.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/methodFlags.hpp"
#include "oops/oop.hpp"
#include "utilities/accessFlags.hpp"
#include "utilities/align.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/methodCounters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerOracle.hpp"
#include "memory/metaspaceClosure.hpp"
#include "memory/resourceArea.hpp"
#include "oops/method.hpp"
#include "oops/methodCounters.hpp"
#include "oops/trainingData.hpp"
#include "runtime/handles.inline.hpp"
#include "memory/resourceArea.hpp"

MethodCounters::MethodCounters(const methodHandle& mh) :
_method(mh()),
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/methodCounters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
#ifndef SHARE_OOPS_METHODCOUNTERS_HPP
#define SHARE_OOPS_METHODCOUNTERS_HPP

#include "oops/metadata.hpp"
#include "compiler/compilerDefinitions.hpp"
#include "interpreter/invocationCounter.hpp"
#include "oops/metadata.hpp"
#include "utilities/align.hpp"

class MethodTrainingData;
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/oops/objArrayOop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "oops/arrayOop.hpp"
#include "utilities/align.hpp"

#include <type_traits>

class Klass;
Expand Down
3 changes: 2 additions & 1 deletion src/hotspot/share/oops/oop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@

#include "memory/iterator.hpp"
#include "memory/memRegion.hpp"
#include "oops/compressedKlass.hpp"
#include "oops/accessDecorators.hpp"
#include "oops/compressedKlass.hpp"
#include "oops/markWord.hpp"
#include "oops/metadata.hpp"
#include "oops/objLayout.hpp"
#include "runtime/atomic.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"

#include <type_traits>

// oopDesc is the top baseclass for objects classes. The {name}Desc classes describe
Expand Down
6 changes: 3 additions & 3 deletions src/hotspot/share/oops/oop.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@

#include "oops/oop.hpp"

#include "memory/universe.hpp"
#include "memory/iterator.inline.hpp"
#include "memory/universe.hpp"
#include "oops/access.inline.hpp"
#include "oops/arrayKlass.hpp"
#include "oops/arrayOop.hpp"
#include "oops/compressedKlass.inline.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/objLayout.inline.hpp"
#include "oops/markWord.inline.hpp"
#include "oops/objLayout.inline.hpp"
#include "oops/oopsHierarchy.hpp"
#include "runtime/atomic.hpp"
#include "runtime/globals.hpp"
#include "utilities/align.hpp"
#include "utilities/debug.hpp"
#include "utilities/macros.hpp"
#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"

// Implementation of all inlined member functions defined in oop.hpp
// We need a separate file to avoid circular references
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/oopCast.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#ifndef SHARE_OOPS_OOPCAST_INLINE_HPP
#define SHARE_OOPS_OOPCAST_INLINE_HPP

#include "oops/oopsHierarchy.hpp"
#include "oops/oop.inline.hpp"
#include "oops/oopsHierarchy.hpp"

template<typename T>
static bool is_oop_type(oop theOop) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/oopHandle.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

#include "oops/oopHandle.hpp"

#include "oops/access.inline.hpp"
#include "gc/shared/oopStorage.inline.hpp"
#include "oops/access.inline.hpp"

inline oop OopHandle::resolve() const {
if (_obj == nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/stackChunkOop.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

#include "oops/stackChunkOop.hpp"

#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/barrierSet.hpp"
#include "gc/shared/barrierSetStackChunk.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "gc/shared/gc_globals.hpp"
#include "memory/memRegion.hpp"
#include "memory/universe.hpp"
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/oops/trainingData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
*
*/

#include "ci/ciEnv.hpp"
#include "ci/ciMetadata.hpp"
#include "cds/cdsConfig.hpp"
#include "cds/metaspaceShared.hpp"
#include "ci/ciEnv.hpp"
#include "ci/ciMetadata.hpp"
#include "classfile/classLoaderData.hpp"
#include "classfile/compactHashtable.hpp"
#include "classfile/javaClasses.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/trainingData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include "cds/cdsConfig.hpp"
#include "classfile/classLoaderData.hpp"
#include "classfile/compactHashtable.hpp"
#include "compiler/compilerDefinitions.hpp"
#include "compiler/compiler_globals.hpp"
#include "compiler/compilerDefinitions.hpp"
#include "memory/allocation.hpp"
#include "memory/metaspaceClosure.hpp"
#include "oops/instanceKlass.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/oops/typeArrayOop.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "oops/arrayOop.hpp"
#include "oops/typeArrayKlass.hpp"

#include <type_traits>

// A typeArrayOop is an array containing basic types (non oop elements).
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/oops/typeArrayOop.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
#include "oops/typeArrayOop.hpp"

#include "oops/access.inline.hpp"
#include "oops/oop.inline.hpp"
#include "oops/arrayOop.hpp"
#include "oops/oop.inline.hpp"

size_t typeArrayOopDesc::object_size(const TypeArrayKlass* tk) const {
return object_size(tk->layout_helper(), length());
Expand Down
1 change: 1 addition & 0 deletions test/hotspot/jtreg/sources/TestIncludesAreSorted.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class TestIncludesAreSorted {
"share/ci",
"share/compiler",
"share/jvmci",
"share/oops",
"share/opto"
};

Expand Down