Add compile-time max RSS reporting support#373
Open
tomershafir wants to merge 1 commit intollvm:mainfrom
Open
Conversation
This patch adds basic compile/link time max RSS reporting to llvm-test-suite. Memory usage is an important metric for users, and thus also for LLVM developer to better understand the compile/link time impact of a compiler change. Memory usage and its measurement in general can get very complex and platform specific. A simple but still useful aggregate is max working set size. It is reported by `getrusage()` on Apple platforms and Linux, which are the scope of this patch. Even though `getrusage()` is a POSIX API, the `maxrss` part of it is not and is platform dependent. Support for other platforms can be added later. There is already an orthogonal reporting capabily by https://llvm-compile-time-tracker.com/ but adding this capability to llvm-test-suite can offer more programmability and integration opportunities. Bottom-up implementation: - Add a new `--report-maxrss` option to `timeit` which collects `maxrss` for the supported platforms from `getrusage()` and writes it to the summary file or the non-POSIX terminal - Add LIT bindings for `maxrss` read from output to `litsupport/modules/timeit.py` - Add max-based aggregation for `maxrss` to `litsupport/modules/compiletime.py` - Add a CMake option `TEST_SUITE_REPORT_COMPILE_MAXRSS` that is only active under `TEST_SUITE_COLLECT_COMPILE_TIME`
Contributor
Author
|
Ping @nikic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds basic compile/link time max RSS reporting to llvm-test-suite. Memory usage is an important metric for users, and thus also for LLVM developer to better understand the compile/link time impact of a compiler change.
Memory usage and its measurement in general can get very complex and platform specific. A simple but still useful aggregate is max working set size. It is reported by
getrusage()on Apple platforms and Linux, which are the scope of this patch. Even thoughgetrusage()is a POSIX API, themaxrsspart of it is not and is platform dependent. Support for other platforms can be added later.There is already an orthogonal reporting capabily by https://llvm-compile-time-tracker.com/ but adding this capability to llvm-test-suite can offer more programmability and integration opportunities.
Bottom-up implementation:
--report-maxrssoption totimeitwhich collectsmaxrssfor the supported platforms fromgetrusage()and writes it to the summary file or the non-POSIX terminalmaxrssread from output tolitsupport/modules/timeit.pymaxrsstolitsupport/modules/compiletime.pyTEST_SUITE_REPORT_COMPILE_MAXRSSthat is only active underTEST_SUITE_COLLECT_COMPILE_TIME