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>LinuxPerfExynosParser 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 testExynosImport() { 21 var lines = [ 22 ' X-945 [001] .... 113.995549: exynos_flip_request: ' + 23 'pipe=0', 24 ' X-945 [001] .... 113.995561: exynos_flip_complete: ' + 25 'pipe=0' 26 ]; 27 var m = new tracing.TimelineModel(lines.join('\n'), false); 28 assertEquals(0, m.importErrors.length); 29 30 var threads = m.getAllThreads(); 31 assertEquals(1, threads.length); 32 33 var gfxFlipThread = threads[0]; 34 assertEquals('exynos_flip', gfxFlipThread.name); 35 assertEquals(1, gfxFlipThread.slices.length); 36 } 37 38 function testExynosBusfreqImport() { 39 var lines = [ 40 ' kworker/1:0-4177 [001] .... 2803.129806: ' + 41 'exynos_busfreq_target_int: frequency=200000', 42 ' kworker/1:0-4177 [001] .... 2803.229207: ' + 43 'exynos_busfreq_target_int: frequency=267000', 44 ' kworker/1:0-4177 [001] .... 2803.329031: ' + 45 'exynos_busfreq_target_int: frequency=160000', 46 ' kworker/1:0-4177 [001] .... 2805.729039: ' + 47 'exynos_busfreq_target_mif: frequency=200000' 48 ]; 49 var m = new tracing.TimelineModel(lines.join('\n'), false); 50 assertEquals(0, m.importErrors.length); 51 52 var c0 = m.cpus[0]; 53 assertEquals(0, c0.slices.length); 54 assertEquals(3, c0.counters['INT Frequency'].samples.length); 55 assertEquals(1, c0.counters['MIF Frequency'].samples.length); 56 } 57 58 </script> 59 </body> 60 </html> 61