diff options
author | Jason Sams <rjsams@android.com> | 2011-09-20 16:59:22 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2011-09-20 16:59:22 -0700 |
commit | 8410b14c85b5a0c7fcaa095b61feca96fb36d528 (patch) | |
tree | 87376d9a70e586e5e147708ce667f0656d9126f7 | |
parent | 70a85687b5fae5a28bc786aa5729e87202447fa3 (diff) | |
download | frameworks_base-8410b14c85b5a0c7fcaa095b61feca96fb36d528.zip frameworks_base-8410b14c85b5a0c7fcaa095b61feca96fb36d528.tar.gz frameworks_base-8410b14c85b5a0c7fcaa095b61feca96fb36d528.tar.bz2 |
Cleanup RS logs
Reduce the startup/shutdown info and format the logs
in a consistent manner.
Change-Id: I4592cd9fcf7e2920010d84c7137137262cdc73b9
-rw-r--r-- | libs/rs/driver/rsdCore.cpp | 2 | ||||
-rw-r--r-- | libs/rs/driver/rsdGL.cpp | 5 | ||||
-rw-r--r-- | libs/rs/rsContext.cpp | 22 |
3 files changed, 12 insertions, 17 deletions
diff --git a/libs/rs/driver/rsdCore.cpp b/libs/rs/driver/rsdCore.cpp index a38fff7..f8107d9 100644 --- a/libs/rs/driver/rsdCore.cpp +++ b/libs/rs/driver/rsdCore.cpp @@ -219,7 +219,7 @@ bool rsdHalInit(Context *rsc, uint32_t version_major, uint32_t version_minor) { int cpu = sysconf(_SC_NPROCESSORS_ONLN); - LOGV("RS Launching thread(s), reported CPU count %i", cpu); + LOGV("%p Launching thread(s), CPUs %i", rsc, cpu); if (cpu < 2) cpu = 0; dc->mWorkers.mCount = (uint32_t)cpu; diff --git a/libs/rs/driver/rsdGL.cpp b/libs/rs/driver/rsdGL.cpp index c5b81db..98d9486 100644 --- a/libs/rs/driver/rsdGL.cpp +++ b/libs/rs/driver/rsdGL.cpp @@ -129,11 +129,8 @@ void rsdGLShutdown(const Context *rsc) { dc->gl.shaderCache->cleanupAll(); delete dc->gl.shaderCache; - delete dc->gl.vertexArrayState; - LOGV("%p, deinitEGL", rsc); - if (dc->gl.egl.context != EGL_NO_CONTEXT) { RSD_CALL_GL(eglMakeCurrent, dc->gl.egl.display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); @@ -363,7 +360,7 @@ bool rsdGLInit(const Context *rsc) { dc->gl.vertexArrayState->init(dc->gl.gl.maxVertexAttribs); dc->gl.currentFrameBuffer = NULL; - LOGV("initGLThread end %p", rsc); + LOGV("%p initGLThread end", rsc); rsc->setWatchdogGL(NULL, 0, NULL); return true; } diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 948d51c..53d4970 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -37,11 +37,10 @@ pthread_mutex_t Context::gLibMutex = PTHREAD_MUTEX_INITIALIZER; bool Context::initGLThread() { pthread_mutex_lock(&gInitMutex); - LOGV("initGLThread start %p", this); if (!mHal.funcs.initGraphics(this)) { pthread_mutex_unlock(&gInitMutex); - LOGE("%p, initGraphics failed", this); + LOGE("%p initGraphics failed", this); return false; } @@ -50,7 +49,6 @@ bool Context::initGLThread() { } void Context::deinitEGL() { - LOGV("%p, deinitEGL", this); mHal.funcs.shutdownGraphics(this); } @@ -284,7 +282,7 @@ void * Context::threadProc(void *vrsc) { } } - LOGV("%p, RS Thread exiting", rsc); + LOGV("%p RS Thread exiting", rsc); if (rsc->mIsGraphicsContext) { pthread_mutex_lock(&gInitMutex); @@ -292,7 +290,7 @@ void * Context::threadProc(void *vrsc) { pthread_mutex_unlock(&gInitMutex); } - LOGV("%p, RS Thread exited", rsc); + LOGV("%p RS Thread exited", rsc); return NULL; } @@ -426,7 +424,7 @@ bool Context::initContext(Device *dev, const RsSurfaceConfig *sc) { } Context::~Context() { - LOGV("Context::~Context"); + LOGV("%p Context::~Context", this); if (!mIsContextLite) { mIO.coreFlush(); @@ -450,7 +448,7 @@ Context::~Context() { } pthread_mutex_unlock(&gInitMutex); } - LOGV("Context::~Context done"); + LOGV("%p Context::~Context done", this); } void Context::setSurface(uint32_t w, uint32_t h, RsNativeWindow sur) { @@ -667,10 +665,10 @@ void rsi_ContextDestroyWorker(Context *rsc) { } void rsi_ContextDestroy(Context *rsc) { - LOGV("rsContextDestroy %p", rsc); + LOGV("%p rsContextDestroy", rsc); rsContextDestroyWorker(rsc); delete rsc; - LOGV("rsContextDestroy 2 %p", rsc); + LOGV("%p rsContextDestroy done", rsc); } @@ -701,7 +699,7 @@ void rsi_ContextDeinitToClient(Context *rsc) { RsContext rsContextCreate(RsDevice vdev, uint32_t version, uint32_t sdkVersion) { - LOGV("rsContextCreate %p", vdev); + LOGV("rsContextCreate dev=%p", vdev); Device * dev = static_cast<Device *>(vdev); Context *rsc = Context::createContext(dev, NULL); if (rsc) { @@ -713,14 +711,14 @@ RsContext rsContextCreate(RsDevice vdev, uint32_t version, RsContext rsContextCreateGL(RsDevice vdev, uint32_t version, uint32_t sdkVersion, RsSurfaceConfig sc, uint32_t dpi) { - LOGV("rsContextCreateGL %p", vdev); + LOGV("rsContextCreateGL dev=%p", vdev); Device * dev = static_cast<Device *>(vdev); Context *rsc = Context::createContext(dev, &sc); if (rsc) { rsc->setTargetSdkVersion(sdkVersion); rsc->setDPI(dpi); } - LOGV("rsContextCreateGL ret %p ", rsc); + LOGV("%p rsContextCreateGL ret", rsc); return rsc; } |