OLD | NEW |
| 1 #!/usr/bin/env python |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 4 # found in the LICENSE file. |
4 | 5 |
5 import sys | 6 import sys |
6 | 7 |
7 execfile(os.path.join( | 8 from syscalls import syscalls |
8 os.path.dirname(os.path.join(os.path.curdir, __file__)), | |
9 'syscalls.py')) | |
10 | 9 |
11 def parseEvents(z): | 10 def parseEvents(z): |
12 calls = { } | 11 calls = { } |
13 for e in z: | 12 for e in z: |
14 if e['eventtype'] == 'EVENT_TYPE_SYSCALL' and e['syscall'] == 17: | 13 if e['eventtype'] == 'EVENT_TYPE_SYSCALL' and e['syscall'] == 17: |
15 delta = e['done'] - e['ms'] | 14 delta = e['done'] - e['ms'] |
16 tid = e['thread'] | 15 tid = e['thread'] |
17 ms = e['ms'] | 16 ms = e['ms'] |
18 print '%f - %f - %x' % ( | 17 print '%f - %f - %x' % ( |
19 delta, ms, tid) | 18 delta, ms, tid) |
20 | 19 |
21 execfile(sys.argv[1]) | 20 |
| 21 def main(): |
| 22 execfile(sys.argv[1]) |
| 23 |
| 24 |
| 25 if __name__ == '__main__': |
| 26 sys.exit(main()) |
OLD | NEW |