8238634: Reduce log verbosity of the JFR thread sampler
Reviewed-by: mgronlun
This commit is contained in:
parent
326a939e1b
commit
304d764a72
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -435,7 +435,7 @@ void JfrThreadSampler::start_thread() {
|
||||
|
||||
void JfrThreadSampler::enroll() {
|
||||
if (_disenrolled) {
|
||||
log_info(jfr)("Enrolling thread sampler");
|
||||
log_trace(jfr)("Enrolling thread sampler");
|
||||
_sample.signal();
|
||||
_disenrolled = false;
|
||||
}
|
||||
@ -445,7 +445,7 @@ void JfrThreadSampler::disenroll() {
|
||||
if (!_disenrolled) {
|
||||
_sample.wait();
|
||||
_disenrolled = true;
|
||||
log_info(jfr)("Disenrolling thread sampler");
|
||||
log_trace(jfr)("Disenrolling thread sampler");
|
||||
}
|
||||
}
|
||||
|
||||
@ -583,12 +583,12 @@ JfrThreadSampling::~JfrThreadSampling() {
|
||||
}
|
||||
|
||||
static void log(size_t interval_java, size_t interval_native) {
|
||||
log_info(jfr)("Updated thread sampler for java: " SIZE_FORMAT " ms, native " SIZE_FORMAT " ms", interval_java, interval_native);
|
||||
log_trace(jfr)("Updated thread sampler for java: " SIZE_FORMAT " ms, native " SIZE_FORMAT " ms", interval_java, interval_native);
|
||||
}
|
||||
|
||||
void JfrThreadSampling::start_sampler(size_t interval_java, size_t interval_native) {
|
||||
assert(_sampler == NULL, "invariant");
|
||||
log_info(jfr)("Enrolling thread sampler");
|
||||
log_trace(jfr)("Enrolling thread sampler");
|
||||
_sampler = new JfrThreadSampler(interval_java, interval_native, JfrOptionSet::stackdepth());
|
||||
_sampler->start_thread();
|
||||
_sampler->enroll();
|
||||
@ -608,7 +608,7 @@ void JfrThreadSampling::set_sampling_interval(bool java_interval, size_t period)
|
||||
}
|
||||
if (interval_java > 0 || interval_native > 0) {
|
||||
if (_sampler == NULL) {
|
||||
log_info(jfr)("Creating thread sampler for java:%zu ms, native %zu ms", interval_java, interval_native);
|
||||
log_trace(jfr)("Creating thread sampler for java:%zu ms, native %zu ms", interval_java, interval_native);
|
||||
start_sampler(interval_java, interval_native);
|
||||
} else {
|
||||
_sampler->set_java_interval(interval_java);
|
||||
|
Loading…
x
Reference in New Issue
Block a user