From 549bd43ef82388780789d728dfaf3920065a898c Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Wed, 15 Jul 2020 06:49:55 -0700 Subject: [PATCH] [cost] Print where cost become top Summary: This diff prints where the cost becomes top by calling `html_debug_new_node_session`. This will print them in the start node of the procedure in html. There are already printing functions in `get_instr_node_cost_record`. Reviewed By: ezgicicek Differential Revision: D22547578 fbshipit-source-id: 257e957c0 --- infer/src/cost/cost.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infer/src/cost/cost.ml b/infer/src/cost/cost.ml index 10010930c..dbd8828e8 100644 --- a/infer/src/cost/cost.ml +++ b/infer/src/cost/cost.ml @@ -316,7 +316,9 @@ let checker ({InterproceduralAnalysis.proc_desc; exe_env; analyze_dependency} as ; get_summary ; get_formals } in - WorstCaseCost.compute tenv extras instr_cfg + AnalysisCallbacks.html_debug_new_node_session (NodeCFG.start_node node_cfg) + ~pp_name:(fun f -> F.pp_print_string f "cost(worst-case)") + ~f:(fun () -> WorstCaseCost.compute tenv extras instr_cfg) in let () = L.(debug Analysis Verbose)