949 } |
949 } |
950 |
950 |
951 int compiler_count = c1_compiler_count + c2_compiler_count; |
951 int compiler_count = c1_compiler_count + c2_compiler_count; |
952 |
952 |
953 _method_threads = |
953 _method_threads = |
954 new (ResourceObj::C_HEAP) GrowableArray<CompilerThread*>(compiler_count, true); |
954 new (ResourceObj::C_HEAP, mtCompiler) GrowableArray<CompilerThread*>(compiler_count, true); |
955 |
955 |
956 char name_buffer[256]; |
956 char name_buffer[256]; |
957 for (int i = 0; i < c2_compiler_count; i++) { |
957 for (int i = 0; i < c2_compiler_count; i++) { |
958 // Create a name for our thread. |
958 // Create a name for our thread. |
959 sprintf(name_buffer, "C2 CompilerThread%d", i); |
959 sprintf(name_buffer, "C2 CompilerThread%d", i); |
1625 "%s%shs_c" UINTX_FORMAT "_pid%u.log", dir, |
1625 "%s%shs_c" UINTX_FORMAT "_pid%u.log", dir, |
1626 os::file_separator(), thread_id, os::current_process_id()); |
1626 os::file_separator(), thread_id, os::current_process_id()); |
1627 } |
1627 } |
1628 fp = fopen(fileBuf, "at"); |
1628 fp = fopen(fileBuf, "at"); |
1629 if (fp != NULL) { |
1629 if (fp != NULL) { |
1630 file = NEW_C_HEAP_ARRAY(char, strlen(fileBuf)+1); |
1630 file = NEW_C_HEAP_ARRAY(char, strlen(fileBuf)+1, mtCompiler); |
1631 strcpy(file, fileBuf); |
1631 strcpy(file, fileBuf); |
1632 break; |
1632 break; |
1633 } |
1633 } |
1634 } |
1634 } |
1635 if (fp == NULL) { |
1635 if (fp == NULL) { |
1636 warning("Cannot open log file: %s", fileBuf); |
1636 warning("Cannot open log file: %s", fileBuf); |
1637 } else { |
1637 } else { |
1638 if (LogCompilation && Verbose) |
1638 if (LogCompilation && Verbose) |
1639 tty->print_cr("Opening compilation log %s", file); |
1639 tty->print_cr("Opening compilation log %s", file); |
1640 CompileLog* log = new(ResourceObj::C_HEAP) CompileLog(file, fp, thread_id); |
1640 CompileLog* log = new(ResourceObj::C_HEAP, mtCompiler) CompileLog(file, fp, thread_id); |
1641 thread->init_log(log); |
1641 thread->init_log(log); |
1642 |
1642 |
1643 if (xtty != NULL) { |
1643 if (xtty != NULL) { |
1644 ttyLocker ttyl; |
1644 ttyLocker ttyl; |
1645 |
1645 |