[llvm-profgen] Deduplicate PID when processing perf input
authorWenlei He <wenlei@fb.com>
Fri, 8 Oct 2021 04:27:17 +0000 (21:27 -0700)
committerWenlei He <wenlei@fb.com>
Sun, 10 Oct 2021 20:30:17 +0000 (13:30 -0700)
commitda4e5fc86158c669ddcb335d151fffd7c6e2ed4b
tree26da875ae2c1fcc436262896bb3e4956c0c0f1f6
parentb07ea8a967c5e77b42eeac9307fa006b7df87ca4
[llvm-profgen] Deduplicate PID when processing perf input

When parsing mmap to retrieve PID, deduplicate them before passing PID list to perf script. Perf script would error out when there's duplicated PID in the input, however raw perf data may main duplicated PID for large binary where more than one mmap is needed to load executable segment.

Differential Revision: https://reviews.llvm.org/D111384
llvm/tools/llvm-profgen/PerfReader.cpp