From d1ac98149737299513da1357e36f68cbb6d74425 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 18 Jan 2011 18:12:26 -0800 Subject: Fix race condition between GC thread and the teardown of RS. The RS context was going away while the objects were being deleted within the finializer. Add more debugging for playCoreCommands. Change-Id: I391f0b4db948f43f54017b47b062ab47d6a1ef64 --- libs/rs/rsLocklessFifo.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libs/rs/rsLocklessFifo.cpp') diff --git a/libs/rs/rsLocklessFifo.cpp b/libs/rs/rsLocklessFifo.cpp index 804c767..eb2af1c 100644 --- a/libs/rs/rsLocklessFifo.cpp +++ b/libs/rs/rsLocklessFifo.cpp @@ -210,3 +210,19 @@ void LocklessCommandFifo::makeSpace(uint32_t bytes) { void LocklessCommandFifo::dumpState(const char *s) const { LOGV("%s %p put %p, get %p, buf %p, end %p", s, this, mPut, mGet, mBuffer, mEnd); } + +void LocklessCommandFifo::printDebugData() const { + dumpState("printing fifo debug"); + const uint32_t *pptr = (const uint32_t *)mGet; + pptr -= 8 * 4; + if (mGet < mBuffer) { + pptr = (const uint32_t *)mBuffer; + } + + + for (int ct=0; ct < 16; ct++) { + LOGV("fifo %p = 0x%08x 0x%08x 0x%08x 0x%08x", pptr, pptr[0], pptr[1], pptr[2], pptr[3]); + pptr += 4; + } + +} -- cgit v1.1