1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 tvcm.require('tracing.test_utils');
8 tvcm.require('tracing.importer.linux_perf_importer');
10 tvcm.unittest.testSuite('tracing.importer.linux_perf.workqueue_parser_test', function() { // @suppress longLineCheck
11 test('workQueueImport', function() {
13 ' kworker/0:3-6880 [000] 2784.771958: workqueue_execute_start: ' +
14 'work struct ffff8800a5083a20: function intel_unpin_work_fn',
15 ' kworker/0:3-6880 [000] 2784.771966: workqueue_execute_end: ' +
16 'work struct ffff8800a5083a20',
17 ' kworker/1:2-7269 [001] 2784.805966: workqueue_execute_start: ' +
18 'work struct ffff88014fb0f158: function do_dbs_timer',
19 ' kworker/1:2-7269 [001] 2784.805975: workqueue_execute_end: ' +
20 'work struct ffff88014fb0f158'
22 var m = new tracing.TraceModel(lines.join('\n'), false);
23 assertFalse(m.hasImportWarnings);
25 assertEquals(1, m.processes['6880'].threads['6880'].sliceGroup.length);
26 assertEquals(1, m.processes['7269'].threads['7269'].sliceGroup.length);