directly track record classes

So we don't have use ObjectSpace.