< prev index next >
src/hotspot/share/runtime/threadHeapSampler.hpp
Print this page
rev 49264 : [mq]: event-only
rev 49267 : [mq]: event5
rev 49268 : [mq]: event6
*** 32,47 ****
size_t _bytes_until_sample;
Thread* _thread;
// Cheap random number generator
static uint64_t _rnd;
! void pick_next_sample(size_t diff = 0);
static int _enabled;
static int _sampling_rate;
- static void enable() { OrderAccess::release_store(&_enabled, 1); }
- static void disable() { OrderAccess::release_store(&_enabled, 0); }
void init_log_table();
public:
ThreadHeapSampler() : _bytes_until_sample(0), _thread(NULL) {
_rnd = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(this));
--- 32,46 ----
size_t _bytes_until_sample;
Thread* _thread;
// Cheap random number generator
static uint64_t _rnd;
! void pick_next_geometric_sample();
! void pick_next_sample(size_t overflowed_bytes = 0);
static int _enabled;
static int _sampling_rate;
void init_log_table();
public:
ThreadHeapSampler() : _bytes_until_sample(0), _thread(NULL) {
_rnd = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(this));
*** 57,65 ****
--- 56,66 ----
void set_bytes_until_sample(size_t bytes) { _bytes_until_sample = bytes; }
void check_for_sampling(HeapWord* obj, size_t size_in_bytes, size_t bytes_allocated_before = 0);
static int enabled() { return OrderAccess::load_acquire(&_enabled); }
+ static void enable() { OrderAccess::release_store(&_enabled, 1); }
+ static void disable() { OrderAccess::release_store(&_enabled, 0); }
static void set_tlab_heap_sampling(int sampling_rate);
};
#endif // SHARE_RUNTIME_THREADHEAPSAMPLER_HPP
< prev index next >