On Fri, 8 Apr 2022 03:40:41 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:

> > > One open question is which MEMFLAGS to use. mtTracing doesn't seem to be 
> > > exactly right. Should I templatize BitSet and make JVMTI use 
> > > mtServiceability and JRF use mtTracing as it did before?
> > 
> > 
> > Yes, I think templatizing for MEMFLAGS makes sense (concurrentHashTable.hpp 
> > is too).
> 
> I haven't had time to look at the code, but I don't know about this. Slapping 
> a template parameter on everything isn't necessarily a good idea. We recently 
> (JDK-8283368) undid exactly this sort of thing in the cardset code, instead 
> making the MEMFLAGS value a runtime parameter provided at construction time. 
> This avoids a bunch of generated code duplication, additional template 
> syntax, and allows more implementation be put in .cpp files because it isn't 
> a template.

The trouble is that ObjectBitSet is a subclass of CHeapObj, which takes a 
template parameter for memflags itself. How could I avoid templatizing the 
ObjectBitSet itself?

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

PR: https://git.openjdk.java.net/jdk/pull/7964

Reply via email to