[m-rev.] diff: minor deep profiler fixes

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Dec 1 11:22:17 AEDT 2008


deep_profiler/display_report.m:
	Obey the selected sort preference for displaying the call sites in
	a procedure.

	Fix formatting by adding a separator row between procedures in a
	clique.

Zoltan.

cvs diff: Diffing .
Index: display_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/display_report.m,v
retrieving revision 1.17
diff -u -b -r1.17 display_report.m
--- display_report.m	5 Nov 2008 03:38:40 -0000	1.17
+++ display_report.m	30 Nov 2008 13:51:29 -0000
@@ -376,13 +376,13 @@
         table_section_header(td_s("Procedures of the clique:")),
 
     sort_clique_procs_by_preferences(Prefs, CliqueProcs0, CliqueProcs),
-    ProcRowLists = list.map(clique_proc_to_table_rows(Prefs, CliquePtr),
+    ProcRowLists0 = list.map(clique_proc_to_table_rows(Prefs, CliquePtr),
         CliqueProcs),
+    ProcRowLists = list.map(add_front_separator_row, ProcRowLists0),
     list.condense(ProcRowLists, ProcRows),
 
     AllRows = AncestorRows ++
-        [table_separator_row, CliqueProcsHeaderRow, table_separator_row] ++
-        ProcRows,
+        [table_separator_row, CliqueProcsHeaderRow] ++ ProcRows,
     Table = table(table_class_box_if_pref, NumColumns, yes(Header), AllRows),
     DisplayTable = display_table(Table),
 
@@ -399,6 +399,10 @@
         display_paragraph_break, FormatControls,
         display_paragraph_break, MenuRestartQuitControls]).
 
+:- func add_front_separator_row(list(table_row)) = list(table_row).
+
+add_front_separator_row(Rows) = [table_separator_row | Rows].
+
 :- func clique_ancestor_to_row(preferences, perf_row_data(ancestor_desc))
     = table_row.
 
@@ -451,7 +455,7 @@
 clique_proc_dynamic_to_table_rows(Prefs, CliquePtr, CliqueProcDynamicReport)
         = ProcRows :-
     CliqueProcDynamicReport = clique_proc_dynamic_report(SummaryRowData,
-        CallSiteReports),
+        CallSiteReports0),
     ProcDesc = SummaryRowData ^ perf_row_subject,
     ProcCell = proc_desc_to_proc_name_cell_span(Prefs, [attr_bold],
         ProcDesc, 2),
@@ -460,6 +464,8 @@
         SummaryPerfCells),
     SummaryRowCells = [ProcCell] ++ SummaryPerfCells,
     SummaryRow = table_row(SummaryRowCells),
+    sort_clique_call_site_reports_by_preferences(Prefs,
+        CallSiteReports0, CallSiteReports),
     CallSiteRowLists =
         list.map(clique_call_site_to_rows(Prefs, CliquePtr), CallSiteReports),
     list.condense(CallSiteRowLists, CallSiteRows),
cvs diff: Diffing notes
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list