Shenandoah shares code for STW and concurrent mark to reduce duplication. But this approach has a few disadvantages:
1) Code has to special case for STW and concurrent mark.
2) STW mark does not need to rendezvous workers between root mark and the rest of mark
3) STW mark does not need to activate SATB barrier and drain SATB buffers.
4) STW mark does not need to remark some of roots.
We can refactor mark code that encapsulates shared code into base class and splits STW mark and concurrent mark into separate classes.