[all-commits] [llvm/llvm-project] 8836d6: [MemProf] Optionally discard small non-cold contex...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Fri May 9 15:57:16 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8836d68a0d5cac03b975057417936fe18cb9ccb1
      https://github.com/llvm/llvm-project/commit/8836d68a0d5cac03b975057417936fe18cb9ccb1
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2025-05-09 (Fri, 09 May 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryProfileInfo.h
    M llvm/lib/Analysis/MemoryProfileInfo.cpp
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
    A llvm/test/Transforms/PGOProfile/memprof_discard_threshold.ll

  Log Message:
  -----------
  [MemProf] Optionally discard small non-cold contexts (#139113)

Adds a new option -memprof-callsite-cold-threshold that allows
specifying a percent that will cause non-cold contexts to be discarded
if the percent cold bytes at a callsite including that context exceeds
the given threshold. Default is 100% (no discarding).

This reduces the amount of cloning needed to expose cold allocation
contexts when parts of the context are dominantly cold.

This motivated the change in PR138792, since discarding a context might
require a different decision about which not-cold contexts must be kept
to expose cloning requirements, so we need to determine that on the fly.

Additionally, this required a change to include the context size
information in the alloc trie in more cases, so we now guard the
inclusion of this information in the generated metadata on the option
values.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list