[PATCH] D116780: [memprof] Move the meminfo block struct to MemProfData.inc.

Snehasish Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 6 17:41:59 PST 2022


snehasish created this revision.
snehasish added reviewers: tejohnson, davidxl.
snehasish requested review of this revision.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116780

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116780.398019.patch
Type: text/x-patch
Size: 25895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220107/b80a8a38/attachment.bin>


More information about the llvm-commits mailing list