[all-commits] [llvm/llvm-project] 830696: [memprof] Move the meminfo block struct to MemProf...

Snehasish Kumar via All-commits all-commits at lists.llvm.org
Mon Jan 31 15:08:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8306968b592d942cc49bde2e387061e673a9fbb7
      https://github.com/llvm/llvm-project/commit/8306968b592d942cc49bde2e387061e673a9fbb7
  Author: Snehasish Kumar <snehasishk at google.com>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M compiler-rt/include/profile/MemProfData.inc
    M compiler-rt/lib/memprof/memprof_allocator.cpp
    R compiler-rt/lib/memprof/memprof_meminfoblock.h
    M compiler-rt/lib/memprof/memprof_mibmap.cpp
    M compiler-rt/lib/memprof/memprof_mibmap.h
    M compiler-rt/lib/memprof/memprof_rawprofile.cpp
    M compiler-rt/lib/memprof/tests/rawprofile.cpp
    M llvm/include/llvm/ProfileData/MemProfData.inc

  Log Message:
  -----------
  [memprof] Move the meminfo block struct to MemProfData.inc.

The definition of the MemInfoBlock is shared between the memprof
compiler-rt runtime and llvm/lib/ProfileData/. This change removes the
memprof_meminfoblock header and moves the struct to the shared include
file. To enable this sharing, the Print method is moved to the
memprof_allocator (the only place it is used) and the remaining uses are
updated to refer to the MemInfoBlock defined in the MemProfData.inc
file.

Also a couple of other minor changes which improve usability of the
types in MemProfData.inc.
* Update the PACKED macro to handle commas.
* Add constructors and equality operators.
* Don't initialize the buildid field.

Differential Revision: https://reviews.llvm.org/D116780




More information about the All-commits mailing list