This is an archive of the discontinued LLVM Phabricator instance.

[analyzer][tests] Measure peak memory consumption for every project
ClosedPublic

Authored by vsavchenko on Jul 1 2020, 7:51 AM.

Diff Detail

Event Timeline

vsavchenko created this revision.Jul 1 2020, 7:51 AM
NoQ added inline comments.Jul 1 2020, 2:38 PM
clang/utils/analyzer/SATestUtils.py
113

Do i understand correctly that this basically adds roughly 0.25 second delay to every invocation of the analyzer? If so, that may add up to a lot of seconds for a project with many small translation units which can potentially screw our wall clock measurements. I guess the ideal solution would be some sort of "select" that waits on process termination with timeout, or we could simply decrease the sleep interval and hope it won't consume too much cpu time.

clang/utils/analyzer/requirements.txt
2–3

Dunno, should we bother putting every utility into its own directory with its own requirements? Like, exploded-graph-rewriter.py certainly has different requirements.

vsavchenko marked 2 inline comments as done.Jul 1 2020, 11:02 PM
vsavchenko added inline comments.
clang/utils/analyzer/SATestUtils.py
113

Not really, the process starts when we call Popen and instead of waiting for it to finish like check_call does, we poll the memory.

Another point (even though it is not very useful information in the context of my previous statement) is that this happens on every scan-build invocation and not for every clang invocation.

clang/utils/analyzer/requirements.txt
2–3

Maybe we should simply put it here as well?

NoQ accepted this revision.Jul 2 2020, 4:38 PM
NoQ added inline comments.
clang/utils/analyzer/SATestUtils.py
113

Oh right!

clang/utils/analyzer/requirements.txt
2–3

Maybe. Dunno, you're the boss!

This revision is now accepted and ready to land.Jul 2 2020, 4:38 PM

Add matplotlib and graphviz to requirements.txt

This revision was automatically updated to reflect the committed changes.