with Tasks; use Tasks; with Caches; use Caches; with CFGs; use CFGs; with Core_Units; use Core_Units; with Task_Set; use Task_Set; with CFG_Set; use CFG_Set; with Cache_Set; use Cache_Set; with Cache_Block_Set; use Cache_Block_Set; with Cache_Access_Profile_Set; use Cache_Access_Profile_Set; with Caches; use Caches.Cache_Blocks_Table_Package; with Basic_Block_Analysis; use Basic_Block_Analysis; with Systems; use Systems; with Debug; use Debug; with unbounded_strings; use unbounded_strings; with Xml_Tag; use Xml_Tag; with GNAT.Current_Exception; use GNAT.Current_Exception; with Sets; with Framework_Config; use Framework_Config; with Translate; use Translate; package body Call_Cache_Framework is procedure Compute_Task_Cache_Access_Profile (Sys : in out System; Result : in out Unbounded_String; Output : in Output_Format := String_Output) is A_Cache_Access_Profile : Cache_Access_Profile_Ptr; A_Task : Generic_Task_Ptr; My_Iterator : Tasks_Iterator; begin Put_Debug("Call Compute_Task_Cache_Access_Profile"); Result := To_Unbounded_String (""); if Output = Xml_Output then Set_Tag; else Set_Empty; end if; Result := Result & Lb_Minus & Lb_Compute_Cache_Access_Profile(Current_Language) & To_Unbounded_String (" ") & Lb_Compute_Cache_Access_Profile_Method(Current_Language) & To_Unbounded_String (" (") & To_Unbounded_String ("[20]") & To_Unbounded_String (")") & To_Unbounded_String (" : ") & unbounded_lf & unbounded_lf; reset_iterator (Sys.Tasks, My_Iterator); loop A_Cache_Access_Profile := new Cache_Access_Profile; current_element (Sys.Tasks, A_Task, My_Iterator); if (A_Task.cfg_name /= empty_string) then Compute_Cache_Access_Profile(Sys => Sys, Task_Name => A_Task.name, A_Cache_Access_Profile => A_Cache_Access_Profile); end if; Result := Result & ASCII.HT & A_Task.name & unbounded_lf; Result := Result & ASCII.HT & ASCII.HT & "UCB: " & ASCII.HT ; for i in 0..a_cache_access_profile.UCBs.Nb_Entries-1 loop Result := Result & a_cache_access_profile.UCBs.Entries(i).cache_block_number'Img & " "; end loop; Result := Result & unbounded_lf; Result := Result & ASCII.HT & ASCII.HT & "ECB: " & ASCII.HT ; for i in 0..a_cache_access_profile.ECBs.Nb_Entries-1 loop Result := Result & a_cache_access_profile.ECBs.Entries(i).cache_block_number'Img & " "; end loop; Result := Result & unbounded_lf; exit when is_last_element (Sys.Tasks, My_Iterator); next_element (Sys.Tasks, My_Iterator); end loop; exception when Basic_Block_Analysis.Invalid_Input_Data => Result := Result & Exception_Message & unbounded_lf; end Compute_Task_Cache_Access_Profile; end Call_Cache_Framework;