1 <!DOCTYPE html> 2 <html> 3 <!-- 4 Copyright (c) 2012 The Chromium Authors. All rights reserved. 5 Use of this source code is governed by a BSD-style license that can be 6 found in the LICENSE file. 7 --> 8 <head> 9 <title>LinuxPerfBusParser tests</title> 10 <script src="base.js"></script> 11 </head> 12 <body> 13 <script> 14 'use strict'; 15 16 base.require('unittest'); 17 base.require('test_utils'); 18 base.require('linux_perf_importer'); 19 20 function testExynos5Bus() { 21 var lines = [ 22 's3c-fb-vsync-85 [001] d..2 8116.730115: memory_bus_usage: ' + 23 'bus=RIGHT rw_bytes=0 r_bytes=0 w_bytes=0 cycles=2681746 ns=16760792', 24 25 's3c-fb-vsync-85 [001] d..2 8116.730118: memory_bus_usage: ' + 26 'bus=CPU rw_bytes=2756608 r_bytes=2267328 w_bytes=491328 ' + 27 'cycles=6705198 ns=16763375', 28 29 's3c-fb-vsync-85 [001] d..2 8116.746788: memory_bus_usage: ' + 30 'bus=DDR_C rw_bytes=2736128 r_bytes=2260864 w_bytes=479248 ' + 31 'cycles=6670677 ns=16676375', 32 33 's3c-fb-vsync-85 [001] d..2 8116.746790: memory_bus_usage: ' + 34 'bus=DDR_R1 rw_bytes=31457280 r_bytes=31460912 w_bytes=0 ' + 35 'cycles=6670521 ns=16676500', 36 37 's3c-fb-vsync-85 [001] d..2 8116.746792: memory_bus_usage: ' + 38 'bus=DDR_L rw_bytes=16953344 r_bytes=16731088 w_bytes=223664 ' + 39 'cycles=6669885 ns=16674833', 40 41 's3c-fb-vsync-85 [001] d..2 8116.746793: memory_bus_usage: ' + 42 'bus=RIGHT rw_bytes=0 r_bytes=0 w_bytes=0 cycles=2667378 ns=16671250', 43 44 's3c-fb-vsync-85 [001] d..2 8116.746798: memory_bus_usage: ' + 45 'bus=CPU rw_bytes=2797568 r_bytes=2309424 w_bytes=491968 ' + 46 'cycles=6672156 ns=16680458', 47 48 's3c-fb-vsync-85 [001] d..2 8116.763521: memory_bus_usage: ' + 49 'bus=DDR_C rw_bytes=2408448 r_bytes=1968448 w_bytes=441456 ' + 50 'cycles=6689562 ns=16723458', 51 52 's3c-fb-vsync-85 [001] d..2 8116.763523: memory_bus_usage: ' + 53 'bus=DDR_R1 rw_bytes=31490048 r_bytes=31493360 w_bytes=0 ' + 54 'cycles=6690012 ns=16725083', 55 56 's3c-fb-vsync-85 [001] d..2 8116.763525: memory_bus_usage: ' + 57 'bus=DDR_L rw_bytes=16941056 r_bytes=16719136 w_bytes=223472 ' + 58 'cycles=6690156 ns=16725375' 59 60 ]; 61 var m = new tracing.TimelineModel(lines.join('\n'), false); 62 assertEquals(0, m.importErrors.length); 63 console.log(m); 64 65 var counters = m.getAllCounters(); 66 console.log(counters); 67 assertEquals(10, counters.length); 68 69 assertEquals(2, counters[0].samples.length); 70 } 71 72 </script> 73 </body> 74 </html> 75