diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-29 10:05:44 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-04-29 10:05:44 +0000 |
commit | fdbbc0183fa351afe2849ebe2dd2d33c2ca0756d (patch) | |
tree | e0500df5e9169f2d414cedff64d374e236571d13 /gcc/ada/s-stausa.ads | |
parent | 7a6f27cf9fba010215f34abc7a0efc2fc99b2b87 (diff) | |
download | gcc-fdbbc0183fa351afe2849ebe2dd2d33c2ca0756d.tar.gz |
2009-04-29 Arnaud Charlet <charlet@adacore.com>
* s-taskin.adb (Initialize): Remove pragma Warnings Off and remove
unused assignment.
2009-04-29 Thomas Quinot <quinot@adacore.com>
* make.adb: Minor reformatting.
Minor code reorganization throughout.
2009-04-29 Matteo Bordin <bordin@adacore.com>
* s-stausa.ads: Changed visibility of type Task_Result: moved to
public part to give application visibility over it.
This is for future improvement and to build a public API on top of it.
Changed record components name of type Task_Result to reflect the new
way of reporting.
* s-stausa.adb: Actual_Size_Str changed to reflect the new way of
reporting Stack usage.
* gnat_ugn.texi: Update doc of stack usage report.
* g-tastus.ads, s-stusta.ads, s-stusta.adb: New files.
* Makefile.rtl: Add new run-time files.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-stausa.ads')
-rw-r--r-- | gcc/ada/s-stausa.ads | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/gcc/ada/s-stausa.ads b/gcc/ada/s-stausa.ads index af536560c1c..f42e37452f7 100644 --- a/gcc/ada/s-stausa.ads +++ b/gcc/ada/s-stausa.ads @@ -46,6 +46,27 @@ package System.Stack_Usage is (Value : System.Address) return Stack_Address renames System.Storage_Elements.To_Integer; + Task_Name_Length : constant := 32; + -- The maximum length of task name displayed. + -- ??? Consider merging this variable with Max_Task_Image_Length. + + type Task_Result is record + Task_Name : String (1 .. Task_Name_Length); + + Value : Natural; + -- Amount of the stack used; the value is calculated on the basis of + -- the mechanism used by GNAT to allocate it, and it is NOT a precise + -- value. + + Variation : Natural; + -- Possible variation in the amount of used stack. The real stack usage + -- may vary in the range Value +/- Variation + + Max_Size : Natural; + end record; + + type Result_Array_Type is array (Positive range <>) of Task_Result; + type Stack_Analyzer is private; -- Type of the stack analyzer tool. It is used to fill a portion of the -- stack with Pattern, and to compute the stack used after some execution. @@ -206,7 +227,7 @@ package System.Stack_Usage is procedure Initialize_Analyzer (Analyzer : in out Stack_Analyzer; Task_Name : String; - Stack_Size : Natural; + My_Stack_Size : Natural; Max_Pattern_Size : Natural; Bottom : Stack_Address; Pattern : Interfaces.Unsigned_32 := 16#DEAD_BEEF#); @@ -256,10 +277,6 @@ package System.Stack_Usage is private - Task_Name_Length : constant := 32; - -- The maximum length of task name displayed. - -- ??? Consider merging this variable with Max_Task_Image_Length. - package Unsigned_32_Addr is new System.Address_To_Access_Conversions (Interfaces.Unsigned_32); @@ -308,20 +325,6 @@ private Compute_Environment_Task : Boolean; - type Task_Result is record - Task_Name : String (1 .. Task_Name_Length); - - Min_Measure : Natural; - -- Minimum value for the measure - - Max_Measure : Natural; - -- Maximum value for the measure, taking into account the actual size - -- of the pattern filled. - - Max_Size : Natural; - end record; - - type Result_Array_Type is array (Positive range <>) of Task_Result; type Result_Array_Ptr is access all Result_Array_Type; Result_Array : Result_Array_Ptr; |