Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Somogyi
baf1395d7d Disable the two new caches in make.deps_cache.m.
They turned out to have a zero hit rate, making them useless.

compiler/make.dependencies.m:
    Add code to use the two new caches, indirect_imports_non_intermod
    and anc0_dir1_indir2_non_intermod. I got statistics on their
    performance while they were enabled, but since their hit rate was zero,
    this diff includes them only in a commented-out form.

    Note that adding the second cache required adding a new dep_spec,
    which remains, since it shouldn't affect performance at all.

compiler/make.deps_cache.m:
    Disable the those two caches.

    Fix an issue where the original statistics-gathering code
    mixed up hits and misses.

    Include the statistics gathered in course of implementing this diff.

tools/make_deps_cache_stats:
    Update this script to fix the hit/miss issue, and to print more info.
2023-10-16 16:03:06 +11:00
Zoltan Somogyi
0c59ce923c Gather statistics about make.deps_cache.m.
compiler/make.deps_cache.m:
    Add conditionally-compiled code to count the search and addition
    operations on each cache, as well as code to write out these counts.

    Where a cache has two versions, one for intermod and non-intermod
    operations, put the non-intermod version first, since it is more basic.

    Add two new non-intermod cache versions that are not used yet,
    but whose intermod versions are used: one for non-intermod
    indirect imports, and one for non-intermod anc0_dir1_indir2.
    For the latter, include "intermod" in the name of the old cache,
    which uses intermodule information.

compiler/make.make_info.m:
    Add those two caches, and follow the updated order and names of the caches.

compiler/mercury_compile_main.m:
    Call make.deps_cache.m to dump out its cache, it it was enabled
    and gathered any info.

compiler/make.m:
    Make make.deps_cache.m visible from outside the make package,
    in order to make possible the change top mercury_compile_main.m above.

compiler/make.dependencies.m:
    Conform to the changes above.

tools/make_deps_cache_stats:
    A new script to summarize the information recorded by the new code.
2023-10-15 12:36:47 +11:00