[m-rev.] for post-commit review: verbose_make_N_part_msg

Peter Wang novalazy at gmail.com
Tue Jul 11 14:22:39 AEST 2023


On Wed, 28 Jun 2023 23:15:12 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> Add verbose_make_N_part_msg predicates.
> 
> compiler/make.util.m:
>     Add verbose_make_N_part_msg predicates, and the more general
>     option_set_make_N_part_msg predicates, to allow simpler code
>     to construct progress and informational messages.
> 
>     Pass to debug_make_msg a message *generator*, instead of a predicate
>     that *writes out* a message. Make debug_make_msg return the message
>     (if debug_make is enabled) to be written out (hopefully) to an explicitly
>     specified stream.
> 
> compiler/make.dependencies.m:
>     Rename the dependency_status predicate to get_dependency_status.
>     Make it return the original dependency_file, and the filename it
>     corresponds to, alongside the status, because this is the simplest
>     way to avoid requiring its callers to reconstruct that information
>     after their calls to get_dependency_status.

Unfortunately this change forces get_dependency_status to incur a call
to get_make_target_file_name, even when the dependency status can be
looked up from the hash table.

This causes a large performance regresssion in mmc --make. A do-nothing
build of Prince on my machine goes from ~0.55 secs to ~3.0 seconds.

How should we fix it? When the dep status is up-to-date, we could just
return a dummy TargetFileName on the assumption that the caller will
throw it away, although that is obviously not the cleanest fix.

Peter


More information about the reviews mailing list