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

Side by Side Diff: tools/grokdump.py

Issue 1164693002: Tiny fix to grokdump heap stats printer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | 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 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 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 3124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3135 if maybe_address_contents == 0xdecade00: 3135 if maybe_address_contents == 0xdecade00:
3136 in_oom_dump_area = True 3136 in_oom_dump_area = True
3137 heap_object = heap.FindObject(maybe_address) 3137 heap_object = heap.FindObject(maybe_address)
3138 maybe_symbol = reader.FindSymbol(maybe_address) 3138 maybe_symbol = reader.FindSymbol(maybe_address)
3139 oom_comment = "" 3139 oom_comment = ""
3140 if in_oom_dump_area: 3140 if in_oom_dump_area:
3141 if maybe_address_contents == 0xdecade00: 3141 if maybe_address_contents == 0xdecade00:
3142 oom_comment = " <----- HeapStats start marker" 3142 oom_comment = " <----- HeapStats start marker"
3143 elif maybe_address_contents == 0xdecade01: 3143 elif maybe_address_contents == 0xdecade01:
3144 oom_comment = " <----- HeapStats end marker" 3144 oom_comment = " <----- HeapStats end marker"
3145 else: 3145 elif maybe_address_contents is not None:
3146 oom_comment = " %d (%d Mbytes)" % (maybe_address_contents, 3146 oom_comment = " %d (%d Mbytes)" % (maybe_address_contents,
3147 maybe_address_contents >> 20) 3147 maybe_address_contents >> 20)
3148 if slot == frame_pointer: 3148 if slot == frame_pointer:
3149 maybe_symbol = "<---- frame pointer" 3149 maybe_symbol = "<---- frame pointer"
3150 frame_pointer = maybe_address 3150 frame_pointer = maybe_address
3151 print "%s: %s %s %s%s" % (reader.FormatIntPtr(slot), 3151 print "%s: %s %s %s%s" % (reader.FormatIntPtr(slot),
3152 reader.FormatIntPtr(maybe_address), 3152 reader.FormatIntPtr(maybe_address),
3153 "".join(ascii_content), 3153 "".join(ascii_content),
3154 maybe_symbol or "", 3154 maybe_symbol or "",
3155 oom_comment) 3155 oom_comment)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 try: 3190 try:
3191 server = InspectionWebServer(PORT_NUMBER, options, args[0]) 3191 server = InspectionWebServer(PORT_NUMBER, options, args[0])
3192 print 'Started httpserver on port ' , PORT_NUMBER 3192 print 'Started httpserver on port ' , PORT_NUMBER
3193 webbrowser.open('http://localhost:%i/summary.html' % PORT_NUMBER) 3193 webbrowser.open('http://localhost:%i/summary.html' % PORT_NUMBER)
3194 server.serve_forever() 3194 server.serve_forever()
3195 except KeyboardInterrupt: 3195 except KeyboardInterrupt:
3196 print '^C received, shutting down the web server' 3196 print '^C received, shutting down the web server'
3197 server.socket.close() 3197 server.socket.close()
3198 else: 3198 else:
3199 AnalyzeMinidump(options, args[0]) 3199 AnalyzeMinidump(options, args[0])
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698