8209347: SATBMarkQueue.cpp should not need jvm.h
Summary: Use os::snprintf instead of jio_snprintf.
Reviewed-by: shade, tschatzl
--- a/src/hotspot/share/gc/g1/satbMarkQueue.cpp Tue Aug 14 11:56:32 2018 -0700
+++ b/src/hotspot/share/gc/g1/satbMarkQueue.cpp Tue Aug 14 14:58:14 2018 -0400
@@ -23,13 +23,13 @@
*/
#include "precompiled.hpp"
-#include "jvm.h"
#include "gc/g1/satbMarkQueue.hpp"
#include "gc/shared/collectedHeap.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/mutexLocker.hpp"
+#include "runtime/os.hpp"
#include "runtime/safepoint.hpp"
#include "runtime/thread.hpp"
#include "runtime/threadSMR.hpp"
@@ -218,14 +218,14 @@
int i = 0;
while (nd != NULL) {
void** buf = BufferNode::make_buffer_from_node(nd);
- jio_snprintf(buffer, SATB_PRINTER_BUFFER_SIZE, "Enqueued: %d", i);
+ os::snprintf(buffer, SATB_PRINTER_BUFFER_SIZE, "Enqueued: %d", i);
print_satb_buffer(buffer, buf, nd->index(), buffer_size());
nd = nd->next();
i += 1;
}
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) {
- jio_snprintf(buffer, SATB_PRINTER_BUFFER_SIZE, "Thread: %s", t->name());
+ os::snprintf(buffer, SATB_PRINTER_BUFFER_SIZE, "Thread: %s", t->name());
satb_queue_for_thread(t).print(buffer);
}