Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: tools/traceline/traceline/scripts/alloc.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 #!/usr/bin/env python
2 # Copyright (c) 2011 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
9 'syscalls.py'))
10 10
11 def parseEvents(z): 11 def parseEvents(z):
12 calls = { } 12 calls = { }
13 for e in z: 13 for e in z:
14 if e['eventtype'] == 'EVENT_TYPE_SYSCALL' and e['syscall'] == 17: 14 if e['eventtype'] == 'EVENT_TYPE_SYSCALL' and e['syscall'] == 17:
15 delta = e['done'] - e['ms'] 15 delta = e['done'] - e['ms']
16 tid = e['thread'] 16 tid = e['thread']
17 ms = e['ms'] 17 ms = e['ms']
18 print '%f - %f - %x' % ( 18 print '%f - %f - %x' % (
19 delta, ms, tid) 19 delta, ms, tid)
20 20
21 execfile(sys.argv[1]) 21
22 def main():
23 execfile(sys.argv[1])
24
25
26 if __name__ == '__main__':
27 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/traceline/traceline/scripts/__init__.py ('k') | tools/traceline/traceline/scripts/crit_sec.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698