Mercurial > hg > graal-compiler
comparison src/share/vm/code/codeCache.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 | 167b70ff3abc |
children | 1d7922586cf6 |
comparison
equal
deleted
inserted
replaced
6174:74533f63b116 | 6197:d2a62e0f25eb |
---|---|
854 } | 854 } |
855 } | 855 } |
856 | 856 |
857 int bucketSize = 512; | 857 int bucketSize = 512; |
858 int bucketLimit = maxCodeSize / bucketSize + 1; | 858 int bucketLimit = maxCodeSize / bucketSize + 1; |
859 int *buckets = NEW_C_HEAP_ARRAY(int, bucketLimit); | 859 int *buckets = NEW_C_HEAP_ARRAY(int, bucketLimit, mtCode); |
860 memset(buckets,0,sizeof(int) * bucketLimit); | 860 memset(buckets,0,sizeof(int) * bucketLimit); |
861 | 861 |
862 for (cb = first(); cb != NULL; cb = next(cb)) { | 862 for (cb = first(); cb != NULL; cb = next(cb)) { |
863 if (cb->is_nmethod()) { | 863 if (cb->is_nmethod()) { |
864 nmethod* nm = (nmethod*)cb; | 864 nmethod* nm = (nmethod*)cb; |
891 tty->fill_to(40); | 891 tty->fill_to(40); |
892 tty->print_cr("%d",buckets[i]); | 892 tty->print_cr("%d",buckets[i]); |
893 } | 893 } |
894 } | 894 } |
895 | 895 |
896 FREE_C_HEAP_ARRAY(int, buckets); | 896 FREE_C_HEAP_ARRAY(int, buckets, mtCode); |
897 } | 897 } |
898 | 898 |
899 void CodeCache::print() { | 899 void CodeCache::print() { |
900 CodeBlob_sizes live; | 900 CodeBlob_sizes live; |
901 CodeBlob_sizes dead; | 901 CodeBlob_sizes dead; |