Skip to content
Permalink
Browse files

8238634: Reduce log verbosity of the JFR thread sampler

Reviewed-by: mgronlun
  • Loading branch information
Erik Gahlin
Erik Gahlin committed Feb 10, 2020
1 parent 326a939 commit 304d764a72bd94c3c3b890667b2b929669c19dd0
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp
@@ -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);

0 comments on commit 304d764

Please sign in to comment.