From d0a2a2806d4632066fb8ba6d05f82c8e4d7a2fa5 Mon Sep 17 00:00:00 2001 From: Karoliine Holter Date: Wed, 3 Jan 2024 15:22:51 +0200 Subject: [PATCH] Do not print mhp results when empty --- src/analyses/mHPAnalysis.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/analyses/mHPAnalysis.ml b/src/analyses/mHPAnalysis.ml index a24dbc3cd6..9bccb41baf 100644 --- a/src/analyses/mHPAnalysis.ml +++ b/src/analyses/mHPAnalysis.ml @@ -12,7 +12,9 @@ struct include MHP let name () = "mhp" let may_race = MHP.may_happen_in_parallel - let should_print _ = true + let should_print {tid; created; must_joined} = + not (ConcDomain.ThreadSet.is_empty created) + || not (ConcDomain.ThreadSet.is_empty must_joined) end let access ctx _: MHP.t = MHP.current (Analyses.ask_of_ctx ctx)