Turning on DUMP_PROPERTYMAP_STATS causes a build failure
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 20:21:34 +0000 (20:21 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Jun 2014 20:21:34 +0000 (20:21 +0000)
commit6064d535772e7989815ba27cd185eb2059b79f25
tree881f715b64f163a7e103a39133dfc37c2e0d0e7b
parent9b3668edf0d8c2e5dd2b06f718aa560fb5640a86
Turning on DUMP_PROPERTYMAP_STATS causes a build failure
https://bugs.webkit.org/show_bug.cgi?id=133673

Reviewed by Andreas Kling.

Source/JavaScriptCore:
Rewrote the property map statistics code because the old code wasn't building,
and it was also mixing numbers for lookups and insertions/removals.

New logging code records the number of calls to PropertyTable::find (finds) and
PropertyTable::get/PropertyTable::findWithString separately so that we can quantify
the number of probing during updates and lookups.

* jsc.cpp:
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::find):
(JSC::PropertyTable::get):
(JSC::PropertyTable::findWithString):
(JSC::PropertyTable::add):
(JSC::PropertyTable::remove):
(JSC::PropertyTable::reinsert):
(JSC::PropertyTable::rehash):
* runtime/Structure.cpp:
(JSC::PropertyMapStatisticsExitLogger::PropertyMapStatisticsExitLogger):
(JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):

Source/WTF:
Added DEFINE_GLOBAL_FOR_LOGGING to allow running a destructor in logging code
that needs to be enabled in release builds (e.g. for JavaScriptCore).

* wtf/StdLibExtras.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/PropertyMapHashTable.h
Source/JavaScriptCore/runtime/Structure.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/StdLibExtras.h