Commit Graph

2 Commits

Author SHA1 Message Date
Todd Fiala 2cd84c905d added Linux support for test timeout sampling
This is the Linux counterpart to the sampling support I added
on the macOS side.

This change also introduces zip-file compression if the size of
the sample output is greater than 10 KB.  The Linux side can be
quite large and the textual content is averaging over a 10x
compression factor on tests that I force to time out.  When
compression takes place, the filename becomes:

    {session_dir}/{TestFilename.py}-{pid}.sample.zip

This support relies on the linux 'perf' tool.  If it isn't
present, the behavior is to ignore pre-kill processing of
the timed out test process.

Note calling the perf tool under the timeout command appears
to nuke the profiled process.  This was causing the timeout
kill logic to fail due to the process having disappeared.
I modified the kill logic to catch the case of the process
not existing, and I have it ignore the kill request in that
case.  Any other exception is still raised.

Reviewers: labath

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D24890

llvm-svn: 282436
2016-09-26 20:25:47 +00:00
Todd Fiala 72525622b2 add hook for calling platform-dependent pre-kill action on a timed out test
differential review: https://reviews.llvm.org/D24850

reviewers: clayborg, labath
llvm-svn: 282258
2016-09-23 16:10:01 +00:00