diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-01-15 16:12:09 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-01-15 16:12:09 -0800 |
commit | 7a355dabbffb876b2e08cf63ac4fc28a39c19c6a (patch) | |
tree | 9e94e34b23ead3c0e7f052ee2d3785404d349981 /WebCore/dom/Document.cpp | |
parent | e933faefa1e899dbd5bf371f499cc682aff46c83 (diff) | |
download | external_webkit-7a355dabbffb876b2e08cf63ac4fc28a39c19c6a.zip external_webkit-7a355dabbffb876b2e08cf63ac4fc28a39c19c6a.tar.gz external_webkit-7a355dabbffb876b2e08cf63ac4fc28a39c19c6a.tar.bz2 |
auto import from //branches/cupcake/...@126645
Diffstat (limited to 'WebCore/dom/Document.cpp')
-rw-r--r-- | WebCore/dom/Document.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp index c35177a..f5a72c2 100644 --- a/WebCore/dom/Document.cpp +++ b/WebCore/dom/Document.cpp @@ -20,10 +20,6 @@ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ -#ifdef ANDROID_INSTRUMENT -#define LOG_TAG "WebCore" -#endif - #include "config.h" #include "Document.h" @@ -160,6 +156,10 @@ #include "HTMLTextAreaElement.h" #endif +#ifdef ANDROID_INSTRUMENT +#include "TimeCounter.h" +#endif + using namespace std; using namespace WTF; using namespace Unicode; @@ -1097,23 +1097,6 @@ void Document::setDocumentChanged(bool b) m_docChanged = b; } -#ifdef ANDROID_INSTRUMENT -static uint32_t sTotalTimeUsed = 0; -static uint32_t sCounter = 0; - -void Frame::resetCalculateStyleTimeCounter() -{ - sTotalTimeUsed = 0; - sCounter = 0; -} - -void Frame::reportCalculateStyleTimeCounter() -{ - LOGD("*-* Total calcStyle time: %d ms called %d times\n", - sTotalTimeUsed, sCounter); -} -#endif - void Document::recalcStyle(StyleChange change) { // we should not enter style recalc while painting @@ -1129,7 +1112,7 @@ void Document::recalcStyle(StyleChange change) suspendPostAttachCallbacks(); #ifdef ANDROID_INSTRUMENT - uint32_t time = get_thread_msec(); + android::TimeCounter::start(android::TimeCounter::CalculateStyleTimeCounter); #endif ASSERT(!renderer() || renderArena()); @@ -1178,11 +1161,7 @@ void Document::recalcStyle(StyleChange change) n->recalcStyle(change); #ifdef ANDROID_INSTRUMENT - time = get_thread_msec() - time; - sTotalTimeUsed += time; - sCounter++; - if (time > 1000) - LOGW("***** Document::recalcStyle() used %d ms\n", time); + android::TimeCounter::record(android::TimeCounter::CalculateStyleTimeCounter, __FUNCTION__); #endif if (changed() && view()) |