src/Pure/Tools/profiling_report.scala
changeset 75778 d18c96b9b955
parent 75738 9cc5ee625adb
child 75779 5470c67bd772
--- a/src/Pure/Tools/profiling_report.scala	Sat Aug 06 14:31:46 2022 +0200
+++ b/src/Pure/Tools/profiling_report.scala	Sat Aug 06 16:37:23 2022 +0200
@@ -18,8 +18,7 @@
     val store = Sessions.store(options)
 
     using(store.open_database_context()) { db_context =>
-      val result = db_context.database(session)(db => Some(store.read_theories(db, session)))
-      result match {
+      db_context.database(session)(db => Some(store.read_theories(db, session))) match {
         case None => error("Missing build database for session " + quote(session))
         case Some(used_theories) =>
           theories.filterNot(used_theories.toSet) match {
@@ -30,7 +29,7 @@
             (for {
               thy <- used_theories.iterator
               if theories.isEmpty || theories.contains(thy)
-              command <- Build_Job.read_theory(db_context, List(session), thy).iterator
+              command <- Build_Job.read_session_theory(db_context, session, thy).iterator
               snapshot = Document.State.init.snippet(command)
               (Protocol.ML_Profiling(report), _) <- snapshot.messages.iterator
             } yield if (clean_name) report.clean_name else report).toList