[m-rev.] for post-commit review: proc commands via reports

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Aug 18 11:48:30 AEST 2008

For review by Paul. The diff for display_report.m is bigger than the file
itself, so the file would be easier to review.


Implement the proc command of the deep profiler using the report mechanism.

Some of the detailed changes also address Paul's post-commit review of my
previous diff.

	Define the representation of the proc report.

	Change some names to be more consistent.

	Add a type for use in report.m.

	Document the fields of an existing type.

	Add code to create proc reports.

	Change some names to be more consistent.

	Fix a bug: avoid divide by zero exceptions in some rare cases.

deep_profiler/measurement units.m:
	Fix a bug: avoid divide by zero exceptions in some rare cases.

	Add the code for converting proc reports to displays. This required
	rewriting almost everthing in this module to remove the assumption,
	which was previously embedded in many places, that the code is part
	of the implementation of the top_procs command. The new code is
	separated into two parts; the command-specific parts, and the parts
	that should be usable for all commands. (The reusable part is much

	Expand the display representation to allow the specification of

	- plain text as distinguished from headings
	- paragraph breaks
	- pseudo-links, i.e. text fragments that are formatted like links
	- table separator rows
	- table cells that span more than one column

	which are used in the new version of display_report.m.

	Simplify the mechanism for setting up table header groups.

	Handle the changes in display.m.

	Fix some anomalies in the formatting of lists and tables.

	Group related code together.

	Provide a switch for selecting which of the two mechanisms,
	the old direct generation of HTML or the new indirect generation
	through the report and display structures, should generate the HTML
	page for a command that both mechanisms can implement. The default
	is the new mechanism, but it can be overridden by implementors
	by creating a file called "/tmp/old_deep_profiler".

	Switch the default handling of the proc command over to the new

	Rename some types and function symbols to make them more consistent
	and expressive.

	Generate more informative error messages for domain error exceptions.

	Add a mechanism for decoding the links in the generated pages.
	The mechanism takes the form of three new options: --decode,
	--decode-cmd, and --decode-prefs. When one or more of these are given,
	mdprof_cgi will not do its usual stuff, instead of just loops waiting
	for lines whose contents it will then try to decode as queries,
	as commands and/or as preferences.

	Try to postpone thrashing in the deep compiler when compiled in
	debug grades, by compiling their contents with shallow tracing.

	Make shallow tracing effective by moving the deep recursions
	into non-exported predicates.

	Convert the debugging code to use trace goals.

	Convert the debugging code to use trace goals.

	Use more expressive names for lots of variables.

	In read_profile.m, avoid an unnecessary repackaging of data.

	Fix some grammar errors in a comment, and comment some code to use
	state variables.

	Fix some grammar errors in a comment.

	Change some variable names to be consistent with the other modules.

	Make the messages in the domain errors we throw more expressive.

	Minor style changes.
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