--- a/hotspot/src/share/vm/oops/symbol.cpp Sat Jul 22 15:54:27 2017 -0400
+++ b/hotspot/src/share/vm/oops/symbol.cpp Wed Aug 02 18:06:38 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -26,6 +26,8 @@
#include "precompiled.hpp"
#include "classfile/altHashing.hpp"
#include "classfile/classLoaderData.hpp"
+#include "logging/log.hpp"
+#include "logging/logStream.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/symbol.hpp"
@@ -53,13 +55,6 @@
return res;
}
-void* Symbol::operator new(size_t sz, int len, ClassLoaderData* loader_data, TRAPS) throw() {
- address res;
- res = (address) Metaspace::allocate(loader_data, size(len), true,
- MetaspaceObj::SymbolType, CHECK_NULL);
- return res;
-}
-
void Symbol::operator delete(void *p) {
assert(((Symbol*)p)->refcount() == 0, "should not call this");
FreeHeap(p);
@@ -235,6 +230,15 @@
}
}
+void Symbol::metaspace_pointers_do(MetaspaceClosure* it) {
+ if (log_is_enabled(Trace, cds)) {
+ LogStream trace_stream(Log(cds)::trace());
+ trace_stream.print("Iter(Symbol): %p ", this);
+ print_value_on(&trace_stream);
+ trace_stream.cr();
+ }
+}
+
void Symbol::print_on(outputStream* st) const {
if (this == NULL) {
st->print_cr("NULL");