diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-03-21 18:42:22 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-03-21 18:42:22 +0100 |
commit | 9c96c560b0227c0473cad2760de514de72d5b613 (patch) | |
tree | 972aadab362819baa28ec178f463c41a1cca9c1a /src | |
parent | ffca448651c5b7b0fc5fe6bdbbcf1e0dc13419e1 (diff) | |
download | ghdl-9c96c560b0227c0473cad2760de514de72d5b613.tar.gz ghdl-9c96c560b0227c0473cad2760de514de72d5b613.tar.bz2 ghdl-9c96c560b0227c0473cad2760de514de72d5b613.zip |
Increase the size of Nbr_Resumed_Processes; fix for #378
Diffstat (limited to 'src')
-rw-r--r-- | src/grt/grt-processes.adb | 9 | ||||
-rw-r--r-- | src/grt/grt-processes.ads | 2 | ||||
-rw-r--r-- | src/grt/grt-stats.adb | 6 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/grt/grt-processes.adb b/src/grt/grt-processes.adb index 0f0de340b..3b3581d3f 100644 --- a/src/grt/grt-processes.adb +++ b/src/grt/grt-processes.adb @@ -76,12 +76,12 @@ package body Grt.Processes is Postponed_Resume_Process_Table : Process_Acc_Array_Acc; Last_Postponed_Resume_Process : Natural := 0; - -- Number of postponed processes. + -- Number of processes. Nbr_Postponed_Processes : Natural := 0; Nbr_Non_Postponed_Processes : Natural := 0; -- Number of resumed processes. - Nbr_Resumed_Processes : Natural := 0; + Nbr_Resumed_Processes : Long_Long_Integer := 0; -- Earliest time out within non-sensitized processes. Process_First_Timeout : Std_Time := Last_Time; @@ -123,7 +123,7 @@ package body Grt.Processes is return Res; end Get_Nbr_Sensitized_Processes; - function Get_Nbr_Resumed_Processes return Natural is + function Get_Nbr_Resumed_Processes return Long_Long_Integer is begin return Nbr_Resumed_Processes; end Get_Nbr_Resumed_Processes; @@ -767,7 +767,8 @@ package body Grt.Processes is Last := Last_Resume_Process; Last_Resume_Process := 0; end if; - Nbr_Resumed_Processes := Nbr_Resumed_Processes + Last; + Nbr_Resumed_Processes := + Nbr_Resumed_Processes + Long_Long_Integer (Last); if Options.Nbr_Threads = 1 then for I in 1 .. Last loop diff --git a/src/grt/grt-processes.ads b/src/grt/grt-processes.ads index cd2475691..57dac4497 100644 --- a/src/grt/grt-processes.ads +++ b/src/grt/grt-processes.ads @@ -75,7 +75,7 @@ package Grt.Processes is function Get_Nbr_Sensitized_Processes return Natural; -- Total number of resumed processes. - function Get_Nbr_Resumed_Processes return Natural; + function Get_Nbr_Resumed_Processes return Long_Long_Integer; -- Disp the name of process PROC. procedure Disp_Process_Name (Stream : Grt.Stdio.FILEs; Proc : Process_Acc); diff --git a/src/grt/grt-stats.adb b/src/grt/grt-stats.adb index 5bc046d00..8827ae222 100644 --- a/src/grt/grt-stats.adb +++ b/src/grt/grt-stats.adb @@ -356,14 +356,16 @@ package body Grt.Stats is Put_I32 (stdout, Ghdl_I32 (Grt.Processes.Get_Nbr_Sensitized_Processes)); New_Line; Put (stdout, "Number of resumed processes: "); - Put_I32 (stdout, Ghdl_I32 (Grt.Processes.Get_Nbr_Resumed_Processes)); + Put_I64 (stdout, Ghdl_I64 (Grt.Processes.Get_Nbr_Resumed_Processes)); New_Line; Put (stdout, "Average number of resumed processes per cycle: "); N := Processes.Nbr_Delta_Cycles + Processes.Nbr_Cycles; if N = 0 then Put (stdout, "-"); else - Put_I32 (stdout, Ghdl_I32 (Processes.Get_Nbr_Resumed_Processes / N)); + Put_I64 + (stdout, + Ghdl_I64 (Processes.Get_Nbr_Resumed_Processes) / Ghdl_I64 (N)); end if; New_Line; end Disp_Stats; |