blob: 59b40852c87241415e750529e37876798f567398 [file] [log] [blame]
mtklein30bf3e22014-06-03 13:57:14 -07001DM is like GM, but multithreaded. It doesn't do everything GM does.
mtklein@google.comd36522d2013-10-16 13:02:15 +00002
3DM's design is based around Tasks and a TaskRunner.
4
5A Task represents an independent unit of work that might fail. We make a task
6for each GM/configuration pair we want to run. Tasks can kick off new tasks
7themselves. For example, a CpuTask can kick off a ReplayTask to make sure
8recording and playing back an SkPicture gives the same result as direct
9rendering.
10
11The TaskRunner runs all tasks on one of two threadpools, whose sizes are
12configurable by --cpuThreads and --gpuThreads. Ideally we'd run these on a
13single threadpool but it can swamp the GPU if we shove too much work into it at
14once. --cpuThreads defaults to the number of cores on the machine.
15--gpuThreads defaults to 1, but you may find 2 or 4 runs a little faster.
16
17So the main flow of DM is:
18
19 for each GM:
20 for each configuration:
21 kick off a new task
22 < tasks run, maybe fail, and maybe kick off new tasks >
23 wait for all tasks to finish
24 report failures
25