summaryrefslogtreecommitdiffstats
path: root/WebKit/android/TimeCounter.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/TimeCounter.h')
-rw-r--r--WebKit/android/TimeCounter.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/WebKit/android/TimeCounter.h b/WebKit/android/TimeCounter.h
index c78d10f..29c3eb9 100644
--- a/WebKit/android/TimeCounter.h
+++ b/WebKit/android/TimeCounter.h
@@ -28,6 +28,7 @@
#ifdef ANDROID_INSTRUMENT
+#include "hardware_legacy/qemu_tracing.h"
#include <wtf/CurrentTime.h>
namespace WebCore {
@@ -95,6 +96,23 @@ private:
uint32_t m_startTime;
};
+class QemuTracerAuto {
+public:
+ QemuTracerAuto() {
+ if (!reentry_count)
+ qemu_start_tracing();
+ reentry_count++;
+ }
+
+ ~QemuTracerAuto() {
+ reentry_count--;
+ if (!reentry_count)
+ qemu_stop_tracing();
+ }
+private:
+ static int reentry_count;
+};
+
}
#endif