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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 p.Dedent() | 1475 p.Dedent() |
1476 p.Print("}") | 1476 p.Print("}") |
1477 | 1477 |
1478 def _FormatLine(self, line): | 1478 def _FormatLine(self, line): |
1479 return FormatDisasmLine(self.entry, self.heap, line) | 1479 return FormatDisasmLine(self.entry, self.heap, line) |
1480 | 1480 |
1481 | 1481 |
1482 class V8Heap(object): | 1482 class V8Heap(object): |
1483 CLASS_MAP = { | 1483 CLASS_MAP = { |
1484 "SYMBOL_TYPE": SeqString, | 1484 "SYMBOL_TYPE": SeqString, |
1485 "ASCII_SYMBOL_TYPE": SeqString, | 1485 "ONE_BYTE_SYMBOL_TYPE": SeqString, |
1486 "CONS_SYMBOL_TYPE": ConsString, | 1486 "CONS_SYMBOL_TYPE": ConsString, |
1487 "CONS_ASCII_SYMBOL_TYPE": ConsString, | 1487 "CONS_ONE_BYTE_SYMBOL_TYPE": ConsString, |
1488 "EXTERNAL_SYMBOL_TYPE": ExternalString, | 1488 "EXTERNAL_SYMBOL_TYPE": ExternalString, |
1489 "EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE": ExternalString, | 1489 "EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString, |
1490 "EXTERNAL_ASCII_SYMBOL_TYPE": ExternalString, | 1490 "EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString, |
1491 "SHORT_EXTERNAL_SYMBOL_TYPE": ExternalString, | 1491 "SHORT_EXTERNAL_SYMBOL_TYPE": ExternalString, |
1492 "SHORT_EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE": ExternalString, | 1492 "SHORT_EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString, |
1493 "SHORT_EXTERNAL_ASCII_SYMBOL_TYPE": ExternalString, | 1493 "SHORT_EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString, |
1494 "STRING_TYPE": SeqString, | 1494 "STRING_TYPE": SeqString, |
1495 "ASCII_STRING_TYPE": SeqString, | 1495 "ONE_BYTE_STRING_TYPE": SeqString, |
1496 "CONS_STRING_TYPE": ConsString, | 1496 "CONS_STRING_TYPE": ConsString, |
1497 "CONS_ASCII_STRING_TYPE": ConsString, | 1497 "CONS_ONE_BYTE_STRING_TYPE": ConsString, |
1498 "EXTERNAL_STRING_TYPE": ExternalString, | 1498 "EXTERNAL_STRING_TYPE": ExternalString, |
1499 "EXTERNAL_STRING_WITH_ASCII_DATA_TYPE": ExternalString, | 1499 "EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE": ExternalString, |
1500 "EXTERNAL_ASCII_STRING_TYPE": ExternalString, | 1500 "EXTERNAL_ONE_BYTE_STRING_TYPE": ExternalString, |
1501 "MAP_TYPE": Map, | 1501 "MAP_TYPE": Map, |
1502 "ODDBALL_TYPE": Oddball, | 1502 "ODDBALL_TYPE": Oddball, |
1503 "FIXED_ARRAY_TYPE": FixedArray, | 1503 "FIXED_ARRAY_TYPE": FixedArray, |
1504 "JS_FUNCTION_TYPE": JSFunction, | 1504 "JS_FUNCTION_TYPE": JSFunction, |
1505 "SHARED_FUNCTION_INFO_TYPE": SharedFunctionInfo, | 1505 "SHARED_FUNCTION_INFO_TYPE": SharedFunctionInfo, |
1506 "SCRIPT_TYPE": Script, | 1506 "SCRIPT_TYPE": Script, |
1507 "CODE_CACHE_TYPE": CodeCache, | 1507 "CODE_CACHE_TYPE": CodeCache, |
1508 "CODE_TYPE": Code, | 1508 "CODE_TYPE": Code, |
1509 } | 1509 } |
1510 | 1510 |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3150 try: | 3150 try: |
3151 server = InspectionWebServer(PORT_NUMBER, options, args[0]) | 3151 server = InspectionWebServer(PORT_NUMBER, options, args[0]) |
3152 print 'Started httpserver on port ' , PORT_NUMBER | 3152 print 'Started httpserver on port ' , PORT_NUMBER |
3153 webbrowser.open('http://localhost:%i/summary.html' % PORT_NUMBER) | 3153 webbrowser.open('http://localhost:%i/summary.html' % PORT_NUMBER) |
3154 server.serve_forever() | 3154 server.serve_forever() |
3155 except KeyboardInterrupt: | 3155 except KeyboardInterrupt: |
3156 print '^C received, shutting down the web server' | 3156 print '^C received, shutting down the web server' |
3157 server.socket.close() | 3157 server.socket.close() |
3158 else: | 3158 else: |
3159 AnalyzeMinidump(options, args[0]) | 3159 AnalyzeMinidump(options, args[0]) |
OLD | NEW |