8223626: move print() functions to cpp files
Summary: improve debugging experience
Reviewed-by: dholmes, dlong
--- a/src/hotspot/share/classfile/classLoaderData.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/classLoaderData.cpp Fri May 10 09:05:29 2019 -0400
@@ -915,6 +915,8 @@
}
}
+void ClassLoaderData::print_value() const { print_value_on(tty); }
+
#ifndef PRODUCT
void ClassLoaderData::print_on(outputStream* out) const {
out->print("ClassLoaderData CLD: " PTR_FORMAT ", loader: " PTR_FORMAT ", loader_klass: %s {",
@@ -933,6 +935,8 @@
}
#endif // PRODUCT
+void ClassLoaderData::print() const { print_on(tty); }
+
void ClassLoaderData::verify() {
assert_locked_or_safepoint(_metaspace_lock);
oop cl = class_loader();
--- a/src/hotspot/share/classfile/classLoaderData.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/classLoaderData.hpp Fri May 10 09:05:29 2019 -0400
@@ -282,9 +282,9 @@
JNIMethodBlock* jmethod_ids() const { return _jmethod_ids; }
void set_jmethod_ids(JNIMethodBlock* new_block) { _jmethod_ids = new_block; }
- void print() { print_on(tty); }
+ void print() const;
void print_on(outputStream* out) const PRODUCT_RETURN;
- void print_value() { print_value_on(tty); }
+ void print_value() const;
void print_value_on(outputStream* out) const;
void verify();
--- a/src/hotspot/share/classfile/classLoaderDataGraph.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/classLoaderDataGraph.cpp Fri May 10 09:05:29 2019 -0400
@@ -707,3 +707,5 @@
}
}
#endif // PRODUCT
+
+void ClassLoaderDataGraph::print() { print_on(tty); }
--- a/src/hotspot/share/classfile/classLoaderDataGraph.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/classLoaderDataGraph.hpp Fri May 10 09:05:29 2019 -0400
@@ -134,7 +134,7 @@
static void set_metaspace_oom(bool value) { _metaspace_oom = value; }
static void print_on(outputStream * const out) PRODUCT_RETURN;
- static void print() { print_on(tty); }
+ static void print();
static void verify();
// instance and array class counters
--- a/src/hotspot/share/classfile/systemDictionary.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/systemDictionary.cpp Fri May 10 09:05:29 2019 -0400
@@ -2825,6 +2825,8 @@
st->cr();
}
+void SystemDictionary::print() { print_on(tty); }
+
void SystemDictionary::verify() {
guarantee(constraints() != NULL,
"Verify of loader constraints failed");
--- a/src/hotspot/share/classfile/systemDictionary.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/systemDictionary.hpp Fri May 10 09:05:29 2019 -0400
@@ -355,7 +355,7 @@
public:
// Printing
- static void print() { return print_on(tty); }
+ static void print();
static void print_on(outputStream* st);
static void dump(outputStream* st, bool verbose);
--- a/src/hotspot/share/classfile/systemDictionaryShared.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/systemDictionaryShared.cpp Fri May 10 09:05:29 2019 -0400
@@ -1269,6 +1269,8 @@
}
}
+void SystemDictionaryShared::print() { print_on(tty); }
+
void SystemDictionaryShared::print_table_statistics(outputStream* st) {
if (UseSharedSpaces) {
_builtin_dictionary.print_table_statistics(st, "Builtin Shared Dictionary");
--- a/src/hotspot/share/classfile/systemDictionaryShared.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/classfile/systemDictionaryShared.hpp Fri May 10 09:05:29 2019 -0400
@@ -295,7 +295,7 @@
static void dumptime_classes_do(class MetaspaceClosure* it);
static void write_to_archive();
static void serialize_dictionary_headers(class SerializeClosure* soc);
- static void print() { return print_on(tty); }
+ static void print();
static void print_on(outputStream* st) NOT_CDS_RETURN;
static void print_table_statistics(outputStream* st) NOT_CDS_RETURN;
--- a/src/hotspot/share/code/codeBlob.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/code/codeBlob.cpp Fri May 10 09:05:29 2019 -0400
@@ -558,6 +558,8 @@
st->print_cr("Framesize: %d", _frame_size);
}
+void CodeBlob::print() const { print_on(tty); }
+
void CodeBlob::print_value_on(outputStream* st) const {
st->print_cr("[CodeBlob]");
}
--- a/src/hotspot/share/code/codeBlob.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/code/codeBlob.hpp Fri May 10 09:05:29 2019 -0400
@@ -224,7 +224,7 @@
// Debugging
virtual void verify() = 0;
- virtual void print() const { print_on(tty); };
+ virtual void print() const;
virtual void print_on(outputStream* st) const;
virtual void print_value_on(outputStream* st) const;
void dump_for_addr(address addr, outputStream* st, bool verbose) const;
@@ -374,7 +374,6 @@
virtual void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { ShouldNotReachHere(); }
// Debugging
- void print() const { print_on(tty); }
virtual void print_on(outputStream* st) const { CodeBlob::print_on(st); }
virtual void print_value_on(outputStream* st) const { CodeBlob::print_value_on(st); }
--- a/src/hotspot/share/code/vmreg.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/code/vmreg.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, 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
@@ -48,3 +48,5 @@
st->print("BAD!");
}
}
+
+void VMRegImpl::print() const { print_on(tty); }
--- a/src/hotspot/share/code/vmreg.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/code/vmreg.hpp Fri May 10 09:05:29 2019 -0400
@@ -112,7 +112,7 @@
intptr_t value() const {return (intptr_t) this; }
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
// bias a stack slot.
// Typically used to adjust a virtual frame slots by amounts that are offset by
--- a/src/hotspot/share/code/vtableStubs.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/code/vtableStubs.cpp Fri May 10 09:05:29 2019 -0400
@@ -84,6 +84,7 @@
index(), p2i(receiver_location()), p2i(code_begin()), p2i(code_end()));
}
+void VtableStub::print() const { print_on(tty); }
// -----------------------------------------------------------------------------------------
// Implementation of VtableStubs
--- a/src/hotspot/share/code/vtableStubs.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/code/vtableStubs.hpp Fri May 10 09:05:29 2019 -0400
@@ -177,7 +177,7 @@
bool is_null_pointer_exception(address epc) { return epc == code_begin()+_npe_offset; }
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
};
--- a/src/hotspot/share/compiler/oopMap.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/compiler/oopMap.cpp Fri May 10 09:05:29 2019 -0400
@@ -510,6 +510,8 @@
st->print(" ");
}
+void OopMapValue::print() const { print_on(tty); }
+
void ImmutableOopMap::print_on(outputStream* st) const {
OopMapValue omv;
st->print("ImmutableOopMap{");
@@ -520,6 +522,8 @@
st->print("}");
}
+void ImmutableOopMap::print() const { print_on(tty); }
+
void OopMap::print_on(outputStream* st) const {
OopMapValue omv;
st->print("OopMap{");
@@ -530,6 +534,8 @@
st->print("off=%d}", (int) offset());
}
+void OopMap::print() const { print_on(tty); }
+
void ImmutableOopMapSet::print_on(outputStream* st) const {
const ImmutableOopMap* last = NULL;
for (int i = 0; i < _count; ++i) {
@@ -545,6 +551,8 @@
}
}
+void ImmutableOopMapSet::print() const { print_on(tty); }
+
void OopMapSet::print_on(outputStream* st) const {
int i, len = om_count();
@@ -558,6 +566,8 @@
}
}
+void OopMapSet::print() const { print_on(tty); }
+
bool OopMap::equals(const OopMap* other) const {
if (other->_omv_count != _omv_count) {
return false;
--- a/src/hotspot/share/compiler/oopMap.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/compiler/oopMap.hpp Fri May 10 09:05:29 2019 -0400
@@ -133,7 +133,7 @@
}
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
};
@@ -194,7 +194,7 @@
// Printing
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
bool equals(const OopMap* other) const;
};
@@ -253,7 +253,7 @@
// Printing
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
};
class ImmutableOopMapBuilder;
@@ -279,7 +279,7 @@
// Printing
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
};
class ImmutableOopMapSet;
@@ -330,7 +330,7 @@
int nr_of_bytes() const { return _size; }
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
};
class OopMapStream : public StackObj {
--- a/src/hotspot/share/gc/shared/collectedHeap.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp Fri May 10 09:05:29 2019 -0400
@@ -136,6 +136,8 @@
}
}
+void CollectedHeap::print() const { print_on(tty); }
+
void CollectedHeap::print_on_error(outputStream* st) const {
st->print_cr("Heap:");
print_extended_on(st);
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp Fri May 10 09:05:29 2019 -0400
@@ -449,9 +449,8 @@
// Print heap information on the given outputStream.
virtual void print_on(outputStream* st) const = 0;
// The default behavior is to call print_on() on tty.
- virtual void print() const {
- print_on(tty);
- }
+ virtual void print() const;
+
// Print more detailed heap information on the given
// outputStream. The default behavior is to call print_on(). It is
// up to each subclass to override it and add any additional output
--- a/src/hotspot/share/gc/shared/workgroup.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/gc/shared/workgroup.cpp Fri May 10 09:05:29 2019 -0400
@@ -318,6 +318,8 @@
st->cr();
}
+void AbstractGangWorker::print() const { print_on(tty); }
+
WorkData GangWorker::wait_for_task() {
return gang()->dispatcher()->worker_wait_for_task();
}
--- a/src/hotspot/share/gc/shared/workgroup.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/gc/shared/workgroup.hpp Fri May 10 09:05:29 2019 -0400
@@ -239,7 +239,7 @@
virtual bool is_ConcurrentGC_thread() const;
// Printing
void print_on(outputStream* st) const;
- virtual void print() const { print_on(tty); }
+ virtual void print() const;
protected:
AbstractWorkGang* _gang;
--- a/src/hotspot/share/interpreter/interpreter.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/interpreter/interpreter.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -81,6 +81,8 @@
}
}
+void InterpreterCodelet::print() const { print_on(tty); }
+
CodeletMark::CodeletMark(InterpreterMacroAssembler*& masm,
const char* description,
Bytecodes::Code bytecode) :
--- a/src/hotspot/share/interpreter/interpreter.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/interpreter/interpreter.hpp Fri May 10 09:05:29 2019 -0400
@@ -69,7 +69,7 @@
// Debugging
void verify();
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
// Interpreter-specific initialization
void initialize(const char* description, Bytecodes::Code bytecode);
--- a/src/hotspot/share/oops/metadata.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/oops/metadata.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, 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
@@ -41,6 +41,9 @@
st->cr();
}
+void Metadata::print() const { print_on(tty); }
+void Metadata::print_value() const { print_value_on(tty); }
+
char* Metadata::print_value_string() const {
char buf[256];
stringStream st(buf, sizeof(buf));
--- a/src/hotspot/share/oops/metadata.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/oops/metadata.hpp Fri May 10 09:05:29 2019 -0400
@@ -50,8 +50,8 @@
virtual const char* internal_name() const = 0;
virtual void metaspace_pointers_do(MetaspaceClosure* iter) {}
- void print() const { print_on(tty); }
- void print_value() const { print_value_on(tty); }
+ void print() const;
+ void print_value() const;
static void print_value_on_maybe_null(outputStream* st, const Metadata* m) {
if (NULL == m)
--- a/src/hotspot/share/oops/symbol.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/oops/symbol.cpp Fri May 10 09:05:29 2019 -0400
@@ -366,6 +366,8 @@
st->print(" count %d", refcount());
}
+void Symbol::print() const { print_on(tty); }
+
// The print_value functions are present in all builds, to support the
// disassembler and error reporting.
void Symbol::print_value_on(outputStream* st) const {
@@ -376,6 +378,8 @@
st->print("'");
}
+void Symbol::print_value() const { print_value_on(tty); }
+
bool Symbol::is_valid(Symbol* s) {
if (!is_aligned(s, sizeof(MetaWord))) return false;
if ((size_t)s < os::min_page_size()) return false;
--- a/src/hotspot/share/oops/symbol.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/oops/symbol.hpp Fri May 10 09:05:29 2019 -0400
@@ -248,8 +248,8 @@
void print_value_on(outputStream* st) const; // Second level print.
// printing on default output stream
- void print() { print_on(tty); }
- void print_value() { print_value_on(tty); }
+ void print() const;
+ void print_value() const;
static bool is_valid(Symbol* s);
--- a/src/hotspot/share/runtime/biasedLocking.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/biasedLocking.cpp Fri May 10 09:05:29 2019 -0400
@@ -865,7 +865,7 @@
// BiasedLockingCounters
-int BiasedLockingCounters::slow_path_entry_count() {
+int BiasedLockingCounters::slow_path_entry_count() const {
if (_slow_path_entry_count != 0) {
return _slow_path_entry_count;
}
@@ -876,7 +876,7 @@
return _total_entry_count - sum;
}
-void BiasedLockingCounters::print_on(outputStream* st) {
+void BiasedLockingCounters::print_on(outputStream* st) const {
tty->print_cr("# total entries: %d", _total_entry_count);
tty->print_cr("# biased lock entries: %d", _biased_lock_entry_count);
tty->print_cr("# anonymously biased lock entries: %d", _anonymously_biased_lock_entry_count);
@@ -885,3 +885,5 @@
tty->print_cr("# fast path lock entries: %d", _fast_path_entry_count);
tty->print_cr("# slow path lock entries: %d", slow_path_entry_count());
}
+
+void BiasedLockingCounters::print() const { print_on(tty); }
--- a/src/hotspot/share/runtime/biasedLocking.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/biasedLocking.hpp Fri May 10 09:05:29 2019 -0400
@@ -128,7 +128,7 @@
_fast_path_entry_count(0),
_slow_path_entry_count(0) {}
- int slow_path_entry_count(); // Compute this field if necessary
+ int slow_path_entry_count() const; // Compute this field if necessary
int* total_entry_count_addr() { return &_total_entry_count; }
int* biased_lock_entry_count_addr() { return &_biased_lock_entry_count; }
@@ -140,8 +140,8 @@
bool nonzero() { return _total_entry_count > 0; }
- void print_on(outputStream* st);
- void print() { print_on(tty); }
+ void print_on(outputStream* st) const;
+ void print() const;
};
--- a/src/hotspot/share/runtime/fieldDescriptor.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/fieldDescriptor.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -145,6 +145,8 @@
}
}
+void fieldDescriptor::print() const { print_on(tty); }
+
void fieldDescriptor::print_on_for(outputStream* st, oop obj) {
print_on(st);
BasicType ft = field_type();
--- a/src/hotspot/share/runtime/fieldDescriptor.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/fieldDescriptor.hpp Fri May 10 09:05:29 2019 -0400
@@ -111,7 +111,7 @@
void reinitialize(InstanceKlass* ik, int index);
// Print
- void print() { print_on(tty); }
+ void print() const;
void print_on(outputStream* st) const PRODUCT_RETURN;
void print_on_for(outputStream* st, oop obj) PRODUCT_RETURN;
void verify() const PRODUCT_RETURN;
--- a/src/hotspot/share/runtime/jniHandles.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/jniHandles.cpp Fri May 10 09:05:29 2019 -0400
@@ -310,6 +310,8 @@
st->flush();
}
+void JNIHandles::print() { print_on(tty); }
+
class VerifyJNIHandles: public OopClosure {
public:
virtual void do_oop(oop* root) {
--- a/src/hotspot/share/runtime/jniHandles.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/jniHandles.hpp Fri May 10 09:05:29 2019 -0400
@@ -97,7 +97,7 @@
// Debugging
static void print_on(outputStream* st);
- static void print() { print_on(tty); }
+ static void print();
static void verify();
// The category predicates all require handle != NULL.
static bool is_local_handle(Thread* thread, jobject handle);
--- a/src/hotspot/share/runtime/objectMonitor.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/objectMonitor.cpp Fri May 10 09:05:29 2019 -0400
@@ -1934,3 +1934,4 @@
contentions(), waiters(), recursions(),
p2i(owner()));
}
+void ObjectMonitor::print() const { print_on(tty); }
--- a/src/hotspot/share/runtime/objectMonitor.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/objectMonitor.hpp Fri May 10 09:05:29 2019 -0400
@@ -292,7 +292,7 @@
void notify(TRAPS);
void notifyAll(TRAPS);
- void print() const { print_on(tty); }
+ void print() const;
void print_on(outputStream* st) const;
// Use the following at your own risk
--- a/src/hotspot/share/runtime/osThread.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/osThread.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -53,3 +53,5 @@
default: st->print("unknown state %d", _state); break;
}
}
+
+void OSThread::print() const { print_on(tty); }
--- a/src/hotspot/share/runtime/osThread.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/osThread.hpp Fri May 10 09:05:29 2019 -0400
@@ -88,7 +88,7 @@
// Printing
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
// For java intrinsics:
static ByteSize interrupted_offset() { return byte_offset_of(OSThread, _interrupted); }
--- a/src/hotspot/share/runtime/rtmLocking.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/rtmLocking.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, 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
@@ -56,12 +56,13 @@
}
//------------------------------print_on-------------------------------
-void RTMLockingCounters::print_on(outputStream* st) {
+void RTMLockingCounters::print_on(outputStream* st) const {
tty->print_cr("# rtm locks total (estimated): " UINTX_FORMAT, _total_count * RTMTotalCountIncrRate);
tty->print_cr("# rtm lock aborts : " UINTX_FORMAT, _abort_count);
for (int i = 0; i < ABORT_STATUS_LIMIT; i++) {
tty->print_cr("# rtm lock aborts %d: " UINTX_FORMAT, i, _abortX_count[i]);
}
}
+void RTMLockingCounters::print() const { print_on(tty); }
#endif
--- a/src/hotspot/share/runtime/rtmLocking.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/rtmLocking.hpp Fri May 10 09:05:29 2019 -0400
@@ -106,8 +106,8 @@
bool nonzero() { return (_abort_count + _total_count) > 0; }
- void print_on(outputStream* st);
- void print() { print_on(tty); }
+ void print_on(outputStream* st) const;
+ void print() const;
};
#endif // SHARE_RUNTIME_RTMLOCKING_HPP
--- a/src/hotspot/share/runtime/safepoint.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/safepoint.cpp Fri May 10 09:05:29 2019 -0400
@@ -1037,6 +1037,8 @@
_thread->print_thread_state_on(st);
}
+void ThreadSafepointState::print() const { print_on(tty); }
+
// ---------------------------------------------------------------------------------------------------------------------
// Block the thread at poll or poll return for safepoint/handshake.
--- a/src/hotspot/share/runtime/safepoint.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/safepoint.hpp Fri May 10 09:05:29 2019 -0400
@@ -226,7 +226,7 @@
// debugging
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
// Initialize
static void create(JavaThread *thread);
--- a/src/hotspot/share/runtime/stubCodeGenerator.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/stubCodeGenerator.cpp Fri May 10 09:05:29 2019 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -63,6 +63,8 @@
st->print(" [" INTPTR_FORMAT ", " INTPTR_FORMAT "[ (%d bytes)", p2i(begin()), p2i(end()), size_in_bytes());
}
+void StubCodeDesc::print() const { print_on(tty); }
+
// Implementation of StubCodeGenerator
StubCodeGenerator::StubCodeGenerator(CodeBuffer* code, bool print_code) {
--- a/src/hotspot/share/runtime/stubCodeGenerator.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/stubCodeGenerator.hpp Fri May 10 09:05:29 2019 -0400
@@ -88,7 +88,7 @@
int size_in_bytes() const { return _end - _begin; }
bool contains(address pc) const { return _begin <= pc && pc < _end; }
void print_on(outputStream* st) const;
- void print() const { print_on(tty); }
+ void print() const;
};
// The base class for all stub-generating code generators.
--- a/src/hotspot/share/runtime/thread.cpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/thread.cpp Fri May 10 09:05:29 2019 -0400
@@ -953,6 +953,8 @@
debug_only(if (WizardMode) print_owned_locks_on(st);)
}
+void Thread::print() const { print_on(tty); }
+
// Thread::print_on_error() is called by fatal error handler. Don't use
// any lock or allocate memory.
void Thread::print_on_error(outputStream* st, char* buf, int buflen) const {
@@ -3026,6 +3028,8 @@
}
}
+void JavaThread::print() const { print_on(tty); }
+
void JavaThread::print_name_on_error(outputStream* st, char *buf, int buflen) const {
st->print("%s", get_thread_name_string(buf, buflen));
}
--- a/src/hotspot/share/runtime/thread.hpp Thu May 09 14:28:30 2019 +0200
+++ b/src/hotspot/share/runtime/thread.hpp Fri May 10 09:05:29 2019 -0400
@@ -732,7 +732,7 @@
// Printing
void print_on(outputStream* st, bool print_extended_info) const;
virtual void print_on(outputStream* st) const { print_on(st, false); }
- void print() const { print_on(tty); }
+ void print() const;
virtual void print_on_error(outputStream* st, char* buf, int buflen) const;
void print_value_on(outputStream* st) const;
@@ -1874,6 +1874,7 @@
char* name() const { return (char*)get_thread_name(); }
void print_on(outputStream* st, bool print_extended_info) const;
void print_on(outputStream* st) const { print_on(st, false); }
+ void print() const;
void print_value();
void print_thread_state_on(outputStream*) const PRODUCT_RETURN;
void print_thread_state() const PRODUCT_RETURN;