RFR: JDK-8129961 : SIGSEGV when copying to survivor space

Kim Barrett kim.barrett at oracle.com
Fri Jul 10 20:10:45 UTC 2015


On Jul 10, 2015, at 3:52 PM, Eric Caspole <eric.caspole at oracle.com> wrote:
> 
> Hi everybody,
> Please review this fix for JDK-8129961
> 
> https://bugs.openjdk.java.net/browse/JDK-8129961
> 
> http://cr.openjdk.java.net/~ecaspole/JDK-8129961/webrev/
> 
> The problem was that the enum GenCollectedHeap::YoungGen == 0  and it was interpreted as "false" in no_allocs_since_save_marks() after a recent refactoring.
> 
> Since there is no place in the code either serial gc or parNew where it ever passes "false" to avoid rescanning young gens, I want to remove the parameter so it will always scan young and old gens. That is simpler to read and removes this type of problem.
> Passed JPRT.
> Let me know what you think.

------------------------------------------------------------------------------
src/share/vm/gc/shared/genCollectedHeap.cpp
 744 bool GenCollectedHeap::no_allocs_since_save_marks() {
 745   if (!_young_gen->no_allocs_since_save_marks()) {
 746     return false;
 747   }
 748   return _old_gen->no_allocs_since_save_marks();
 749 }

This looks rather contorted now.  Why not just

  return
    _young_gen->no_allocs_since_save_marks() &&
    _old_gen->no_allocs_since_save_marks();

------------------------------------------------------------------------------

Otherwise, looks good.



More information about the hotspot-gc-dev mailing list