[all-commits] [llvm/llvm-project] f88c91: [memprof] Add a new constructor to MemProfReader (...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Wed Nov 20 08:36:17 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f88c913f8aa1c2bb8e8636ccd9defcb7755a8a40
      https://github.com/llvm/llvm-project/commit/f88c913f8aa1c2bb8e8636ccd9defcb7755a8a40
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-11-20 (Wed, 20 Nov 2024)

  Changed paths:
    M llvm/include/llvm/ProfileData/MemProfReader.h
    M llvm/unittests/ProfileData/MemProfTest.cpp

  Log Message:
  -----------
  [memprof] Add a new constructor to MemProfReader (NFC) (#116918)

This patch adds a new constructor to MemProfReader that takes
IndexedMemProfData, a complete package of MemProf profile.  To
showcase its usage, I'm updating one of the unit tests to use the new
constructor.

Because of type mismatches between DenseMap and MapVector, I'm copying
Frames and CallStacks for now.  Once we remove the methods and old
constructors that take or return individual components (frames, call
stacks, and records), we will drop the copying, and the new
constructor will collapse down to:

  MemProfReader(IndexedMemProfData MemProfData)
    : MemProfData(std::move(MemProfData)) {}

Since nobody in the LLVM codebase uses the constructor that takes the
three indivdual components, I'm deprecating the old constructor.



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