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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 # Map* m = Map::cast(o); | 856 # Map* m = Map::cast(o); |
857 # const char* n = ""; | 857 # const char* n = ""; |
858 # intptr_t p = reinterpret_cast<intptr_t>(m) & 0xfffff; | 858 # intptr_t p = reinterpret_cast<intptr_t>(m) & 0xfffff; |
859 # int t = m->instance_type(); | 859 # int t = m->instance_type(); |
860 # ROOT_LIST(ROOT_LIST_CASE) | 860 # ROOT_LIST(ROOT_LIST_CASE) |
861 # STRUCT_LIST(STRUCT_LIST_CASE) | 861 # STRUCT_LIST(STRUCT_LIST_CASE) |
862 # printf(" 0x%05x: (%d, \"%s\"),\n", p, t, n); | 862 # printf(" 0x%05x: (%d, \"%s\"),\n", p, t, n); |
863 # } | 863 # } |
864 # printf("}\n"); | 864 # printf("}\n"); |
865 KNOWN_MAPS = { | 865 KNOWN_MAPS = { |
866 0x08081: (134, "ByteArrayMap"), | 866 0x08081: (128, "MetaMap"), |
867 0x080a1: (128, "MetaMap"), | 867 0x080a5: (163, "FixedArrayMap"), |
868 0x080c1: (130, "OddballMap"), | 868 0x080c9: (130, "OddballMap"), |
869 0x080e1: (163, "FixedArrayMap"), | 869 0x080ed: (163, "FixedCOWArrayMap"), |
870 0x08101: (68, "AsciiSymbolMap"), | 870 0x08111: (163, "ScopeInfoMap"), |
871 0x08121: (132, "HeapNumberMap"), | 871 0x08135: (132, "HeapNumberMap"), |
872 0x08141: (135, "FreeSpaceMap"), | 872 0x08159: (133, "ForeignMap"), |
873 0x08161: (146, "OnePointerFillerMap"), | 873 0x0817d: (64, "SymbolMap"), |
874 0x08181: (146, "TwoPointerFillerMap"), | 874 0x081a1: (68, "AsciiSymbolMap"), |
875 0x081a1: (131, "GlobalPropertyCellMap"), | 875 0x081c5: (65, "ConsSymbolMap"), |
876 0x081c1: (164, "SharedFunctionInfoMap"), | 876 0x081e9: (69, "ConsAsciiSymbolMap"), |
877 0x081e1: (4, "AsciiStringMap"), | 877 0x0820d: (66, "ExternalSymbolMap"), |
878 0x08201: (163, "GlobalContextMap"), | 878 0x08231: (74, "ExternalSymbolWithAsciiDataMap"), |
879 0x08221: (129, "CodeMap"), | 879 0x08255: (70, "ExternalAsciiSymbolMap"), |
880 0x08241: (163, "ScopeInfoMap"), | 880 0x08279: (82, "ShortExternalSymbolMap"), |
881 0x08261: (163, "FixedCOWArrayMap"), | 881 0x0829d: (90, "ShortExternalSymbolWithAsciiDataMap"), |
882 0x08281: (145, "FixedDoubleArrayMap"), | 882 0x082c1: (86, "ShortExternalAsciiSymbolMap"), |
883 0x082a1: (163, "HashTableMap"), | 883 0x082e5: (0, "StringMap"), |
884 0x082c1: (0, "StringMap"), | 884 0x08309: (4, "AsciiStringMap"), |
885 0x082e1: (64, "SymbolMap"), | 885 0x0832d: (1, "ConsStringMap"), |
886 0x08301: (1, "ConsStringMap"), | 886 0x08351: (5, "ConsAsciiStringMap"), |
887 0x08321: (5, "ConsAsciiStringMap"), | 887 0x08375: (3, "SlicedStringMap"), |
888 0x08341: (3, "SlicedStringMap"), | 888 0x08399: (7, "SlicedAsciiStringMap"), |
889 0x08361: (7, "SlicedAsciiStringMap"), | 889 0x083bd: (2, "ExternalStringMap"), |
890 0x08381: (65, "ConsSymbolMap"), | 890 0x083e1: (10, "ExternalStringWithAsciiDataMap"), |
891 0x083a1: (69, "ConsAsciiSymbolMap"), | 891 0x08405: (6, "ExternalAsciiStringMap"), |
892 0x083c1: (66, "ExternalSymbolMap"), | 892 0x08429: (18, "ShortExternalStringMap"), |
893 0x083e1: (74, "ExternalSymbolWithAsciiDataMap"), | 893 0x0844d: (26, "ShortExternalStringWithAsciiDataMap"), |
894 0x08401: (70, "ExternalAsciiSymbolMap"), | 894 0x08471: (22, "ShortExternalAsciiStringMap"), |
895 0x08421: (2, "ExternalStringMap"), | 895 0x08495: (0, "UndetectableStringMap"), |
896 0x08441: (10, "ExternalStringWithAsciiDataMap"), | 896 0x084b9: (4, "UndetectableAsciiStringMap"), |
897 0x08461: (6, "ExternalAsciiStringMap"), | 897 0x084dd: (145, "FixedDoubleArrayMap"), |
898 0x08481: (82, "ShortExternalSymbolMap"), | 898 0x08501: (134, "ByteArrayMap"), |
899 0x084a1: (90, "ShortExternalSymbolWithAsciiDataMap"), | 899 0x08525: (135, "FreeSpaceMap"), |
900 0x084c1: (86, "ShortExternalAsciiSymbolMap"), | 900 0x08549: (144, "ExternalPixelArrayMap"), |
901 0x084e1: (18, "ShortExternalStringMap"), | 901 0x0856d: (136, "ExternalByteArrayMap"), |
902 0x08501: (26, "ShortExternalStringWithAsciiDataMap"), | 902 0x08591: (137, "ExternalUnsignedByteArrayMap"), |
903 0x08521: (22, "ShortExternalAsciiStringMap"), | 903 0x085b5: (138, "ExternalShortArrayMap"), |
904 0x08541: (0, "UndetectableStringMap"), | 904 0x085d9: (139, "ExternalUnsignedShortArrayMap"), |
905 0x08561: (4, "UndetectableAsciiStringMap"), | 905 0x085fd: (140, "ExternalIntArrayMap"), |
906 0x08581: (144, "ExternalPixelArrayMap"), | 906 0x08621: (141, "ExternalUnsignedIntArrayMap"), |
907 0x085a1: (136, "ExternalByteArrayMap"), | 907 0x08645: (142, "ExternalFloatArrayMap"), |
908 0x085c1: (137, "ExternalUnsignedByteArrayMap"), | 908 0x08669: (163, "NonStrictArgumentsElementsMap"), |
909 0x085e1: (138, "ExternalShortArrayMap"), | 909 0x0868d: (143, "ExternalDoubleArrayMap"), |
910 0x08601: (139, "ExternalUnsignedShortArrayMap"), | 910 0x086b1: (129, "CodeMap"), |
911 0x08621: (140, "ExternalIntArrayMap"), | 911 0x086d5: (131, "GlobalPropertyCellMap"), |
912 0x08641: (141, "ExternalUnsignedIntArrayMap"), | 912 0x086f9: (146, "OnePointerFillerMap"), |
913 0x08661: (142, "ExternalFloatArrayMap"), | 913 0x0871d: (146, "TwoPointerFillerMap"), |
914 0x08681: (143, "ExternalDoubleArrayMap"), | 914 0x08741: (147, "AccessorInfoMap"), |
915 0x086a1: (163, "NonStrictArgumentsElementsMap"), | 915 0x08765: (148, "AccessorPairMap"), |
916 0x086c1: (163, "FunctionContextMap"), | 916 0x08789: (149, "AccessCheckInfoMap"), |
917 0x086e1: (163, "CatchContextMap"), | 917 0x087ad: (150, "InterceptorInfoMap"), |
918 0x08701: (163, "WithContextMap"), | 918 0x087d1: (151, "CallHandlerInfoMap"), |
919 0x08721: (163, "BlockContextMap"), | 919 0x087f5: (152, "FunctionTemplateInfoMap"), |
920 0x08741: (163, "ModuleContextMap"), | 920 0x08819: (153, "ObjectTemplateInfoMap"), |
921 0x08761: (165, "JSMessageObjectMap"), | 921 0x0883d: (154, "SignatureInfoMap"), |
922 0x08781: (133, "ForeignMap"), | 922 0x08861: (155, "TypeSwitchInfoMap"), |
923 0x087a1: (170, "NeanderMap"), | 923 0x08885: (156, "ScriptMap"), |
924 0x087c1: (158, "PolymorphicCodeCacheMap"), | 924 0x088a9: (157, "CodeCacheMap"), |
925 0x087e1: (156, "ScriptMap"), | 925 0x088cd: (158, "PolymorphicCodeCacheMap"), |
926 0x08801: (147, "AccessorInfoMap"), | 926 0x088f1: (159, "TypeFeedbackInfoMap"), |
927 0x08821: (148, "AccessorPairMap"), | 927 0x08915: (160, "AliasedArgumentsEntryMap"), |
928 0x08841: (149, "AccessCheckInfoMap"), | 928 0x08939: (161, "DebugInfoMap"), |
929 0x08861: (150, "InterceptorInfoMap"), | 929 0x0895d: (162, "BreakPointInfoMap"), |
930 0x08881: (151, "CallHandlerInfoMap"), | 930 0x08981: (163, "HashTableMap"), |
931 0x088a1: (152, "FunctionTemplateInfoMap"), | 931 0x089a5: (163, "FunctionContextMap"), |
932 0x088c1: (153, "ObjectTemplateInfoMap"), | 932 0x089c9: (163, "CatchContextMap"), |
933 0x088e1: (154, "SignatureInfoMap"), | 933 0x089ed: (163, "WithContextMap"), |
934 0x08901: (155, "TypeSwitchInfoMap"), | 934 0x08a11: (163, "BlockContextMap"), |
935 0x08921: (157, "CodeCacheMap"), | 935 0x08a35: (163, "ModuleContextMap"), |
936 0x08941: (159, "TypeFeedbackInfoMap"), | 936 0x08a59: (163, "GlobalContextMap"), |
937 0x08961: (160, "AliasedArgumentsEntryMap"), | 937 0x08a7d: (163, "NativeContextMap"), |
938 0x08981: (161, "DebugInfoMap"), | 938 0x08aa1: (164, "SharedFunctionInfoMap"), |
939 0x089a1: (162, "BreakPointInfoMap"), | 939 0x08ac5: (165, "JSMessageObjectMap"), |
| 940 0x08ae9: (170, "ExternalMap"), |
| 941 0x08b0d: (170, "NeanderMap"), |
940 } | 942 } |
941 | 943 |
942 | 944 |
943 # List of known V8 objects. Used to determine name for objects that are | 945 # List of known V8 objects. Used to determine name for objects that are |
944 # part of the root-set and hence on the first page of various old-space | 946 # part of the root-set and hence on the first page of various old-space |
945 # paged. Obtained by adding the code below to an IA32 release build with | 947 # paged. Obtained by adding the code below to an IA32 release build with |
946 # enabled snapshots to the end of the Isolate::Init method. | 948 # enabled snapshots to the end of the Isolate::Init method. |
947 # | 949 # |
948 # #define ROOT_LIST_CASE(type, name, camel_name) \ | 950 # #define ROOT_LIST_CASE(type, name, camel_name) \ |
949 # if (o == heap_.name()) n = #camel_name; | 951 # if (o == heap_.name()) n = #camel_name; |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1837 help="start an interactive inspector shell") | 1839 help="start an interactive inspector shell") |
1838 parser.add_option("-f", "--full", dest="full", action="store_true", | 1840 parser.add_option("-f", "--full", dest="full", action="store_true", |
1839 help="dump all information contained in the minidump") | 1841 help="dump all information contained in the minidump") |
1840 parser.add_option("--symdir", dest="symdir", default=".", | 1842 parser.add_option("--symdir", dest="symdir", default=".", |
1841 help="directory containing *.pdb.sym file with symbols") | 1843 help="directory containing *.pdb.sym file with symbols") |
1842 options, args = parser.parse_args() | 1844 options, args = parser.parse_args() |
1843 if len(args) != 1: | 1845 if len(args) != 1: |
1844 parser.print_help() | 1846 parser.print_help() |
1845 sys.exit(1) | 1847 sys.exit(1) |
1846 AnalyzeMinidump(options, args[0]) | 1848 AnalyzeMinidump(options, args[0]) |
OLD | NEW |