-
Bug
-
Resolution: Fixed
-
P4
-
11, 15, 16
-
b14
CLion static analyzer highlighted the potential mismatch in argument passing order. Look at this call chain:
void G1AdaptiveIHOPControl::send_trace_event(G1NewTracer* tracer) {
...
tracer->report_adaptive_ihop_statistics(get_conc_mark_start_threshold(),
actual_target_threshold(),
G1CollectedHeap::heap()->used(),
_last_unrestrained_young_size,
...);
}
void G1NewTracer::report_adaptive_ihop_statistics(size_t threshold,
size_t internal_target_occupancy,
size_t current_occupancy,
size_t additional_buffer_size,
...) {
send_adaptive_ihop_statistics(threshold,
internal_target_occupancy,
additional_buffer_size, // SWAPPED HERE
current_occupancy, // SWAPPED HERE
...);
}
void G1NewTracer::send_adaptive_ihop_statistics(size_t threshold,
size_t internal_target_occupancy,
size_t current_occupancy,
size_t additional_buffer_size,
...) {
...
evt.set_currentOccupancy(current_occupancy);
evt.set_additionalBufferSize(additional_buffer_size);
...
}
I think current_occupancy and additional_buffer_size were swapped accidentally in G1NewTracer::report_adaptive_ihop_statistics.
I have not looked at the actual JFR event dump, only to the code inspection.
void G1AdaptiveIHOPControl::send_trace_event(G1NewTracer* tracer) {
...
tracer->report_adaptive_ihop_statistics(get_conc_mark_start_threshold(),
actual_target_threshold(),
G1CollectedHeap::heap()->used(),
_last_unrestrained_young_size,
...);
}
void G1NewTracer::report_adaptive_ihop_statistics(size_t threshold,
size_t internal_target_occupancy,
size_t current_occupancy,
size_t additional_buffer_size,
...) {
send_adaptive_ihop_statistics(threshold,
internal_target_occupancy,
additional_buffer_size, // SWAPPED HERE
current_occupancy, // SWAPPED HERE
...);
}
void G1NewTracer::send_adaptive_ihop_statistics(size_t threshold,
size_t internal_target_occupancy,
size_t current_occupancy,
size_t additional_buffer_size,
...) {
...
evt.set_currentOccupancy(current_occupancy);
evt.set_additionalBufferSize(additional_buffer_size);
...
}
I think current_occupancy and additional_buffer_size were swapped accidentally in G1NewTracer::report_adaptive_ihop_statistics.
I have not looked at the actual JFR event dump, only to the code inspection.