[m-rev.] for review: add value-threshold of top procedures to deep profiler.
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Sep 25 11:07:20 AEST 2007
On Mon, 24 Sep 2007, Paul Bone wrote:
> Estimated hours taken: 1.5
> Branches: main
>
> Changes to the deep profiler: Added ability to select top procedures based on
> a raw threshold rather than a percentage.
I suggest rewording that as:
Add the ability to select top procedures in the deep profiling
tool based on a raw threshold rather than a percentage.
Also, briefly mention the motivation for this change.
> I've added new links in the main
> screen of the mdprof_cgi program demonstrating this feature.
demonstrating?
I suggest:
Add links to the top-level scren of the deep profiler for
accessing this feature.
> deep_profiler/interface.m
> Added extra value for display_limit type, threshold_value to represent this
> new value-based threshold of procedures.
> Also altered string conversion functions for limits to include this new
Alter the string conversion functions for ...
> value and ensure it's disambiguated against existing values.
... and ensure it is distinct from existing values.
> deep_profiler/query.m:
> Added links to main screen to access reports using this feature. Default
> thresholds have been chosen, if anyone has better values to choose for
> these than the ones I have please let me know.
>
> deep_profiler/top_procs.m:
> Altered find_top_procs to accept this limit and properly remove procedures
> from it's output not matching it.
this limit == the new threshold?
> Created new clauses to find sort predicates for the new value.
> Created new clauses to find threshold predicates for the new value.
> Created new threshold predicates to select rows that are above the
> threshold.
I suggest replacing those last three with:
...
> Index: deep_profiler/interface.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/interface.m,v
> retrieving revision 1.17
> diff -u -r1.17 interface.m
> --- deep_profiler/interface.m 2 Apr 2007 02:42:32 -0000 1.17
> +++ deep_profiler/interface.m 24 Sep 2007 12:34:27 -0000
> @@ -167,9 +167,13 @@
> % rank_range(M, N): display procedures with rank M to N,
> % both inclusive.
>
> - ; threshold(float).
> + ; threshold(float)
I suggest renaming that constructor threshold_percent.
> % threshold(Percent): display procedures whose cost is at least
> % Percent% of the whole program's cost.
> +
> + ; threshold_value(float).
> + % threshold_value(Value): display procedures whose cost is at least
> + % this value.
>
> :- type preferences_indication
> ---> given_pref(preferences)
...
> Index: deep_profiler/query.m
> ===================================================================
> RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/query.m,v
> retrieving revision 1.16
> diff -u -r1.16 query.m
> --- deep_profiler/query.m 2 Apr 2007 06:10:43 -0000 1.16
> +++ deep_profiler/query.m 24 Sep 2007 12:34:30 -0000
> @@ -49,6 +49,7 @@
> :- import_module string.
> :- import_module univ.
> :- import_module unit.
> +:- import_module float.
Please keep this list of module imports in alphabetical order.
...
> @@ -390,7 +391,13 @@
> menu_item(Deep, Pref,
> deep_cmd_top_procs(threshold(1.0), cost_time, self_and_desc,
> overall),
> - "Procedures above 1% threshold: time, self+descendants.")
> + "Procedures above 1% threshold: time, self+descendants.") ++
> + "<li>\n" ++
> + menu_item(Deep, Pref,
> + deep_cmd_top_procs(threshold_value(100.0), cost_time,
> + self_and_desc, overall),
> + "Procedures above 1 second threshold: " ++
> + "time, self+descendants.")
> ;
> ""
> ) ++
> @@ -406,6 +413,13 @@
> ++
> "<li>\n" ++
> menu_item(Deep, Pref,
> + deep_cmd_top_procs(threshold_value(1000000.0), cost_callseqs,
> + self_and_desc, overall),
> + "Procedures above 1,000,000 callseqs threshold: callseqs, " ++
> + "self+descendants.")
> + ++
> + "<li>\n" ++
> + menu_item(Deep, Pref,
> deep_cmd_top_procs(threshold(0.1), cost_words, self, overall),
> "Procedures above 0.1% threshold: words, self.") ++
> "<li>\n" ++
> @@ -414,6 +428,13 @@
> overall),
> "Procedures above 1% threshold: words, self+descendants.")
> ++
> + "<li>\n" ++
> + % This is 2M words or 8MB on ia32
Why is that relevant? You should however mention that 2M words is
an arbitrary threshold.
> + menu_item(Deep, Pref,
> + deep_cmd_top_procs(threshold_value(float(1024 * 1024 * 2)),
> + cost_words, self_and_desc, overall),
> + "Procedures above 2M words threshold: words, self+descendants.")
> + ++
Julien.
--------------------------------------------------------------------------
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