mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8141132: JEP 254: Compact Strings
Adopt a more space-efficient internal representation for strings. Co-authored-by: Brent Christian <brent.christian@oracle.com> Co-authored-by: Vivek Deshpande <vivek.r.deshpande@intel.com> Co-authored-by: Charlie Hunt <charlie.hunt@oracle.com> Co-authored-by: Vladimir Kozlov <vladimir.kozlov@oracle.com> Co-authored-by: Roger Riggs <roger.riggs@oracle.com> Co-authored-by: Xueming Shen <xueming.shen@oracle.com> Co-authored-by: Aleksey Shipilev <aleksey.shipilev@oracle.com> Co-authored-by: Sandhya Viswanathan <sandhya.viswanathan@intel.com> Reviewed-by: alanb, bdelsart, coleenp, iklam, jiangli, jrose, kevinw, naoto, pliden, roland, smarks, twisti
This commit is contained in:
parent
4e24e2cc6c
commit
7af927f9c1
74 changed files with 4838 additions and 1683 deletions
|
@ -2933,12 +2933,8 @@ const char* JavaThread::get_threadgroup_name() const {
|
|||
if (thread_obj != NULL) {
|
||||
oop thread_group = java_lang_Thread::threadGroup(thread_obj);
|
||||
if (thread_group != NULL) {
|
||||
typeArrayOop name = java_lang_ThreadGroup::name(thread_group);
|
||||
// ThreadGroup.name can be null
|
||||
if (name != NULL) {
|
||||
const char* str = UNICODE::as_utf8((jchar*) name->base(T_CHAR), name->length());
|
||||
return str;
|
||||
}
|
||||
return java_lang_ThreadGroup::name(thread_group);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
@ -2952,12 +2948,8 @@ const char* JavaThread::get_parent_name() const {
|
|||
if (thread_group != NULL) {
|
||||
oop parent = java_lang_ThreadGroup::parent(thread_group);
|
||||
if (parent != NULL) {
|
||||
typeArrayOop name = java_lang_ThreadGroup::name(parent);
|
||||
// ThreadGroup.name can be null
|
||||
if (name != NULL) {
|
||||
const char* str = UNICODE::as_utf8((jchar*) name->base(T_CHAR), name->length());
|
||||
return str;
|
||||
}
|
||||
return java_lang_ThreadGroup::name(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3304,6 +3296,9 @@ void Threads::initialize_java_lang_classes(JavaThread* main_thread, TRAPS) {
|
|||
|
||||
initialize_class(vmSymbols::java_lang_String(), CHECK);
|
||||
|
||||
// Inject CompactStrings value after the static initializers for String ran.
|
||||
java_lang_String::set_compact_strings(CompactStrings);
|
||||
|
||||
// Initialize java_lang.System (needed before creating the thread)
|
||||
initialize_class(vmSymbols::java_lang_System(), CHECK);
|
||||
// The VM creates & returns objects of this class. Make sure it's initialized.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue