[m-rev.] for post-commit review: --deep-std-name

Peter Wang novalazy at gmail.com
Mon Oct 14 10:53:57 AEDT 2024


On Mon, 14 Oct 2024 00:08:26 +1100 Julien Fischer <jfischer at opturion.com> wrote:
> On Sun, 13 Oct 2024 at 19:47, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> 
> > Add --deep-std-name option to control deep prof file names.
> >
> > When this new runtime option is specified, the runtime system will use
> > Deep.{data,procrep} as the names of the files it writes out.
> >
> > runtime/mercury_engine.h:
> >     Add a flag to the engine that records whether this option has been
> >     specified or not.
> >
> > runtime/mercury_wrapper.c:
> >     Set the flag if/when we see the --deep-std-name option.
> >
> > runtime/mercury_deep_profiling.c:
> >     If the new flag is set, use Deep.{data,procrep} as filenames.
> >
> > doc/user_guide.texi:
> >     Document the new option.
> >
> > tools/bootcheck:
> >     Specify the new option for bootchecks.
> >
> > tests/debugger/Mmakefile:
> > tests/declarative_debugger/Mmakefile:
> > tests/hard_coded/Mmakefile:
> > tests/par_conj/Mmakefile:
> > tests/stm/Mmakefile:
> >     When specifying a value of MERCURY_OPTIONS that overrides the value
> >     set by tools/bootcheck, include --deep-std-name in that value.
> 
> That looks fine.

Thanks for that. I actually find the old behaviour more useful in my
usage. If I'm looking at a profile in the browser, I can do another
program run, click on [Quit], then Back and Refresh in the browser to
view the new profile immediately, without changing the URL.
(It would be nice to have a [Reload] command, but this works.)


Here is a proposed update to the NEWS file, for review:

diff --git a/NEWS.md b/NEWS.md
index f9b7d4a13..0d6d476ce 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1404,14 +1404,17 @@ Changes to the Mercury debugger
   on the left hand side of the screen.

 Changes to the Mercury deep profiler
--------------------------------
+------------------------------------

-* Programs that have been compiled in a deep profiling grade will now
-  put profiling data in files whose names contain both the name of the program
-  being profiled, and the date and time of the profiling run. So instead
-  of Deep.data and Deep.procrep, the output will go into files whose names
-  have the form <prog>_on_<date>_at_<time>.data and
-  <prog>_on_<date>_at_<time>.procrep.
+* Programs that have been compiled in a deep profiling grade will now,
+  by default, put profiling data in files whose names contain both the name
+  of the program being profiled, and the date and time of the profiling run.
+  The file names will have the form `<prog>_on_<date>_at_<time>.data` and
+  `<prog>_on_<date>_at_<time>.procrep`.
+
+  To get the old behaviour, pass the runtime option `--deep-std-name` via the
+  `MERCURY_OPTIONS` environment variable. This will put the profiling data
+  in files named `Deep.data` and `Deep.procrep`.

 Changes to the Mercury implementation
 -------------------------------------

Peter


More information about the reviews mailing list