Skip to content
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
3 changes: 2 additions & 1 deletion src/hotspot/share/classfile/javaClasses.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#ifndef SHARE_CLASSFILE_JAVACLASSES_HPP
#define SHARE_CLASSFILE_JAVACLASSES_HPP

#include "classfile/stringTable.hpp"
#include "classfile/vmClasses.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/oopsHierarchy.hpp"
Expand Down Expand Up @@ -197,7 +198,7 @@ class java_lang_String : AllStatic {
// Debugging
static void print(oop java_string, outputStream* st);
friend class JavaClasses;
friend class StringTable;
friend class hotspot_jvm::StringTable;
};


Expand Down
8 changes: 8 additions & 0 deletions src/hotspot/share/classfile/stringTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
#include "gc/g1/g1CollectedHeap.hpp"
#endif

namespace hotspot_jvm {

// We prefer short chains of avg 2
const double PREF_AVG_LIST_LEN = 2.0;
// 2^24 is max size
Expand Down Expand Up @@ -764,6 +766,8 @@ void StringTable::dump(outputStream* st, bool verbose) {
}
}

} // namespace hotspot_jvm

// Utility for dumping strings
StringtableDCmd::StringtableDCmd(outputStream* output, bool heap) :
DCmdWithParser(output, heap),
Expand All @@ -778,6 +782,8 @@ void StringtableDCmd::execute(DCmdSource source, TRAPS) {
VMThread::execute(&dumper);
}

namespace hotspot_jvm {

// Sharing
#if INCLUDE_CDS_JAVA_HEAP
size_t StringTable::shared_entry_count() {
Expand Down Expand Up @@ -935,3 +941,5 @@ void StringTable::serialize_shared_table_header(SerializeClosure* soc) {
soc->do_int(&_shared_strings_array_root_index);
}
#endif //INCLUDE_CDS_JAVA_HEAP

} // namespace hotspot_jvm
4 changes: 4 additions & 0 deletions src/hotspot/share/classfile/stringTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class DumpedInternedStrings;
class JavaThread;
class SerializeClosure;

namespace hotspot_jvm {

class StringTable;
class StringTableConfig;
class StringTableCreateEntry;
Expand Down Expand Up @@ -158,4 +160,6 @@ class StringTable : public CHeapObj<mtSymbol>{
static void verify();
};

} // namespace hotspot_jvm

#endif // SHARE_CLASSFILE_STRINGTABLE_HPP
6 changes: 6 additions & 0 deletions src/hotspot/share/precompiled/precompiled.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
// Precompiled headers are turned off if the user passes
// --disable-precompiled-headers to configure.

// The hotspot_jvm namespace using directive must be placed outside
// #ifndef DONT_USE_PRECOMPILED_HEADER. That ensures it works with and
// without precompiled headers.
namespace hotspot_jvm {}
using namespace hotspot_jvm;

#ifndef DONT_USE_PRECOMPILED_HEADER

// These header files are included in at least 130 C++ files, as of
Expand Down