Skip to content

Commit ed2e676

Browse files
committed
Revert: Instrumentation to get basedata computation counts
(reverted from commit c1254ed) Last data over whole legacy test suite (running time: 337s): BaseData cache fills per phase: 0, 670675, 0, 0, 2648, 0, 12, 0, 2, 548, 1153, 1189, 190, 115, 0, 0, 0, 0, 28, 68, 0, 0, 129, 267, 0, 0, 0, 0, 0, 4, 0, 38, 0, 3, 13, 1, 6857, 809, 167147, 59961, 671, 246, 5417, 169, 114, 615, 17, 0, 2, 0, 1753, 0, 27, 0, 0, 8032, 26338, 0, 0, 736, 0, 0, 0, 4851, 69224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 Cache invalidations: 80
1 parent 3f2ff0c commit ed2e676

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

compiler/src/dotty/tools/dotc/Run.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ class Run(comp: Compiler)(implicit ctx: Context) {
9292
for (unit <- units)
9393
Stats.record("retained typed trees at end", unit.tpdTree.treeSize)
9494
Stats.record("total trees at end", ast.Trees.ntrees)
95-
println(s"bts counts: ${SymDenotations.btsCount.deep}")
96-
println(s"invalidate count: ${SymDenotations.invalidateCount}")
9795
}
9896

9997
private sealed trait PrintedTree

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,6 @@ object SymDenotations {
14211421
}
14221422
def emptyParentsExpected =
14231423
is(Package) || (symbol == defn.AnyClass) || ctx.erasedTypes && (symbol == defn.ObjectClass)
1424-
btsCount(ctx.phaseId) += 1
14251424
if (classParents.isEmpty && !emptyParentsExpected)
14261425
onBehalf.signalProvisional()
14271426
(classSymbol :: addParentBaseClasses(classParents, Nil),
@@ -2041,8 +2040,7 @@ object SymDenotations {
20412040
final def isValid(implicit ctx: Context): Boolean = valid && isValidAt(ctx.phase)
20422041

20432042
def invalidate(): Unit =
2044-
if (valid && !locked) {
2045-
invalidateCount += 1
2043+
if (isValid && !locked) {
20462044
cache = null
20472045
valid = false
20482046
invalidateDependents()
@@ -2089,7 +2087,4 @@ object SymDenotations {
20892087
}
20902088

20912089
@sharable private var indent = 0 // for completions printing
2092-
2093-
@sharable val btsCount = new Array[Int](Periods.MaxPossiblePhaseId + 1)
2094-
@sharable var invalidateCount = 0
20952090
}

0 commit comments

Comments
 (0)