• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3<!--
4Copyright (c) 2012 The Chromium Authors. All rights reserved.
5Use of this source code is governed by a BSD-style license that can be
6found in the LICENSE file.
7-->
8<head>
9<title>LinuxPerfWorkqueueParser tests</title>
10<script src="base.js"></script>
11</head>
12<body>
13<script>
14'use strict';
15
16base.require('unittest');
17base.require('test_utils');
18base.require('linux_perf_importer');
19
20function testWorkQueueImport() {
21  var lines = [
22    ' kworker/0:3-6880  [000]  2784.771958: workqueue_execute_start: ' +
23               'work struct ffff8800a5083a20: function intel_unpin_work_fn',
24    ' kworker/0:3-6880  [000]  2784.771966: workqueue_execute_end: ' +
25               'work struct ffff8800a5083a20',
26    ' kworker/1:2-7269  [001]  2784.805966: workqueue_execute_start: ' +
27               'work struct ffff88014fb0f158: function do_dbs_timer',
28    ' kworker/1:2-7269  [001]  2784.805975: workqueue_execute_end: ' +
29               'work struct ffff88014fb0f158'
30  ];
31  var m = new tracing.TimelineModel(lines.join('\n'), false);
32  assertEquals(0, m.importErrors.length);
33
34  assertEquals(1, m.processes['6880'].threads['6880'].slices.length);
35  assertEquals(1, m.processes['7269'].threads['7269'].slices.length);
36}
37
38</script>
39</body>
40</html>
41