Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/javaClasses.cpp @ 6972:bd7a7ce2e264
6830717: replay of compilations would help with debugging
Summary: When java process crashed in compiler thread, repeat the compilation process will help finding root cause. This is done with using SA dump application class data and replay data from core dump, then use debug version of jvm to recompile the problematic java method.
Reviewed-by: kvn, twisti, sspitsyn
Contributed-by: yumin.qi@oracle.com
author | minqi |
---|---|
date | Mon, 12 Nov 2012 14:03:53 -0800 |
parents | 18fb7da42534 |
children | 80e866b1d053 |
comparison
equal
deleted
inserted
replaced
6965:3be318ecfae5 | 6972:bd7a7ce2e264 |
---|---|
344 if (length == 0) return 0; | 344 if (length == 0) return 0; |
345 | 345 |
346 typeArrayOop value = java_lang_String::value(java_string); | 346 typeArrayOop value = java_lang_String::value(java_string); |
347 int offset = java_lang_String::offset(java_string); | 347 int offset = java_lang_String::offset(java_string); |
348 return java_lang_String::to_hash(value->char_at_addr(offset), length); | 348 return java_lang_String::to_hash(value->char_at_addr(offset), length); |
349 } | |
350 | |
351 char* java_lang_String::as_quoted_ascii(oop java_string) { | |
352 typeArrayOop value = java_lang_String::value(java_string); | |
353 int offset = java_lang_String::offset(java_string); | |
354 int length = java_lang_String::length(java_string); | |
355 | |
356 jchar* base = (length == 0) ? NULL : value->char_at_addr(offset); | |
357 if (base == NULL) return NULL; | |
358 | |
359 int result_length = UNICODE::quoted_ascii_length(base, length) + 1; | |
360 char* result = NEW_RESOURCE_ARRAY(char, result_length); | |
361 UNICODE::as_quoted_ascii(base, length, result, result_length); | |
362 assert(result_length >= length + 1, "must not be shorter"); | |
363 assert(result_length == (int)strlen(result) + 1, "must match"); | |
364 return result; | |
349 } | 365 } |
350 | 366 |
351 unsigned int java_lang_String::hash_string(oop java_string) { | 367 unsigned int java_lang_String::hash_string(oop java_string) { |
352 int length = java_lang_String::length(java_string); | 368 int length = java_lang_String::length(java_string); |
353 // Zero length string doesn't hash necessarily hash to zero. | 369 // Zero length string doesn't hash necessarily hash to zero. |