sealedcaseclass Session_Statistics(
theories: Int = 0,
garbage_theories: Int = 0,
locales: Int = 0,
locale_thms: Int = 0,
global_thms: Int = 0,
sizeof_thys_id: Space = Space.zero,
sizeof_thms_id: Space = Space.zero,
sizeof_terms: Space = Space.zero,
sizeof_types: Space = Space.zero,
sizeof_names: Space = Space.zero,
sizeof_spaces: Space = Space.zero)
finalclass Statistics private( val parent: Option[Statistics] = None, val session: String = "", val theories: Int = 0, val garbage_theories: Int = 0, val locales: Int = 0, val locale_thms: Int = 0, val global_thms: Int = 0, val heap_size: Space = Space.zero, val thys_id_size: Space = Space.zero, val thms_id_size: Space = Space.zero, val terms_size: Space = Space.zero, val types_size: Space = Space.zero, val names_size: Space = Space.zero, val spaces_size: Space = Space.zero
) { privatedef print_total_theories: String = if (theories == 0) "0" else { val x = (theories + garbage_theories).toDouble / theories
String.format(Locale.ROOT, "%.1f", x.asInstanceOf[AnyRef])
}
val sessions_structure =
Sessions.load_structure(options, dirs = dirs, select_dirs = select_dirs)
val selected_sessions = sessions_structure.imports_selection(selection) val cumulative_sessions = sessions_structure.build_requirements(selected_sessions)
val sessions_selection = Sessions.Selection(sessions = selected_sessions)
val sessions = { var seen = Map.empty[String, Statistics] for (session_name <- cumulative_sessions) yield {
progress.echo("Profiling " + session_name + " ...") val parent = for {
info <- sessions_structure.get(session_name)
parent_name <- info.parent
parent_stats <- seen.get(parent_name)
} yield parent_stats val stats =
Statistics.make(store, build_results.deps(session_name),
dirs = sessions_dirs,
parent = parent)
seen += (session_name -> stats)
stats
}
}
progress.echo("DONE")
Results(build_results, sessions)
}
/* Isabelle tool wrapper */
val default_output_dir: Path = Path.explode("profiling")
val isabelle_tool =
Isabelle_Tool("profiling", "build sessions for profiling of ML heap content",
Scala_Project.here, { args => var base_sessions: List[String] = Nil var select_dirs: List[Path] = Nil var numa_shuffling = false var output_dir = default_output_dir var exclude_session_groups: List[String] = Nil var all_sessions = false var dirs: List[Path] = Nil var session_groups: List[String] = Nil var max_jobs: Option[Int] = None var options = Options.init(specs = Options.Spec.ISABELLE_BUILD_OPTIONS) var verbose = false var exclude_sessions: List[String] = Nil
val getopts = Getopts("""
Usage: isabelle profiling [OPTIONS] [SESSIONS ...]
Options are:
-B NAME include session NAME and all descendants
-D DIR include session directory and select its sessions
-N cyclic shuffling of NUMA CPU nodes (performance tuning)
-O DIR output directory (default: """ + default_output_dir + """)
-X NAME exclude sessions from group NAME and all descendants
-a select all sessions
-d DIR include session directory
-g NAME select session group NAME
-j INT maximum number of parallel jobs (default 1)
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME)
-v verbose
-x NAME exclude session NAME and all descendants
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.18Bemerkung:
(vorverarbeitet am 2026-05-03)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.