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

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

Issue 20494: Import Traceline, a Windows performance trace event logger. (Closed)
Patch Set: Feedback. Created 11 years, 10 months 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
OLDNEW
(Empty)
1 # 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 # found in the LICENSE file.
4
5 import sys
6
7 execfile(os.path.join(
8 os.path.dirname(os.path.join(os.path.curdir, __file__)),
9 'syscalls.py'))
10
11 def parseEvents(z):
12 calls = { }
13 for e in z:
14 if e['eventtype'] == 'EVENT_TYPE_SYSCALL' and e['done'] > 0:
15 delta = e['done'] - e['ms']
16 syscall = e['syscall']
17 tid = e['thread']
18 ms = e['ms']
19 calls[syscall] = calls.get(syscall, 0) + delta
20 print '%f - %f - %x - %d %s' % (
21 delta, ms, tid, syscall, syscalls.get(syscall, 'unknown'))
22
23 #for syscall, delta in calls.items():
24 # print '%f - %d %s' % (delta, syscall, syscalls.get(syscall, 'unknown'))
25
26 execfile(sys.argv[1])
OLDNEW
« no previous file with comments | « tools/traceline/traceline/scripts/heap.js ('k') | tools/traceline/traceline/scripts/syscalls.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698