| Index: tools/traceline/traceline/scripts/scstats.py
|
| diff --git a/tools/traceline/traceline/scripts/scstats.py b/tools/traceline/traceline/scripts/scstats.py
|
| index 21f28d846a8843fc23f9a829bdb6e8ee34a441a9..e2f28dc94a15562426ee4fd850ec746c6ce0a3cc 100755
|
| --- a/tools/traceline/traceline/scripts/scstats.py
|
| +++ b/tools/traceline/traceline/scripts/scstats.py
|
| @@ -1,12 +1,12 @@
|
| -# Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +#!/usr/bin/env python
|
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| import sys
|
|
|
| -execfile(os.path.join(
|
| - os.path.dirname(os.path.join(os.path.curdir, __file__)),
|
| - 'syscalls.py'))
|
| +from syscalls import syscalls
|
| +
|
|
|
| def parseEvents(z):
|
| calls = { }
|
| @@ -23,4 +23,10 @@ def parseEvents(z):
|
| #for syscall, delta in calls.items():
|
| # print '%f - %d %s' % (delta, syscall, syscalls.get(syscall, 'unknown'))
|
|
|
| -execfile(sys.argv[1])
|
| +
|
| +def main():
|
| + execfile(sys.argv[1])
|
| +
|
| +
|
| +if __name__ == '__main__':
|
| + main()
|
|
|