From de2c98bac5c44d049fa7d38ac0173e873eeba298 Mon Sep 17 00:00:00 2001 From: Daniel Levin Date: Thu, 17 Nov 2011 12:27:02 -0600 Subject: CameraHAL: Improved debug logging 0. Renamed DEBUG_LOG macro to CAMERAHAL_DEBUG and moved it from CameraHal.h into Android.mk. To enable debug logging next variable should be put into $AFS/buildspec.mk: TI_CAMERAHAL_DEBUG_ENABLED := 1 To enable verbose debug logging next variable should be put into $AFS/buildspec.mk: TI_CAMERAHAL_VERBOSE_DEBUG_ENABLED := 1 1. CAMHAL_LOG*A and CAMHAL_LOG*B macros have been united into single CAMHAL_LOG* macro that accepts both variants. 2. Rewritten LOG_FUNCTION_NAME/LOG_FUNCTION_NAME_EXIT macros. Now they do operate on internal FunctionLogger class instance that does function enter/exit logging in constructor/destructor. If LOG_FUNCTION_NAME is used then LOG_FUNCTION_NAME_EXIT can be skipped in source code, in this case destructor will correctly print function exit entry. 3. Added optional printing message timestamps. To enable timestamp printing next variable should be put into $AFS/buildspec.mk: TI_CAMERAHAL_DEBUG_TIMESTAMPS := 1 4. Moved LOG_TAG macro definition from all CameraHAL sources to Android.mk. 5. Added printing message thread ids. 6. Added printing per thread call stack indentation to visualize call hierarchy. 7. Added CAMHAL_ASSERT(condition) and CAMHAL_ASSERT_X(condition,description) macros to assert conditions at runtime and abort process on failure. 8. Added CAMHAL_UNUSED(x) to mark unused variables which are not mistakes. 9. Added next variables to enable debug logging for MessageQueue, that should be put into $AFS/buildspec.mk: TI_UTILS_MESSAGE_QUEUE_DEBUG_ENABLED := 1 TI_UTILS_MESSAGE_QUEUE_DEBUG_FUNCTION_NAMES := 1 Signed-off-by: Daniel Levin Change-Id: I8ebea607199de621860ada6dfcab9164ba85674a --- camera/CameraHal_Module.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'camera/CameraHal_Module.cpp') diff --git a/camera/CameraHal_Module.cpp b/camera/CameraHal_Module.cpp index 511cbc2..9f94bb8 100644 --- a/camera/CameraHal_Module.cpp +++ b/camera/CameraHal_Module.cpp @@ -21,8 +21,6 @@ * */ -#define LOG_TAG "CameraHAL" - #include #include "CameraHal.h" -- cgit v1.1