Compare commits

...

4 Commits

Author SHA1 Message Date
Kim Morrison
738105eda2 chore: reenable Lake 2024-09-12 14:53:12 +10:00
Kim Morrison
b175cdd5a9 chore: update stage0 2024-09-12 14:53:12 +10:00
Kim Morrison
79b981919d feat: primitive profiling of isDefEq
.

disable printing expressions
2024-09-12 14:49:58 +10:00
Kim Morrison
481082af37 chore: disable Lake
This reverts commit f944f05e6f2f13e9bd48a2c9c3c02943b8e79449.
2024-09-12 14:14:42 +10:00
29 changed files with 19 additions and 2 deletions

View File

@@ -1894,7 +1894,14 @@ def isExprDefEq (t s : Expr) : MetaM Bool :=
Remark: the kernel does *not* update the type of variables in the local context.
-/
resetDefEqPermCaches
checkpointDefEq (mayPostpone := true) <| Meta.isExprDefEqAux t s
let start IO.getNumHeartbeats
let r checkpointDefEq (mayPostpone := true) <| Meta.isExprDefEqAux t s
if profiler.isDefEq.get ( getOptions) then
let finish IO.getNumHeartbeats
let elapsed := (finish - start) / 1000
if elapsed profiler.isDefEq.threshold.get ( getOptions) then
logInfo s!"isDefEq took {elapsed} heartbeats"
return r
/--
Determines whether two expressions are definitionally equal to each other.

View File

@@ -13,7 +13,7 @@ register_builtin_option profiler : Bool := {
defValue := false
group := "profiler"
descr := "show exclusive execution times of various Lean components
See also `trace.profiler` for an alternative profiling system with structured output."
}
@@ -23,6 +23,16 @@ register_builtin_option profiler.threshold : Nat := {
descr := "threshold in milliseconds, profiling times under threshold will not be reported individually"
}
register_builtin_option profiler.isDefEq : Bool := {
defValue := false
descr := "Report slow isDefEq problems"
}
register_builtin_option profiler.isDefEq.threshold : Nat := {
defValue := 200000
descr := "Threshold for reporting isDefEq heartbeats"
}
@[export lean_get_profiler]
private def get_profiler (o : Options) : Bool :=
profiler.get o

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.