summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-08-17 23:29:56 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-08-17 23:29:56 -0700
commit144e6949fa07509619b72d7319418fe6b40b84ed (patch)
tree63f6cec2e629dfe30b375bcab936b7d006647995 /WebKit
parent8bba87309bc6171f066820ce64c7e73b725a94e1 (diff)
parent86a5ca9e73301722e0a4917dc43b19dc61cac571 (diff)
downloadexternal_webkit-144e6949fa07509619b72d7319418fe6b40b84ed.zip
external_webkit-144e6949fa07509619b72d7319418fe6b40b84ed.tar.gz
external_webkit-144e6949fa07509619b72d7319418fe6b40b84ed.tar.bz2
Merge change 21673 into eclair
* changes: Add re-entry count for QemuTracerAuto class.
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/TimeCounter.cpp2
-rw-r--r--WebKit/android/TimeCounter.h15
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;
};
}