[PATCH] D151020: [llvm-exegesis] Add ability to assign perf counters to specific PID
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 03:40:15 PDT 2023
mstorsjo added a comment.
This broke compilation for mingw targets (in particular, for 64 bit targets - the issue seems to be benign for 32 bit targets). For those targets, compilation fails with this error:
/home/martin/code/llvm-project/llvm/tools/llvm-exegesis/lib/PerfHelper.h:27:13: error: typedef redefinition with different types ('int' vs '_pid_t' (aka 'long long'))
27 | typedef int pid_t;
| ^
/home/martin/clang-nightly/aarch64-w64-mingw32/include/sys/types.h:68:16: note: previous definition is here
68 | typedef _pid_t pid_t;
| ^
1 error generated.
(For 32 bit targets, there's no mismatch between int and long long so it doesn't error out.)
`HAVE_LIBPFM` isn't a good guard for whether we need to define `pid_t` ourselves, since we can't know whether a transitively included header has defined this type regardless of libpfm. From looking around in e.g. lldb sources, `pid_t` is probably generally available for all targets except for Windows/MSVC (while mingw does have it).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151020/new/
https://reviews.llvm.org/D151020
More information about the llvm-commits
mailing list