RFR (S): Ensure BitMaps clearing is done with memset
Aleksey Shipilev
shade at redhat.com
Tue Jan 31 18:57:08 UTC 2017
Hi,
On our large lab machines, we sometimes see rather high bitmap cleaning times:
Concurrent Marking = 353.84 s (a = 1259228 us) (n = 281)
(lvls, us = 791016, 1132812, 1250000, 1328125, 3448034)
Concurrent Evacuation = 192.62 s (a = 687937 us) (n = 280)
(lvls, us = 398438, 609375, 687500, 744141, 1485181)
Reset Bitmaps = 53.37 s (a = 190614 us) (n = 280)
(lvls, us = 684, 166016, 191406, 218750, 328977)
Not the least reason for this is that we are using per-word cleanup, while we
should instead use memset. BitMap provides the methods for that, with _large
suffixes. This patch ensures it:
GCC 4.8 has -ftree-loop-distribute-patterns at -O3, which seems to fold
clear_range into memset. This explains why we haven't seen this on our
up-to-date development machines. Disabling that optimization demonstrates the
benefits for the patch.
baseline:
Reset Bitmaps = 3.15 s (a = 11430 us) (n = 276)
(lvls, us = 94, 8184, 9473, 13086, 35697)
patched:
Reset Bitmaps = 1.55 s (a = 5394 us) (n = 287)
(lvls, us = 90, 4238, 4707, 5332, 19467)
Testing: hotspot_gc_shenandoah
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list