summaryrefslogtreecommitdiffstats
path: root/tools/traceline/traceline/scripts/alloc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/traceline/traceline/scripts/alloc.py')
-rwxr-xr-xtools/traceline/traceline/scripts/alloc.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/traceline/traceline/scripts/alloc.py b/tools/traceline/traceline/scripts/alloc.py
index d89447a..ee4af22 100755
--- a/tools/traceline/traceline/scripts/alloc.py
+++ b/tools/traceline/traceline/scripts/alloc.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 = { }
@@ -18,4 +18,10 @@ def parseEvents(z):
print '%f - %f - %x' % (
delta, ms, tid)
-execfile(sys.argv[1])
+
+def main():
+ execfile(sys.argv[1])
+
+
+if __name__ == '__main__':
+ sys.exit(main())