Changeset 39368 in webkit for trunk/JavaScriptCore/bytecode


Ignore:
Timestamp:
Dec 17, 2008, 4:00:01 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-17 Sam Weinig <[email protected]>

Reviewed by Gavin Barraclough.

Add more CodeBlock statistics.

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dumpStatistics):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r39366 r39368  
    10941094    macro(expressionInfo) \
    10951095    macro(lineInfo) \
     1096    macro(getByIdExceptionInfo) \
    10961097    macro(pcVector)
    10971098
     
    11031104    macro(immediateSwitchJumpTables) \
    11041105    macro(characterSwitchJumpTables) \
    1105     macro(stringSwitchJumpTables)
     1106    macro(stringSwitchJumpTables) \
     1107    macro(functionRegisterInfos)
    11061108
    11071109template<typename T>
     
    11511153    }
    11521154
     1155    size_t totalSize = 0;
     1156
     1157    #define GET_TOTAL_SIZE(name) totalSize += name##TotalSize;
     1158            FOR_EACH_MEMBER_VECTOR(GET_TOTAL_SIZE)
     1159            FOR_EACH_MEMBER_VECTOR_RARE_DATA(GET_TOTAL_SIZE)
     1160    #undef GET_TOTAL_SIZE
     1161
     1162    totalSize += symbolTableTotalSize;
     1163    totalSize += (liveCodeBlockSet.size() * sizeof(CodeBlock));
     1164
    11531165    printf("Number of live CodeBlocks: %d\n", liveCodeBlockSet.size());
    11541166    printf("Size of a single CodeBlock [sizeof(CodeBlock)]: %zu\n", sizeof(CodeBlock));
     1167    printf("Size of all CodeBlocks: %zu\n", totalSize);
     1168    printf("Average size of a CodeBlock: %zu\n", totalSize / liveCodeBlockSet.size());
    11551169
    11561170    printf("Number of CodeBlocks with rare data: %zu\n", hasRareData);
Note: See TracChangeset for help on using the changeset viewer.