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

Unified 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: . Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: tools/traceline/traceline/scripts/alloc.py
diff --git a/tools/traceline/traceline/scripts/alloc.py b/tools/traceline/traceline/scripts/alloc.py
index d89447a1f6c5a56565a188c8ac7989d6a9ee7ed5..35db1a6a7b44c5eb8c5871025d6f1d4dc821c732 100755
--- a/tools/traceline/traceline/scripts/alloc.py
+++ b/tools/traceline/traceline/scripts/alloc.py
@@ -1,12 +1,11 @@
+#!/usr/bin/env python
# Copyright (c) 2009 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 +17,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())

Powered by Google App Engine
This is Rietveld 408576698