Diff for profiler
Peter David ROSS
petdr at students.cs.mu.oz.au
Wed Mar 12 10:48:21 AEDT 1997
A small diff for the profiler that changes the flat profile to display
the number of microseconds per call instead of milliseconds per call.
Index: output.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/profiler/output.m,v
retrieving revision 1.12
diff -u -r1.12 output.m
--- output.m 1996/07/16 09:07:14 1.12
+++ output.m 1997/03/11 23:45:36
@@ -72,14 +72,15 @@
io__write_string("descendents\n"),
io__write_string("\tthe number of seconds spent executing the\n"),
- io__write_string("\tdescendents of the current predicate.\n\n"),
+ io__write_string("\tcurrent predicate and its descendents.\n\n"),
io__write_string("called\tthe number of times the current predicate is\n"),
io__write_string("\tcalled (not counting self recursive calls).\n\n"),
io__write_string("self\tthe number of self recursive calls.\n\n"),
- io__write_string("name\tthe name of the current predicate.\n\n"),
+ io__write_string("name\tthe name of the current predicate, and whether\n"),
+ io__write_string("it is a member of a cycle.\n\n"),
io__write_string("index\ta index number to locate the function easily.\n\n\n\n"),
@@ -95,7 +96,7 @@
io__write_string("called*\tthe number of times the current predicate is called\n"),
io__write_string("\tby this parent.\n\n"),
- io__write_string("total\tthe number of times this predicate is called by its parents.\n\n"),
+ io__write_string("total\tthe number of times this predicate is called.\n\n"),
io__write_string("parents\tthe name of this parent.\n\n"),
@@ -121,6 +122,8 @@
io__write_string("index\tthe index number of the child.\n\n"),
+ io__write_string("\t* these fields are omitted for parents (or children)\n"),
+ io__write_string("\tin the same cycle as the predicate.\n\n"),
io__write_string(" called/total"),
@@ -328,18 +331,18 @@
io__write_string("calls\tthe number of times this predicate was called.\n\n"),
- io__write_string(" self\tthe average number of milliseconds spent in\n"),
- io__write_string("ms/call\tthis predicate per call.\n\n"),
+ io__write_string(" self\tthe average number of microseconds spent in\n"),
+ io__write_string("us/call\tthis predicate per call.\n\n"),
- io__write_string(" total\tthe average number of milliseconds spent in this predicate and its\n"),
- io__write_string("ms/call\tdescendents per call.\n\n"),
+ io__write_string(" total\tthe average number of microseconds spent in this predicate and its\n"),
+ io__write_string("us/call\tdescendents per call.\n\n"),
io__write_string("name\tthe name of the predicate followed by its index number.\n\n"),
io__write_string(" % cumulative self self"),
io__write_string(" total\n"),
- io__write_string(" time seconds seconds calls ms/call"),
- io__write_string(" ms/call name\n").
+ io__write_string(" time seconds seconds calls us/call"),
+ io__write_string(" us/call name\n").
:- pred output__flat_profile(list(string), float, map(string, output_prof),
@@ -376,8 +379,8 @@
builtin_float_plus(Self, CumTime0, CumTime),
checked_float_divide(Self, FloatTotalCalls, Self1),
checked_float_divide(Descendant, FloatTotalCalls, Desc1),
- builtin_float_times(1000.0, Self1, SelfMs),
- builtin_float_times(1000.0, Desc1, DescMs),
+ builtin_float_times(1000000.0, Self1, SelfUs),
+ builtin_float_times(1000000.0, Desc1, DescUs),
output__construct_name(Name, CycleNum, FullName),
string__int_to_string(Index, IndexStr0),
@@ -385,7 +388,7 @@
string__format("%5.1f %10.2f %8.2f %8d %8.2f %8.2f %s %s\n",
[ f(Percentage), f(CumTime),
f(Self), i(Calls),
- f(SelfMs), f(DescMs),
+ f(SelfUs), f(DescUs),
s(FullName), s(IndexStr)
],
String)
--
+-----------------------------------------------------------------+
| Peter Ross Sci/Eng Melbourne Uni |
| email: petdr at cs.mu.oz.au WWW: http://www.cs.mu.oz.au/~petdr) |
+-----------------------------------------------------------------+
More information about the developers
mailing list