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