Ignore:
Timestamp:
Nov 3, 2008, 2:43:00 PM (17 years ago)
Author:
[email protected]
Message:

2008-11-03 Sam Weinig <[email protected]>

Reviewed by Mark Rowe.

Move #define to turn on dumping StructureID statistics to StructureID.cpp so that
turning it on does not require a full rebuild.

  • runtime/StructureID.cpp: (JSC::StructureID::dumpStatistics):
  • runtime/StructureID.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/StructureID.cpp

    r38046 r38080  
    3939#endif
    4040
     41#define DUMP_STRUCTURE_ID_STATISTICS 0
     42
    4143#ifndef NDEBUG
    4244#define DO_PROPERTYMAP_CONSTENCY_CHECK 0
     
    7173#if DUMP_STRUCTURE_ID_STATISTICS
    7274static HashSet<StructureID*> liveStructureIDSet;
     75#endif
    7376
    7477void StructureID::dumpStatistics()
    7578{
     79#if DUMP_STRUCTURE_ID_STATISTICS
    7680    unsigned numberLeaf = 0;
    7781    unsigned numberUsingSingleSlot = 0;
     
    9397
    9498        if (structureID->m_propertyTable)
    95             totalPropertyMapsSize += PropertyMapHashTable::allocationSize(m_propertyTable->size);;
     99            totalPropertyMapsSize += PropertyMapHashTable::allocationSize(structureID->m_propertyTable->size);
    96100    }
    97101
     
    104108    printf("Size of sum of all property maps: %d\n", totalPropertyMapsSize);
    105109    printf("Size of average of all property maps: %f\n", static_cast<double>(totalPropertyMapsSize) / static_cast<double>(liveStructureIDSet.size()));
    106 }
    107 #endif
     110#else
     111    printf("Dumping StructureID statistics is not enabled.\n");
     112#endif
     113}
    108114
    109115StructureID::StructureID(JSValue* prototype, const TypeInfo& typeInfo)
Note: See TracChangeset for help on using the changeset viewer.