OLD | NEW |
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 Loading... |
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 Loading... |
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]) |
OLD | NEW |