Skip to content
Permalink
Browse files
8266206: Build failure after JDK-8264752 with older GCCs
Reviewed-by: mgronlun
  • Loading branch information
shipilev committed Apr 28, 2021
1 parent c71c268 commit 21f65f8e79b25b8367fc8d177b5f156b3575c89e
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/hotspot/share/jfr/recorder/service/jfrOptionSet.cpp
@@ -395,8 +395,9 @@ static julong divide_with_user_unit(Argument& memory_argument, julong value) {

static const char higher_than_msg[] = "This value is higher than the maximum size limited ";
static const char lower_than_msg[] = "This value is lower than the minimum size required ";
template <typename Argument, char const *msg>
template <typename Argument, bool lower>
static void log_out_of_range_value(Argument& memory_argument, julong min_value) {
const char* msg = lower ? lower_than_msg : higher_than_msg;
if (memory_argument.value()._size != memory_argument.value()._val) {
// has multiplier
log_error(arguments) (
@@ -619,7 +620,7 @@ template <typename Argument>
static bool ensure_gteq(Argument& memory_argument, const jlong value) {
if ((jlong)memory_argument.value()._size < value) {
log_set_value(memory_argument);
log_out_of_range_value<Argument, lower_than_msg>(memory_argument, value);
log_out_of_range_value<Argument, true>(memory_argument, value);
return false;
}
return true;
@@ -654,7 +655,7 @@ template <typename Argument>
static bool ensure_lteq(Argument& memory_argument, const jlong value) {
if ((jlong)memory_argument.value()._size > value) {
log_set_value(memory_argument);
log_out_of_range_value<Argument, higher_than_msg>(memory_argument, value);
log_out_of_range_value<Argument, false>(memory_argument, value);
return false;
}
return true;

1 comment on commit 21f65f8

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 21f65f8 Apr 28, 2021

Please sign in to comment.