Loading include/cutils/log.h +10 −10 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ extern "C" { // --------------------------------------------------------------------- /* * Normally we strip LOGV (VERBOSE messages) from release builds. * Normally we strip ALOGV (VERBOSE messages) from release builds. * You can modify this (for example with "#define LOG_NDEBUG 0" * at the top of your source file) to change that behavior. */ Loading @@ -73,21 +73,21 @@ extern "C" { /* * Simplified macro to send a verbose log message using the current LOG_TAG. */ #ifndef LOGV #ifndef ALOGV #if LOG_NDEBUG #define LOGV(...) ((void)0) #define ALOGV(...) ((void)0) #else #define LOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) #define ALOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) #endif #endif #define CONDITION(cond) (__builtin_expect((cond)!=0, 0)) #ifndef LOGV_IF #ifndef ALOGV_IF #if LOG_NDEBUG #define LOGV_IF(cond, ...) ((void)0) #define ALOGV_IF(cond, ...) ((void)0) #else #define LOGV_IF(cond, ...) \ #define ALOGV_IF(cond, ...) \ ( (CONDITION(cond)) \ ? ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \ : (void)0 ) Loading Loading @@ -156,11 +156,11 @@ extern "C" { * Conditional based on whether the current LOG_TAG is enabled at * verbose priority. */ #ifndef IF_LOGV #ifndef IF_ALOGV #if LOG_NDEBUG #define IF_LOGV() if (false) #define IF_ALOGV() if (false) #else #define IF_LOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG) #define IF_ALOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG) #endif #endif Loading libcorkscrew/arch-arm/backtrace-arm.c +3 −3 Original line number Diff line number Diff line Loading @@ -191,7 +191,7 @@ static uintptr_t get_exception_handler( break; } } LOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, " ALOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, " "exidx_start=0x%08x, exidx_size=%d, handler=0x%08x", pc, mi ? mi->name : "<unknown>", mi ? mi->start : 0, exidx_start, exidx_size, handler); Loading Loading @@ -227,13 +227,13 @@ static bool try_next_byte(pid_t tid, byte_stream_t* stream, uint8_t* out_value) break; } LOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value); ALOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value); stream->ptr += 1; return true; } static void set_reg(unwind_state_t* state, uint32_t reg, uint32_t value) { LOGV("set_reg: reg=%d, value=0x%08x", reg, value); ALOGV("set_reg: reg=%d, value=0x%08x", reg, value); state->gregs[reg] = value; } Loading libcorkscrew/ptrace.c +3 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ static const uint32_t ELF_MAGIC = 0x464C457f; // "ELF\0177" bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { if (ptr & 3) { LOGV("try_get_word: invalid pointer 0x%08x", ptr); ALOGV("try_get_word: invalid pointer 0x%08x", ptr); *out_value = 0; return false; } Loading @@ -46,7 +46,7 @@ bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { unsigned char vec[1]; while (mincore((void*)(ptr & PAGE_MASK), sizeof(uint32_t), vec)) { if (errno != EAGAIN && errno != EINTR) { LOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno); ALOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno); *out_value = 0; return false; } Loading @@ -60,7 +60,7 @@ bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { errno = 0; *out_value = ptrace(PTRACE_PEEKTEXT, tid, (void*)ptr, NULL); if (*out_value == 0xffffffffL && errno) { LOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno); ALOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno); *out_value = 0; return false; } Loading libcutils/loghack.h +6 −6 Original line number Diff line number Diff line Loading @@ -25,13 +25,13 @@ #include <cutils/log.h> #else #include <stdio.h> #define LOG(level, ...) \ #define ALOG(level, ...) \ ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__)) #define LOGV(...) LOG("V", __VA_ARGS__) #define LOGD(...) LOG("D", __VA_ARGS__) #define LOGI(...) LOG("I", __VA_ARGS__) #define LOGW(...) LOG("W", __VA_ARGS__) #define LOGE(...) LOG("E", __VA_ARGS__) #define ALOGV(...) ALOG("V", __VA_ARGS__) #define LOGD(...) ALOG("D", __VA_ARGS__) #define LOGI(...) ALOG("I", __VA_ARGS__) #define LOGW(...) ALOG("W", __VA_ARGS__) #define LOGE(...) ALOG("E", __VA_ARGS__) #define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0) #endif Loading libcutils/properties.c +5 −5 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ static void init(void) if (gPropFd < 0) { //LOGW("not connected to system property server\n"); } else { //LOGV("Connected to system property server\n"); //ALOGV("Connected to system property server\n"); } } Loading @@ -140,7 +140,7 @@ int property_get(const char *key, char *value, const char *default_value) char recvBuf[1+PROPERTY_VALUE_MAX]; int len = -1; //LOGV("PROPERTY GET [%s]\n", key); //ALOGV("PROPERTY GET [%s]\n", key); pthread_once(&gInitOnce, init); if (gPropFd < 0) { Loading Loading @@ -194,7 +194,7 @@ int property_get(const char *key, char *value, const char *default_value) assert(0); return -1; } //LOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", //ALOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", // recvBuf[0], default_value, len, key, value); return len; Loading @@ -207,7 +207,7 @@ int property_set(const char *key, const char *value) char recvBuf[1]; int result = -1; //LOGV("PROPERTY SET [%s]: [%s]\n", key, value); //ALOGV("PROPERTY SET [%s]: [%s]\n", key, value); pthread_once(&gInitOnce, init); if (gPropFd < 0) Loading Loading @@ -241,7 +241,7 @@ int property_set(const char *key, const char *value) int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) { //LOGV("PROPERTY LIST\n"); //ALOGV("PROPERTY LIST\n"); pthread_once(&gInitOnce, init); if (gPropFd < 0) return -1; Loading Loading
include/cutils/log.h +10 −10 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ extern "C" { // --------------------------------------------------------------------- /* * Normally we strip LOGV (VERBOSE messages) from release builds. * Normally we strip ALOGV (VERBOSE messages) from release builds. * You can modify this (for example with "#define LOG_NDEBUG 0" * at the top of your source file) to change that behavior. */ Loading @@ -73,21 +73,21 @@ extern "C" { /* * Simplified macro to send a verbose log message using the current LOG_TAG. */ #ifndef LOGV #ifndef ALOGV #if LOG_NDEBUG #define LOGV(...) ((void)0) #define ALOGV(...) ((void)0) #else #define LOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) #define ALOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) #endif #endif #define CONDITION(cond) (__builtin_expect((cond)!=0, 0)) #ifndef LOGV_IF #ifndef ALOGV_IF #if LOG_NDEBUG #define LOGV_IF(cond, ...) ((void)0) #define ALOGV_IF(cond, ...) ((void)0) #else #define LOGV_IF(cond, ...) \ #define ALOGV_IF(cond, ...) \ ( (CONDITION(cond)) \ ? ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \ : (void)0 ) Loading Loading @@ -156,11 +156,11 @@ extern "C" { * Conditional based on whether the current LOG_TAG is enabled at * verbose priority. */ #ifndef IF_LOGV #ifndef IF_ALOGV #if LOG_NDEBUG #define IF_LOGV() if (false) #define IF_ALOGV() if (false) #else #define IF_LOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG) #define IF_ALOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG) #endif #endif Loading
libcorkscrew/arch-arm/backtrace-arm.c +3 −3 Original line number Diff line number Diff line Loading @@ -191,7 +191,7 @@ static uintptr_t get_exception_handler( break; } } LOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, " ALOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, " "exidx_start=0x%08x, exidx_size=%d, handler=0x%08x", pc, mi ? mi->name : "<unknown>", mi ? mi->start : 0, exidx_start, exidx_size, handler); Loading Loading @@ -227,13 +227,13 @@ static bool try_next_byte(pid_t tid, byte_stream_t* stream, uint8_t* out_value) break; } LOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value); ALOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value); stream->ptr += 1; return true; } static void set_reg(unwind_state_t* state, uint32_t reg, uint32_t value) { LOGV("set_reg: reg=%d, value=0x%08x", reg, value); ALOGV("set_reg: reg=%d, value=0x%08x", reg, value); state->gregs[reg] = value; } Loading
libcorkscrew/ptrace.c +3 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ static const uint32_t ELF_MAGIC = 0x464C457f; // "ELF\0177" bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { if (ptr & 3) { LOGV("try_get_word: invalid pointer 0x%08x", ptr); ALOGV("try_get_word: invalid pointer 0x%08x", ptr); *out_value = 0; return false; } Loading @@ -46,7 +46,7 @@ bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { unsigned char vec[1]; while (mincore((void*)(ptr & PAGE_MASK), sizeof(uint32_t), vec)) { if (errno != EAGAIN && errno != EINTR) { LOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno); ALOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno); *out_value = 0; return false; } Loading @@ -60,7 +60,7 @@ bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { errno = 0; *out_value = ptrace(PTRACE_PEEKTEXT, tid, (void*)ptr, NULL); if (*out_value == 0xffffffffL && errno) { LOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno); ALOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno); *out_value = 0; return false; } Loading
libcutils/loghack.h +6 −6 Original line number Diff line number Diff line Loading @@ -25,13 +25,13 @@ #include <cutils/log.h> #else #include <stdio.h> #define LOG(level, ...) \ #define ALOG(level, ...) \ ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__)) #define LOGV(...) LOG("V", __VA_ARGS__) #define LOGD(...) LOG("D", __VA_ARGS__) #define LOGI(...) LOG("I", __VA_ARGS__) #define LOGW(...) LOG("W", __VA_ARGS__) #define LOGE(...) LOG("E", __VA_ARGS__) #define ALOGV(...) ALOG("V", __VA_ARGS__) #define LOGD(...) ALOG("D", __VA_ARGS__) #define LOGI(...) ALOG("I", __VA_ARGS__) #define LOGW(...) ALOG("W", __VA_ARGS__) #define LOGE(...) ALOG("E", __VA_ARGS__) #define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0) #endif Loading
libcutils/properties.c +5 −5 Original line number Diff line number Diff line Loading @@ -130,7 +130,7 @@ static void init(void) if (gPropFd < 0) { //LOGW("not connected to system property server\n"); } else { //LOGV("Connected to system property server\n"); //ALOGV("Connected to system property server\n"); } } Loading @@ -140,7 +140,7 @@ int property_get(const char *key, char *value, const char *default_value) char recvBuf[1+PROPERTY_VALUE_MAX]; int len = -1; //LOGV("PROPERTY GET [%s]\n", key); //ALOGV("PROPERTY GET [%s]\n", key); pthread_once(&gInitOnce, init); if (gPropFd < 0) { Loading Loading @@ -194,7 +194,7 @@ int property_get(const char *key, char *value, const char *default_value) assert(0); return -1; } //LOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", //ALOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", // recvBuf[0], default_value, len, key, value); return len; Loading @@ -207,7 +207,7 @@ int property_set(const char *key, const char *value) char recvBuf[1]; int result = -1; //LOGV("PROPERTY SET [%s]: [%s]\n", key, value); //ALOGV("PROPERTY SET [%s]: [%s]\n", key, value); pthread_once(&gInitOnce, init); if (gPropFd < 0) Loading Loading @@ -241,7 +241,7 @@ int property_set(const char *key, const char *value) int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) { //LOGV("PROPERTY LIST\n"); //ALOGV("PROPERTY LIST\n"); pthread_once(&gInitOnce, init); if (gPropFd < 0) return -1; Loading