graphics_*: monitor memory state after tests.

Move basic functionality from graphics_KernelMemory to graphics_utils.
Instrument all interesting tests with a GSC.
Forward memory statistics to dashboard.

BUG=chromium:408428
TEST=test_that 100.96.58.132 graphics_GLMark2 graphics_GLBench graphics_GpuReset graphics_KernelMemory graphics_SanAngeles graphics_WebGLAquarium graphics_WebGLClear graphics_WebGLManyPlanetsDeep graphics_WebGLPerformance

-----------------------------------------------------------------------------------------------------------------
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2                                             [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                            [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              buffer.columns_200.interleave_false.update-dispersion_0.9.update-fraction_0.5.update-method_map     1.575
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              buffer.columns_200.interleave_false.update-dispersion_0.9.update-fraction_0.5.update-method_subdata 1.404
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              buffer.columns_200.interleave_true.update-dispersion_0.9.update-fraction_0.5.update-method_map      1.414
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              build.use-vbo_false                                                                                 0.618
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              build.use-vbo_true                                                                                  0.536
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              bump.bump-render_height                                                                             0.475
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              bump.bump-render_high-poly                                                                          1.370
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              bump.bump-render_normals                                                                            0.465
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              conditionals.fragment-steps_0.vertex-steps_0                                                        0.551
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              conditionals.fragment-steps_0.vertex-steps_5                                                        0.552
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              conditionals.fragment-steps_5.vertex-steps_0                                                        0.537
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              desktop.blur-radius_5.effect_blur.passes_1.separable_true.windows_4                                 1.626
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              desktop.effect_shadow.windows_4                                                                     0.972
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              effect2d.kernel_0-1-0_1--4-1_0-1-0_                                                                 0.688
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              effect2d.kernel_1-1-1-1-1_1-1-1-1-1_1-1-1-1-1_                                                      1.458
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              function.fragment-complexity_low.fragment-steps_5                                                   0.550
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              function.fragment-complexity_medium.fragment-steps_5                                                0.541
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              gem_objects_bytes                                                                                   17842176
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              gem_objects_objects                                                                                 10
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              glmark2_score                                                                                       1398
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              ideas.speed_duration                                                                                0.634
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              jellyfish.default                                                                                   0.982
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              loop.fragment-loop_false.fragment-steps_5.vertex-steps_5                                            0.550
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              loop.fragment-steps_5.fragment-uniform_false.vertex-steps_5                                         0.550
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              loop.fragment-steps_5.fragment-uniform_true.vertex-steps_5                                          0.542
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              meminfo_MemUsed                                                                                     1631664
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              pulsar.light_false.quads_5.texture_false                                                            0.571
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              refract.default                                                                                     4.808
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              shading.shading_blinn-phong-inf                                                                     0.691
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              shading.shading_cel                                                                                 0.702
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              shading.shading_gouraud                                                                             0.690
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              shading.shading_phong                                                                               0.699
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              shadow.default                                                                                      1.555
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              terrain.default                                                                                     7.194
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              texture.texture-filter_linear                                                                       0.497
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              texture.texture-filter_mipmap                                                                       0.481
/tmp/test_that_results_bdIjAZ/results-01-graphics_GLMark2/graphics_GLMark2                              texture.texture-filter_nearest                                                                      0.496
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench                                             [  FAILED  ]
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench                                               ERROR: Could not get cold machine.
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                            [  FAILED  ]
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              ERROR: Could not get cold machine.
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              gem_objects_bytes                                                                                   17891328
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              gem_objects_objects                                                                                 13
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              meminfo_MemUsed                                                                                     1631792
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-02-graphics_GLBench/graphics_GLBench                              memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench                                             [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                            [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                              gem_objects_bytes                                                                                   17842176
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                              gem_objects_objects                                                                                 10
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                              meminfo_MemUsed                                                                                     1634936
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                              meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                              memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-03-graphics_GLBench/graphics_GLBench                              memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-04-graphics_GpuReset                                            [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-04-graphics_GpuReset/graphics_GpuReset                          [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory                                        [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                  [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                    gem_objects_bytes                                                                                   213901312
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                    gem_objects_objects                                                                                 412
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                    meminfo_MemUsed                                                                                     2068820
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                    meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                    memory_bytes                                                                                        208019456
/tmp/test_that_results_bdIjAZ/results-05-graphics_KernelMemory/graphics_KernelMemory                    memory_objects                                                                                      315
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles                                          [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                      [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        frames_per_sec_rate_san_angeles                                                                     134.7
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        gem_objects_bytes                                                                                   221818880
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        gem_objects_objects                                                                                 432
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        meminfo_MemUsed                                                                                     2076480
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        memory_bytes                                                                                        215937024
/tmp/test_that_results_bdIjAZ/results-06-graphics_SanAngeles/graphics_SanAngeles                        memory_objects                                                                                      335
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium                                       [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  avg_fps_0050_fishes                                                                                 59.4736317249
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  avg_fps_1000_fishes                                                                                 58.9920386175
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  avg_render_time_0050_fishes                                                                         0.00307254785938
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  avg_render_time_1000_fishes                                                                         0.0063975173696
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  gem_objects_bytes                                                                                   17891328
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  gem_objects_objects                                                                                 13
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  meminfo_MemUsed                                                                                     1658712
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-07-graphics_WebGLAquarium/graphics_WebGLAquarium                  memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear                                          [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                      [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        avg_fps                                                                                             60
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        gem_objects_bytes                                                                                   17891328
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        gem_objects_objects                                                                                 13
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        meminfo_MemUsed                                                                                     1650676
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-08-graphics_WebGLClear/graphics_WebGLClear                        memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep                                [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep  [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    average_fps                                                                                         59.8214285714
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    gem_objects_bytes                                                                                   17891328
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    gem_objects_objects                                                                                 13
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    js_render_time_ms_mean                                                                              1.36681974742
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    js_render_time_ms_std                                                                               0.489031342632
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    meminfo_MemUsed                                                                                     1661920
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    per_frame_dt_ms_mean                                                                                16.7164179104
/tmp/test_that_results_bdIjAZ/results-09-graphics_WebGLManyPlanetsDeep/graphics_WebGLManyPlanetsDeep    per_frame_dt_ms_std                                                                                 0.61548635141
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance                                    [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance          [  PASSED  ]
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            gem_objects_bytes                                                                                   17891328
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            gem_objects_objects                                                                                 13
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            meminfo_MemUsed                                                                                     1652664
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            meminfo_SwapUsed                                                                                    15576
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            memory_bytes                                                                                        17842176
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            memory_objects                                                                                      10
/tmp/test_that_results_bdIjAZ/results-10-graphics_WebGLPerformance/graphics_WebGLPerformance            time_ms_geom_mean                                                                                   11.48
-----------------------------------------------------------------------------------------------------------------
Total PASS: 18/20 (90%)


Change-Id: I2866e4fb9bbee1dd819d36b5b1c8e4883c502c12
Reviewed-on: https://chromium-review.googlesource.com/214634
Tested-by: Ilja Friedel <ihf@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Ilja Friedel <ihf@chromium.org>
15 files changed