[m-rev.] diff: Update deep profiler documentation.
pbone at csse.unimelb.edu.au
Wed Jan 7 13:54:03 AEDT 2009
Estimated hours taken: 1
Update deep profiling documentation: include information regarding the
coverage profiling parts of the deep profiling structures, the new modules
added to the deep profiler directory and the new query pipeline.
RCS file: /home/mercury1/repository/mercury/deep_profiler/notes/deep_profiling.html,v
retrieving revision 1.3
diff -u -p -b -r1.3 deep_profiling.html
--- deep_profiler/notes/deep_profiling.html 25 Apr 2005 07:55:58 -0000 1.3
+++ deep_profiler/notes/deep_profiling.html 7 Jan 2009 02:49:18 -0000
@@ -128,6 +128,15 @@ it contains an array of the node ids of
The MR_ps_outermost_activation_ptr and MR_ps_activation_count fields
are used only during runtime, and are omitted
when the ProcDynamic node is written out to the Deep.data file.
+the number of coverage points compiled into this procedure.
+an array containing static data information each of the coverage points.
+an array containing coverage point counts for each of the coverage points.
@@ -214,7 +223,7 @@ It is passed,
in the environment variable QUERY_STRING which is set by the web server,
an URL component containing the name of a profiling data file
and a query specifying which part of that data file is to be displayed.
-Mdprof_cgi checks whether a server process already exists
+mdprof_cgi checks whether a server process already exists
for the given profiling data file.
If the answer is yes, it passes the query to the server,
gets back the reply, gives it to the web server, and exits.
@@ -260,7 +269,7 @@ whose names include a mangled form of th
The existence of these files serves as an approximation of a lock;
the idea is that they exist if and only if a server process
for that data file is alive and serving queries via those pipes.
-Mdprof_cgi creates a server process for the data file
+mdprof_cgi creates a server process for the data file
if and only if these named pipes do not exist.
They are created only by mdprof_cgi transforms itself into a server,
and destroyed only when this server exits.
@@ -308,6 +317,44 @@ which can leave the client sending its q
+<h2>Pipeline processing of deep profiler queries</h2>
+As described above when the deep profiler starts it reads the deep
+Processing is performed to make it easy to retrieve information from
+this data, this results in a structure called 'deep'.
+When a query arrives further processing is performed in several steps
+before HTML is produced for the user.
+First, create_report generates a report structure from the cmd and
+This report reflects all the information that <i>may</i> be shown to
+The report structure can also be used by other tools such as
+mdprof_feedback to gather information to drive compiler optimisations.
+The report structure can be used by the report_to_display predicate to
+produce a display structure based on the user's display preferences.
+The display structure is a format-neutral representation of the final
+Finally htmlize_display produces HTML output from the display structure.
+To support a new report a developer should add that report to the
+report type and the command for launching it to the cmd type.
+They will need to add support to create_report, report_to_display,
+string_to_maybe_cmd and query_to_string.
+They may need to modify the display structure in order to support
+displaying information of a different type (for instance, a
+differently formatted number).
+They should modify report_to_display for some existing reports to
+create links or buttons that perform the new query.
<h2>The modules of the deep profiler</h2>
@@ -325,6 +372,10 @@ for use in debugging.
This is the main module of a test program for checking that
all the web pages can be created without runtime aborts.
Its output can be gigabytes in size.
+This is the main module of a test program used for reading and displaying the
+byte-code representation of the procedures of a Mercury program.
This module contains utility predicates for handling arrays.
@@ -349,11 +400,31 @@ find the strongly connected components o
This module contains primitives whose parameters are decided by
the configure script. This module picks them up from the #defines
put into runtime/mercury_conf.h by the configure script.
+This module contains code that produces the coverage profiling reports. It also
+infers coverage throughout a procedure based on partial information and
+execution rules for Mercury programs.
+This module contains the create_report predicate which takes a command
+and preprocessed deep profiling data and creates a report
This module provides an ADT for storing dense sets of small integers.
The sets are represented as bit vectors, which are implemented as arrays
of integers. This is used by cliques.m.
+This module defines the display structure.
+This structure represents information to be displayed to the user.
+The information in a display structure is format-neutral.
+This module contains the report_to_display predicate.
+This predicate takes a report structure and produces a display
This module provides a mechanism for dumping out some of the deep profiler's
@@ -365,8 +436,8 @@ which is a mechanism for propagating mea
from regions in the call graph below a given line (the contour) to that line.
-This module contains code that sets the format of the HTML tables
-we generate for individual queries.
+This module contains code that creates HTML output from a display
+structure for use by mdprof_cgi.
This module defines the type of the commands sent from clients to servers,
@@ -379,16 +450,34 @@ This module a set of I/O combinators for
This module defines the data structures
that store deep profiling measurements
and the operations on them.
+This module defines data types and predicates for various units of
+measurement. Including percentages and time.
This file defines the main data structures of the server,
and predicates for accessing them.
+This module provides predicates that operate on program representation
+structures, including formatting such structures as text.
This module contains the top level predicates for servicing individual queries.
This module contains code for reading in a deep profiling data file.
+This module contains the report structure.
+A sub-structure is defined for each type of report that may be
+The report structure represents the information contained in a report
+in a format that is easy to generate, and easy for a computer program
+This module also contains common structures that multiple reports make
This module contains the code
@@ -405,4 +494,8 @@ This module contains code to find the to
This module defines utility predicates for both mdprof_cgi and mdprof_server.
+This module contains predicates for analysing how soon or late a variable is
+used (produced or consumed) by a procedure.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the reviews