skia2/dm
Mike Klein c7278ad1d9 register SIGTERM handler in DM
This should make it clear when we are terminated, and print out our
memory usage on the way out the door.

There's no way to register a handler for SIGKILL, so if we're being cut
down that way, we'll have to restructure DM quite a bit internally to
spawn processes instead of threads.  The parent process should be able
to at least notice that child processes have been SIGKILL'd.

(This would be nice anyway, so one crash doesn't ruin our whole run.)

Here's a demo with a slightly hacked up DM to make the demo easy:

    ~/skia (sig↑1|✔) $ ninja -C out dm; and out/dm
    ninja: Entering directory `out'
    [2/2] link dm
    my pid is 65360

    We have been politely asked to die by Terminated: 15 (15).
    Currently using 11MB RAM, peak 11MB.
    fish: 'and out/dm' terminated by signal SIGTERM (Polite quit request)

Bug: skia:7614

Change-Id: Ie43be78fa766433a9d7cf391d78801d4355e635c
Reviewed-on: https://skia-review.googlesource.com/107720
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-02-16 15:46:36 +00:00
..
DM.cpp register SIGTERM handler in DM 2018-02-16 15:46:36 +00:00
DMFontMgr.cpp DM: hide DM:FontMgr behind a factory 2017-11-14 16:24:44 +00:00
DMFontMgr.h DM: hide DM:FontMgr behind a factory 2017-11-14 16:24:44 +00:00
DMGpuSupport.h Drop support for OSMesa in test tools and remove build bot 2017-11-13 16:20:10 +00:00
DMGpuTestProcs.cpp Use GrContextFactories that produce a single GrContext in unit tests. 2017-11-15 22:03:07 +00:00
DMJsonWriter.cpp Move SkOSPath out of include/core. 2016-11-08 20:20:15 +00:00
DMJsonWriter.h Add gamma_correct option field to dm.json 2016-02-29 07:38:01 -08:00
DMSrcSink.cpp move a bunch of helpers from SkImageInfo.h into priv 2018-02-09 20:38:32 +00:00
DMSrcSink.h Revert "Revert "Revert "Revert "Revert "Revert "Redefine the meaning of sample counts in GPU backend."""""" 2018-02-03 01:59:59 +00:00