Mercurial > hg > graal-compiler
comparison src/share/vm/services/memPtr.cpp @ 7971:4102b59539ce
8005012: Add WB APIs to better support NMT testing
Summary: Add WB API functions to enable better NMT testing
Reviewed-by: dholmes, zgu
author | ctornqvi |
---|---|
date | Fri, 01 Feb 2013 23:48:08 +0100 |
parents | 716c64bda5ba |
children | baa7927dfbd2 |
comparison
equal
deleted
inserted
replaced
7962:4c75576d18d0 | 7971:4102b59539ce |
---|---|
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "services/memPtr.hpp" | 26 #include "services/memPtr.hpp" |
27 #include "services/memTracker.hpp" | 27 #include "services/memTracker.hpp" |
28 | 28 |
29 volatile jint SequenceGenerator::_seq_number = 1; | 29 volatile jint SequenceGenerator::_seq_number = 1; |
30 volatile unsigned long SequenceGenerator::_generation = 1; | |
30 NOT_PRODUCT(jint SequenceGenerator::_max_seq_number = 1;) | 31 NOT_PRODUCT(jint SequenceGenerator::_max_seq_number = 1;) |
31 DEBUG_ONLY(volatile unsigned long SequenceGenerator::_generation = 0;) | |
32 | 32 |
33 jint SequenceGenerator::next() { | 33 jint SequenceGenerator::next() { |
34 jint seq = Atomic::add(1, &_seq_number); | 34 jint seq = Atomic::add(1, &_seq_number); |
35 if (seq < 0) { | 35 if (seq < 0) { |
36 MemTracker::shutdown(MemTracker::NMT_sequence_overflow); | 36 MemTracker::shutdown(MemTracker::NMT_sequence_overflow); |