diff: sort profiler output
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Apr 2 22:00:39 AEST 1998
profiler/output.m:
Sort the lists of callers and callees before printing them.
The aim of this change is to ensure that the order of the output
does not depend on the addresses of the procedures.
A consistent output is needed so that we can automate the
regression testing of the profiler.
Index: output.m
===================================================================
RCS file: /home/mercury1/repository/mercury/profiler/output.m,v
retrieving revision 1.18
diff -u -u -r1.18 output.m
--- output.m 1997/12/07 22:56:49 1.18
+++ output.m 1998/04/02 11:49:23
@@ -235,8 +235,12 @@
{ string__format("%67s", [s("<spontaneous>\n")], String) },
io__write_string(String)
;
- output_formatted_cycle_parent_list(CycleParentList, IndexMap),
- output_formatted_parent_list(ParentList, IndexMap, TotalCalls)
+ { list__sort(CycleParentList, SortedCycleParentList) },
+ output_formatted_cycle_parent_list(SortedCycleParentList,
+ IndexMap),
+ { list__sort(ParentList, SortedParentList) },
+ output_formatted_parent_list(SortedParentList, IndexMap,
+ TotalCalls)
),
@@ -256,8 +260,10 @@
io__write_string(IndexStr),
io__write_string("\n"),
- output_formatted_child_list(ChildList, IndexMap),
- output_formatted_cycle_child_list(CycleChildList, IndexMap),
+ { list__sort(ChildList, SortedChildList) },
+ output_formatted_child_list(SortedChildList, IndexMap),
+ { list__sort(CycleChildList, SortedCycleChildList) },
+ output_formatted_cycle_child_list(SortedCycleChildList, IndexMap),
(
{ SelfCalls \= 0 }
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list