diff options
author | Feng Qian <fqian@google.com> | 2009-08-17 23:32:09 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-08-17 23:32:09 -0700 |
commit | 8ca4160fde81af362cf2ea375997797b1df8243d (patch) | |
tree | 63f6cec2e629dfe30b375bcab936b7d006647995 /WebKit/android | |
parent | 0570b7719b3def45104c8615a2c88f07ebe4c4c4 (diff) | |
parent | 1f4c9d43aeeef7e66437a86ad0e92ff7b0b7f02f (diff) | |
download | external_webkit-8ca4160fde81af362cf2ea375997797b1df8243d.zip external_webkit-8ca4160fde81af362cf2ea375997797b1df8243d.tar.gz external_webkit-8ca4160fde81af362cf2ea375997797b1df8243d.tar.bz2 |
am 1f4c9d43: am 144e6949: Merge change 21673 into eclair
Merge commit '1f4c9d43aeeef7e66437a86ad0e92ff7b0b7f02f'
* commit '1f4c9d43aeeef7e66437a86ad0e92ff7b0b7f02f':
Add re-entry count for QemuTracerAuto class.
Diffstat (limited to 'WebKit/android')
-rw-r--r-- | WebKit/android/TimeCounter.cpp | 2 | ||||
-rw-r--r-- | WebKit/android/TimeCounter.h | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/WebKit/android/TimeCounter.cpp b/WebKit/android/TimeCounter.cpp index 5f69cf6..7abc113 100644 --- a/WebKit/android/TimeCounter.cpp +++ b/WebKit/android/TimeCounter.cpp @@ -65,6 +65,8 @@ uint32_t TimeCounter::sCounter[TimeCounter::TotalTimeCounterCount]; uint32_t TimeCounter::sLastCounter[TimeCounter::TotalTimeCounterCount]; uint32_t TimeCounter::sStartTime[TimeCounter::TotalTimeCounterCount]; +int QemuTracerAuto::reentry_count = 0; + static const char* timeCounterNames[] = { "css parsing", "javascript", diff --git a/WebKit/android/TimeCounter.h b/WebKit/android/TimeCounter.h index 47e681b..29c3eb9 100644 --- a/WebKit/android/TimeCounter.h +++ b/WebKit/android/TimeCounter.h @@ -98,8 +98,19 @@ private: class QemuTracerAuto { public: - QemuTracerAuto() { qemu_start_tracing(); } - ~QemuTracerAuto() { qemu_stop_tracing(); } + QemuTracerAuto() { + if (!reentry_count) + qemu_start_tracing(); + reentry_count++; + } + + ~QemuTracerAuto() { + reentry_count--; + if (!reentry_count) + qemu_stop_tracing(); + } +private: + static int reentry_count; }; } |