comparison src/share/vm/compiler/compileBroker.cpp @ 6197:d2a62e0f25eb

6995781: Native Memory Tracking (Phase 1) 7151532: DCmd for hotspot native memory tracking Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
author zgu
date Thu, 28 Jun 2012 17:03:16 -0400
parents 09d00c18e323
children 1d7922586cf6
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
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