From 4d58ef782ca6b823651ae59f0c3be1f4e07e9286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Tue, 8 Jun 2021 10:44:57 +0200 Subject: [PATCH] [Eva] Removes unused record fields (in value_perf and gui_red). --- src/plugins/value/gui_files/gui_red.ml | 9 ++------- src/plugins/value/utils/value_perf.ml | 8 +------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/plugins/value/gui_files/gui_red.ml b/src/plugins/value/gui_files/gui_red.ml index b0b1538a7e7..47322653a79 100644 --- a/src/plugins/value/gui_files/gui_red.ml +++ b/src/plugins/value/gui_files/gui_red.ml @@ -60,9 +60,6 @@ type red_alarm = { function_name:string; kind:string; acsl: string; - alarm_or_prop: Red_statuses.alarm_or_property; - (* Status here means 'final' status as emitted by all plugins. Currentlt not - shown. *) ip: Property.t; callstacks: int; (* Number of callstacks in which the red alarm occured. *) } @@ -88,14 +85,12 @@ let make_red_alarm function_name ki alarm callstacks = let acsl = Format.asprintf "@[<hov>%a@]" Cil_datatype.Toplevel_predicate.pretty p in - let alarm_or_prop = Red_statuses.Alarm alarm in - { function_name; ip; kind; alarm_or_prop; acsl; callstacks } + { function_name; ip; kind; acsl; callstacks } let make_red_prop function_name ip callstacks = let kind = "property" (* TODO *) in let acsl = Format.asprintf "@[<hov>%a@]" Property.pretty ip in - let alarm_or_prop = Red_statuses.Prop ip in - { function_name; ip; kind; alarm_or_prop; acsl; callstacks } + { function_name; ip; kind; acsl; callstacks } diff --git a/src/plugins/value/utils/value_perf.ml b/src/plugins/value/utils/value_perf.ml index 548914728a9..5d1d845e294 100644 --- a/src/plugins/value/utils/value_perf.ml +++ b/src/plugins/value/utils/value_perf.ml @@ -47,10 +47,6 @@ module Call_info = struct (* How many times the function was called. *) mutable nb_calls: int; - (* How many times the call had to be computed (i.e. with calls - cached with memexec removed) *) - mutable nb_effective_calls: int; - (* The accumulated execution time for past calls. *) mutable total_duration: float; @@ -60,8 +56,7 @@ module Call_info = struct } ;; - let create() = { nb_calls = 0; nb_effective_calls = 0; total_duration = 0.0; - since = [] };; + let create() = { nb_calls = 0; total_duration = 0.0; since = [] };; (* Represents the calls to the main function. *) let main = create();; @@ -342,7 +337,6 @@ let stop_doing_perf callstack = let reset_perf () = let reset_callinfo ci = ci.Call_info.nb_calls <- 0; - ci.Call_info.nb_effective_calls <- 0; ci.Call_info.total_duration <- 0.0; ci.Call_info.since <- [] in -- GitLab