The functions sys::ExcecuteAndWait and sys::Wait now have additional
argument of type pointer to structure, which is filled with process
execution statistics upon process termination. These are total and user
execution times and peak memory consumption. By default this argument is
nullptr so existing users of these function must not change behavior.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Support/Program.h | ||
---|---|---|
60 | I would go for a uint64_t because it's shorter to read (and to parse for the preprocessor), but that's my personal preference. | |
63 | I don't think you need clear(), as stated below. | |
69 | This screams for Optional, see D78903. | |
llvm/lib/Support/Unix/Program.inc | ||
356 | ProcStat is not cleared here, in case of an early exit. | |
llvm/lib/Support/Windows/Program.inc | ||
407 | You can simply say: *ProcStat = {}; |
Updated patch
- Use Optional<> to keep ProcessStatistics,
- Added missing clear,
- Added unit test.
llvm/lib/Support/Unix/Program.inc | ||
---|---|---|
364 | Noting here that the functionality in not available on AIX via this BSD interface. Are there plans to increase dependency on this functionality? As it is, our builds are broken. |
llvm/include/llvm/Support/Program.h | ||
---|---|---|
60 | @sepavloff, I've added the comment to rGc498780526ebc07f6ba589067a65ce86a4eb2207. |
llvm/include/llvm/Support/Program.h | ||
---|---|---|
60 | Thank you! |
I would go for a uint64_t because it's shorter to read (and to parse for the preprocessor), but that's my personal preference.