Mercurial > hg > truffle
diff src/share/vm/code/codeCache.hpp @ 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 | 6c97c830fb6f |
children | da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/code/codeCache.hpp Wed Jun 27 15:23:36 2012 +0200 +++ b/src/share/vm/code/codeCache.hpp Thu Jun 28 17:03:16 2012 -0400 @@ -88,6 +88,9 @@ // Lookup that does not fail if you lookup a zombie method (if you call this, be sure to know // what you are doing) static CodeBlob* find_blob_unsafe(void* start) { + // NMT can walk the stack before code cache is created + if (_heap == NULL) return NULL; + CodeBlob* result = (CodeBlob*)_heap->find_start(start); // this assert is too strong because the heap code will return the // heapblock containing start. That block can often be larger than