< prev index next >
src/share/vm/services/memTracker.cpp
Print this page
*** 45,57 ****
NMT_TrackingLevel MemTracker::init_tracking_level() {
NMT_TrackingLevel level = NMT_off;
char buf[64];
- char nmt_option[64];
jio_snprintf(buf, sizeof(buf), "NMT_LEVEL_%d", os::current_process_id());
! if (os::getenv(buf, nmt_option, sizeof(nmt_option))) {
if (strcmp(nmt_option, "summary") == 0) {
level = NMT_summary;
} else if (strcmp(nmt_option, "detail") == 0) {
level = NMT_detail;
} else if (strcmp(nmt_option, "off") != 0) {
--- 45,57 ----
NMT_TrackingLevel MemTracker::init_tracking_level() {
NMT_TrackingLevel level = NMT_off;
char buf[64];
jio_snprintf(buf, sizeof(buf), "NMT_LEVEL_%d", os::current_process_id());
! const char *nmt_option = ::getenv(buf);
! if (nmt_option != NULL) {
if (strcmp(nmt_option, "summary") == 0) {
level = NMT_summary;
} else if (strcmp(nmt_option, "detail") == 0) {
level = NMT_detail;
} else if (strcmp(nmt_option, "off") != 0) {
*** 309,314 ****
out->print_cr(" Tracking stack depth: %d", NMT_TrackingStackDepth);
NOT_PRODUCT(out->print_cr("Peak concurrent access: %d", MallocSiteTable::access_peak_count());)
out->print_cr(" ");
walker.report_statistics(out);
}
-
--- 309,313 ----
< prev index next >