Skip to content

Commit 3462f7a

Browse files
committed
8256955: Move includes of events.hpp out of header files
Reviewed-by: kbarrett, coleenp
1 parent 8b8b1f9 commit 3462f7a

File tree

7 files changed

+31
-27
lines changed

7 files changed

+31
-27
lines changed

src/hotspot/share/classfile/classLoaderDataGraph.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "utilities/growableArray.hpp"
4646
#include "utilities/macros.hpp"
4747
#include "utilities/ostream.hpp"
48+
#include "utilities/vmError.hpp"
4849

4950
volatile size_t ClassLoaderDataGraph::_num_array_classes = 0;
5051
volatile size_t ClassLoaderDataGraph::_num_instance_classes = 0;

src/hotspot/share/gc/shared/collectedHeap.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,38 @@
5252
#include "services/heapDumper.hpp"
5353
#include "utilities/align.hpp"
5454
#include "utilities/copy.hpp"
55+
#include "utilities/events.hpp"
5556

5657
class ClassLoaderData;
5758

5859
size_t CollectedHeap::_filler_array_max_size = 0;
5960

61+
class GCMessage : public FormatBuffer<1024> {
62+
public:
63+
bool is_before;
64+
};
65+
6066
template <>
6167
void EventLogBase<GCMessage>::print(outputStream* st, GCMessage& m) {
6268
st->print_cr("GC heap %s", m.is_before ? "before" : "after");
6369
st->print_raw(m);
6470
}
6571

72+
class GCHeapLog : public EventLogBase<GCMessage> {
73+
private:
74+
void log_heap(CollectedHeap* heap, bool before);
75+
76+
public:
77+
GCHeapLog() : EventLogBase<GCMessage>("GC Heap History", "gc") {}
78+
79+
void log_heap_before(CollectedHeap* heap) {
80+
log_heap(heap, true);
81+
}
82+
void log_heap_after(CollectedHeap* heap) {
83+
log_heap(heap, false);
84+
}
85+
};
86+
6687
void GCHeapLog::log_heap(CollectedHeap* heap, bool before) {
6788
if (!should_log()) {
6889
return;

src/hotspot/share/gc/shared/collectedHeap.hpp

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "runtime/safepoint.hpp"
3737
#include "services/memoryUsage.hpp"
3838
#include "utilities/debug.hpp"
39-
#include "utilities/events.hpp"
4039
#include "utilities/formatBuffer.hpp"
4140
#include "utilities/growableArray.hpp"
4241

@@ -48,6 +47,7 @@
4847
class AbstractGangTask;
4948
class AdaptiveSizePolicy;
5049
class BarrierSet;
50+
class GCHeapLog;
5151
class GCHeapSummary;
5252
class GCTimer;
5353
class GCTracer;
@@ -62,31 +62,6 @@ class VirtualSpaceSummary;
6262
class WorkGang;
6363
class nmethod;
6464

65-
class GCMessage : public FormatBuffer<1024> {
66-
public:
67-
bool is_before;
68-
69-
public:
70-
GCMessage() {}
71-
};
72-
73-
class CollectedHeap;
74-
75-
class GCHeapLog : public EventLogBase<GCMessage> {
76-
private:
77-
void log_heap(CollectedHeap* heap, bool before);
78-
79-
public:
80-
GCHeapLog() : EventLogBase<GCMessage>("GC Heap History", "gc") {}
81-
82-
void log_heap_before(CollectedHeap* heap) {
83-
log_heap(heap, true);
84-
}
85-
void log_heap_after(CollectedHeap* heap) {
86-
log_heap(heap, false);
87-
}
88-
};
89-
9065
class ParallelObjectIterator : public CHeapObj<mtGC> {
9166
public:
9267
virtual void object_iterate(ObjectClosure* cl, uint worker_id) = 0;

src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
#include "runtime/vmThread.hpp"
8686
#include "services/mallocTracker.hpp"
8787
#include "services/memTracker.hpp"
88+
#include "utilities/events.hpp"
8889
#include "utilities/powerOfTwo.hpp"
8990

9091
class ShenandoahPretouchHeapTask : public AbstractGangTask {

src/hotspot/share/jvmci/jvmci.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "memory/resourceArea.hpp"
3434
#include "memory/universe.hpp"
3535
#include "runtime/arguments.hpp"
36+
#include "utilities/events.hpp"
3637

3738
JVMCIRuntime* JVMCI::_compiler_runtime = NULL;
3839
JVMCIRuntime* JVMCI::_java_runtime = NULL;

src/hotspot/share/jvmci/jvmci.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include "compiler/compiler_globals.hpp"
2828
#include "compiler/compilerDefinitions.hpp"
29-
#include "utilities/events.hpp"
3029
#include "utilities/exceptions.hpp"
3130

3231
class BoolObjectClosure;
@@ -39,6 +38,11 @@ class MetadataHandleBlock;
3938
class OopClosure;
4039
class OopStorage;
4140

41+
template <size_t>
42+
class FormatStringEventLog;
43+
44+
typedef FormatStringEventLog<256> StringEventLog;
45+
4246
struct _jmetadata;
4347
typedef struct _jmetadata *jmetadata;
4448

src/hotspot/share/runtime/vmStructs.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
#include "utilities/globalDefinitions.hpp"
104104
#include "utilities/hashtable.hpp"
105105
#include "utilities/macros.hpp"
106+
#include "utilities/vmError.hpp"
106107

107108
#include CPU_HEADER(vmStructs)
108109
#include OS_HEADER(vmStructs)

0 commit comments

Comments
 (0)