@@ -3828,7 +3828,10 @@ trait Types
3828
3828
// as a) this is now a weak set, and b) it is discarded completely before the next run.
3829
3829
uniqueRunId = currentRunId
3830
3830
}
3831
- (uniques findEntryOrUpdate tp).asInstanceOf [T ]
3831
+ val result = (uniques findEntryOrUpdate tp).asInstanceOf [T ]
3832
+
3833
+ if (Statistics .canEnable && (result eq tp)) Statistics .incCounter(rawTypeNewEntries)
3834
+ result
3832
3835
}
3833
3836
3834
3837
// Helper Classes ---------------------------------------------------------
@@ -4836,6 +4839,7 @@ object TypeConstants {
4836
4839
object TypesStats {
4837
4840
import BaseTypeSeqsStats ._
4838
4841
val rawTypeCount = Statistics .newCounter (" #raw type creations" )
4842
+ val rawTypeNewEntries = Statistics .newSubCounter(" of which are new entries" , rawTypeCount)
4839
4843
val subtypeCount = Statistics .newCounter (" #subtype ops" )
4840
4844
val sametypeCount = Statistics .newCounter (" #sametype ops" )
4841
4845
val lubCount = Statistics .newCounter (" #toplevel lubs/glbs" )
@@ -4856,7 +4860,6 @@ object TypesStats {
4856
4860
val typerefBaseTypeSeqCount = Statistics .newSubCounter(" of which for typerefs" , baseTypeSeqCount)
4857
4861
val singletonBaseTypeSeqCount = Statistics .newSubCounter(" of which for singletons" , baseTypeSeqCount)
4858
4862
val typeOpsStack = Statistics .newTimerStack()
4859
-
4860
4863
/* Commented out, because right now this does not inline, so creates a closure which will distort statistics
4861
4864
@inline final def timedTypeOp[T](c: Statistics.StackableTimer)(op: => T): T = {
4862
4865
val start = Statistics.pushTimer(typeOpsStack, c)
0 commit comments