Skip to content

Commit

Permalink
Enable tracing support (#1328)
Browse files Browse the repository at this point in the history
* Enable tracing support

* Make tracing crate compile alone

* Create `log_dir` for trace output

* Disable doctests

* Documentation
  • Loading branch information
JonasAlaif authored Mar 6, 2023
1 parent f419dba commit 2cadbf4
Show file tree
Hide file tree
Showing 137 changed files with 853 additions and 746 deletions.
158 changes: 144 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ members = [
"prusti-tests",
"prusti-common",
"prusti-utils",
"tracing",
"prusti-interface",
"prusti-viper",
"prusti-server",
Expand Down
1 change: 1 addition & 0 deletions analysis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env_logger = "0.10"
syn = { version = "1.0", features = [ "full", "parsing" ] }
derive_more = "0.99"
prusti-rustc-interface = { path = "../prusti-rustc-interface" }
tracing = { path = "../tracing" }

[dev-dependencies]
compiletest_rs = "0.9"
Expand Down
1 change: 1 addition & 0 deletions analysis/src/domains/definitely_accessible/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ impl fmt::Debug for DefinitelyAccessibleState<'_> {

impl<'mir, 'tcx: 'mir> PointwiseState<'mir, 'tcx, DefinitelyAccessibleState<'tcx>> {
/// Make a best-effort at injecting statements to check the analysis state.
#[tracing::instrument(level = "debug", skip_all)]
pub fn generate_test_program(&self, tcx: TyCtxt<'tcx>, source_map: &SourceMap) -> String {
let mir_span = self.mir.span;
let source_file = source_map.lookup_source_file(mir_span.data().lo);
Expand Down
1 change: 1 addition & 0 deletions analysis/src/domains/maybe_borrowed/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ impl<'mir, 'tcx: 'mir> MaybeBorrowedAnalysis<'mir, 'tcx> {
}
}

#[tracing::instrument(level = "debug", skip(self))]
pub fn run_analysis(
&self,
) -> AnalysisResult<PointwiseState<'mir, 'tcx, MaybeBorrowedState<'tcx>>> {
Expand Down
Loading

0 comments on commit 2cadbf4

Please sign in to comment.