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

Side by Side Diff: tools/process-heap-prof.py

Issue 7826007: Added check for trailing whitespaces and corrected existing violations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Yet another iteration. Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « tools/presubmit.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2009 the V8 project authors. All rights reserved. 3 # Copyright 2009 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 # to get JS constructor profile 40 # to get JS constructor profile
41 41
42 42
43 import csv, sys, time, optparse 43 import csv, sys, time, optparse
44 44
45 def ProcessLogFile(filename, options): 45 def ProcessLogFile(filename, options):
46 if options.js_cons_profile: 46 if options.js_cons_profile:
47 itemname = 'heap-js-cons-item' 47 itemname = 'heap-js-cons-item'
48 else: 48 else:
49 itemname = 'heap-sample-item' 49 itemname = 'heap-sample-item'
50 50
51 first_call_time = None 51 first_call_time = None
52 sample_time = 0.0 52 sample_time = 0.0
53 sampling = False 53 sampling = False
54 try: 54 try:
55 logfile = open(filename, 'rb') 55 logfile = open(filename, 'rb')
56 try: 56 try:
57 logreader = csv.reader(logfile) 57 logreader = csv.reader(logfile)
58 58
59 print('JOB "v8"') 59 print('JOB "v8"')
60 print('DATE "%s"' % time.asctime(time.localtime())) 60 print('DATE "%s"' % time.asctime(time.localtime()))
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 options.size = True 101 options.size = True
102 return True 102 return True
103 103
104 104
105 def Main(): 105 def Main():
106 parser = BuildOptions() 106 parser = BuildOptions()
107 (options, args) = parser.parse_args() 107 (options, args) = parser.parse_args()
108 if not ProcessOptions(options): 108 if not ProcessOptions(options):
109 parser.print_help() 109 parser.print_help()
110 sys.exit(); 110 sys.exit();
111 111
112 if not args: 112 if not args:
113 print "Missing logfile" 113 print "Missing logfile"
114 sys.exit(); 114 sys.exit();
115 115
116 ProcessLogFile(args[0], options) 116 ProcessLogFile(args[0], options)
117 117
118 118
119 if __name__ == '__main__': 119 if __name__ == '__main__':
120 sys.exit(Main()) 120 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/presubmit.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698