comparison src/share/vm/compiler/compileBroker.cpp @ 2177:3582bf76420e

6990754: Use native memory and reference counting to implement SymbolTable Summary: move symbols from permgen into C heap and reference count them Reviewed-by: never, acorn, jmasa, stefank
author coleenp
date Thu, 27 Jan 2011 16:11:27 -0800
parents f95d63e2154a
children d25d4ca69222 986b2844f7a2 173926398291
comparison
equal deleted inserted replaced
2176:27e4ea99855d 2177:3582bf76420e
64 char*, intptr_t, char*, intptr_t, char*, intptr_t, char*, intptr_t, bool); 64 char*, intptr_t, char*, intptr_t, char*, intptr_t, char*, intptr_t, bool);
65 65
66 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(compiler, method) \ 66 #define DTRACE_METHOD_COMPILE_BEGIN_PROBE(compiler, method) \
67 { \ 67 { \
68 char* comp_name = (char*)(compiler)->name(); \ 68 char* comp_name = (char*)(compiler)->name(); \
69 symbolOop klass_name = (method)->klass_name(); \ 69 Symbol* klass_name = (method)->klass_name(); \
70 symbolOop name = (method)->name(); \ 70 Symbol* name = (method)->name(); \
71 symbolOop signature = (method)->signature(); \ 71 Symbol* signature = (method)->signature(); \
72 HS_DTRACE_PROBE8(hotspot, method__compile__begin, \ 72 HS_DTRACE_PROBE8(hotspot, method__compile__begin, \
73 comp_name, strlen(comp_name), \ 73 comp_name, strlen(comp_name), \
74 klass_name->bytes(), klass_name->utf8_length(), \ 74 klass_name->bytes(), klass_name->utf8_length(), \
75 name->bytes(), name->utf8_length(), \ 75 name->bytes(), name->utf8_length(), \
76 signature->bytes(), signature->utf8_length()); \ 76 signature->bytes(), signature->utf8_length()); \
77 } 77 }
78 78
79 #define DTRACE_METHOD_COMPILE_END_PROBE(compiler, method, success) \ 79 #define DTRACE_METHOD_COMPILE_END_PROBE(compiler, method, success) \
80 { \ 80 { \
81 char* comp_name = (char*)(compiler)->name(); \ 81 char* comp_name = (char*)(compiler)->name(); \
82 symbolOop klass_name = (method)->klass_name(); \ 82 Symbol* klass_name = (method)->klass_name(); \
83 symbolOop name = (method)->name(); \ 83 Symbol* name = (method)->name(); \
84 symbolOop signature = (method)->signature(); \ 84 Symbol* signature = (method)->signature(); \
85 HS_DTRACE_PROBE9(hotspot, method__compile__end, \ 85 HS_DTRACE_PROBE9(hotspot, method__compile__end, \
86 comp_name, strlen(comp_name), \ 86 comp_name, strlen(comp_name), \
87 klass_name->bytes(), klass_name->utf8_length(), \ 87 klass_name->bytes(), klass_name->utf8_length(), \
88 name->bytes(), name->utf8_length(), \ 88 name->bytes(), name->utf8_length(), \
89 signature->bytes(), signature->utf8_length(), (success)); \ 89 signature->bytes(), signature->utf8_length(), (success)); \
687 // CompileBroker::make_compiler_thread 687 // CompileBroker::make_compiler_thread
688 CompilerThread* CompileBroker::make_compiler_thread(const char* name, CompileQueue* queue, CompilerCounters* counters, TRAPS) { 688 CompilerThread* CompileBroker::make_compiler_thread(const char* name, CompileQueue* queue, CompilerCounters* counters, TRAPS) {
689 CompilerThread* compiler_thread = NULL; 689 CompilerThread* compiler_thread = NULL;
690 690
691 klassOop k = 691 klassOop k =
692 SystemDictionary::resolve_or_fail(vmSymbolHandles::java_lang_Thread(), 692 SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(),
693 true, CHECK_0); 693 true, CHECK_0);
694 instanceKlassHandle klass (THREAD, k); 694 instanceKlassHandle klass (THREAD, k);
695 instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_0); 695 instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_0);
696 Handle string = java_lang_String::create_from_str(name, CHECK_0); 696 Handle string = java_lang_String::create_from_str(name, CHECK_0);
697 697
698 // Initialize thread_oop to put it into the system threadGroup 698 // Initialize thread_oop to put it into the system threadGroup
699 Handle thread_group (THREAD, Universe::system_thread_group()); 699 Handle thread_group (THREAD, Universe::system_thread_group());
700 JavaValue result(T_VOID); 700 JavaValue result(T_VOID);
701 JavaCalls::call_special(&result, thread_oop, 701 JavaCalls::call_special(&result, thread_oop,
702 klass, 702 klass,
703 vmSymbolHandles::object_initializer_name(), 703 vmSymbols::object_initializer_name(),
704 vmSymbolHandles::threadgroup_string_void_signature(), 704 vmSymbols::threadgroup_string_void_signature(),
705 thread_group, 705 thread_group,
706 string, 706 string,
707 CHECK_0); 707 CHECK_0);
708 708
709 { 709 {