Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8141855 | emb-9 | Volker Simonis | P4 | Resolved | Fixed | team |
Change "8067341: Modify PLAB sizing algorithm to waste less" introduced the following code:
size_t const cur_plab_sz = (double)total_waste_allowed / G1LastPLABAverageOccupancy;
which triggers a conversion warning with older versions of GCC and potentially other compilers as well:
hotspot-rt/src/share/vm/gc/g1/g1EvacStats.cpp: In member function 'virtual void G1EvacStats::adjust_desired_plab_sz()':
hotspot-rt/src/share/vm/gc/g1/g1EvacStats.cpp:96: warning: converting to 'size_t' from 'double'
make[4]: *** [g1EvacStats.o] Error 1
The warning can be easily fixed as follows:
size_t const cur_plab_sz = (sizte_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
size_t const cur_plab_sz = (double)total_waste_allowed / G1LastPLABAverageOccupancy;
which triggers a conversion warning with older versions of GCC and potentially other compilers as well:
hotspot-rt/src/share/vm/gc/g1/g1EvacStats.cpp: In member function 'virtual void G1EvacStats::adjust_desired_plab_sz()':
hotspot-rt/src/share/vm/gc/g1/g1EvacStats.cpp:96: warning: converting to 'size_t' from 'double'
make[4]: *** [g1EvacStats.o] Error 1
The warning can be easily fixed as follows:
size_t const cur_plab_sz = (sizte_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy);
- backported by
-
JDK-8141855 Fix conversion warning after 8067341
- Resolved
- relates to
-
JDK-8135181 Re-enable '-Wconversion' for GCC 4.3 and later
- Open
-
JDK-8067341 Modify PLAB sizing algorithm to waste less
- Resolved