Skip to content

Commit ebb6edc

Browse files
committed
Add escape tracing
1 parent 690ee20 commit ebb6edc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/analyses/threadEscape.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ struct
6262
let to_extra (v,o) set = D.add v set in
6363
Queries.LS.fold to_extra a (D.empty ())
6464
(* Ignore soundness warnings, as invalidation proper will raise them. *)
65-
| _ -> D.empty ()
65+
| a ->
66+
if M.tracing then M.tracel "escape" "reachable %a: %a\n" d_exp e Queries.LS.pretty a;
67+
D.empty ()
6668

6769
let special ctx (lval: lval option) (f:varinfo) (arglist:exp list) : D.t =
6870
ctx.local
@@ -84,6 +86,7 @@ struct
8486
match args with
8587
| [ptc_arg] ->
8688
let escaped = fctx.local in (* reuse reachable computation from threadenter *)
89+
if M.tracing then M.tracel "escape" "%a: %a\n" d_exp ptc_arg D.pretty escaped;
8790
if not (D.is_empty escaped) then (* avoid emitting unnecessary event *)
8891
ctx.emit (Events.Escape escaped);
8992
escaped

0 commit comments

Comments
 (0)