summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-10-20 11:54:09 +0100
committerSteve Block <steveblock@google.com>2011-10-26 09:59:23 +0100
commit69f4cd7f5add7a7c7f5915e5292aab7eb2a42e9f (patch)
tree08dc2a948f5e066639f1fab58080e7c6769de815
parent55bcd2dd8b6f0a705cea1bddaf4cf92fcaeaef0d (diff)
downloadsystem_core-69f4cd7f5add7a7c7f5915e5292aab7eb2a42e9f.zip
system_core-69f4cd7f5add7a7c7f5915e5292aab7eb2a42e9f.tar.gz
system_core-69f4cd7f5add7a7c7f5915e5292aab7eb2a42e9f.tar.bz2
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
Bug: 5449033 Change-Id: Ib453f869977a6e909095a578bbf0420851f887d2
-rw-r--r--include/cutils/log.h20
-rw-r--r--libcorkscrew/arch-arm/backtrace-arm.c6
-rw-r--r--libcorkscrew/ptrace.c6
-rw-r--r--libcutils/loghack.h12
-rw-r--r--libcutils/properties.c10
-rw-r--r--libcutils/qtaguid.c10
-rw-r--r--libcutils/str_parms.c4
-rw-r--r--libdiskconfig/diskconfig.c2
-rw-r--r--libpixelflinger/tinyutils/VectorImpl.cpp8
9 files changed, 39 insertions, 39 deletions
diff --git a/include/cutils/log.h b/include/cutils/log.h
index 93c01e0..0e63809 100644
--- a/include/cutils/log.h
+++ b/include/cutils/log.h
@@ -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.
*/
@@ -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 )
@@ -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
diff --git a/libcorkscrew/arch-arm/backtrace-arm.c b/libcorkscrew/arch-arm/backtrace-arm.c
index 597662e..6bed2ae 100644
--- a/libcorkscrew/arch-arm/backtrace-arm.c
+++ b/libcorkscrew/arch-arm/backtrace-arm.c
@@ -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);
@@ -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;
}
diff --git a/libcorkscrew/ptrace.c b/libcorkscrew/ptrace.c
index 6ed77c4..a308bb5 100644
--- a/libcorkscrew/ptrace.c
+++ b/libcorkscrew/ptrace.c
@@ -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;
}
@@ -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;
}
@@ -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;
}
diff --git a/libcutils/loghack.h b/libcutils/loghack.h
index 2bfffe4..52dfc8c 100644
--- a/libcutils/loghack.h
+++ b/libcutils/loghack.h
@@ -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
diff --git a/libcutils/properties.c b/libcutils/properties.c
index 98f356b..98dbf50 100644
--- a/libcutils/properties.c
+++ b/libcutils/properties.c
@@ -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");
}
}
@@ -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) {
@@ -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;
@@ -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)
@@ -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;
diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c
index 994ad32..fee67fd 100644
--- a/libcutils/qtaguid.c
+++ b/libcutils/qtaguid.c
@@ -60,7 +60,7 @@ void qtaguid_resTrack(void) {
static int write_ctrl(const char *cmd) {
int fd, res, savedErrno;
- LOGV("write_ctrl(%s)", cmd);
+ ALOGV("write_ctrl(%s)", cmd);
fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY));
if (fd < 0) {
@@ -107,7 +107,7 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) {
snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid);
- LOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
+ ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
res = write_ctrl(lineBuf);
if (res < 0) {
@@ -122,7 +122,7 @@ int qtaguid_untagSocket(int sockfd) {
char lineBuf[CTRL_MAX_INPUT_LEN];
int res;
- LOGV("Untagging socket %d", sockfd);
+ ALOGV("Untagging socket %d", sockfd);
snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd);
res = write_ctrl(lineBuf);
@@ -137,7 +137,7 @@ int qtaguid_setCounterSet(int counterSetNum, uid_t uid) {
char lineBuf[CTRL_MAX_INPUT_LEN];
int res;
- LOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
+ ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid);
res = write_ctrl(lineBuf);
@@ -149,7 +149,7 @@ int qtaguid_deleteTagData(int tag, uid_t uid) {
int fd, cnt = 0, res = 0;
uint64_t kTag = (uint64_t)tag << 32;
- LOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid);
+ ALOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid);
pthread_once(&resTrackInitDone, qtaguid_resTrack);
diff --git a/libcutils/str_parms.c b/libcutils/str_parms.c
index dfa1f73..7ea65ce 100644
--- a/libcutils/str_parms.c
+++ b/libcutils/str_parms.c
@@ -103,7 +103,7 @@ struct str_parms *str_parms_create_str(const char *_string)
if (!str)
goto err_strdup;
- LOGV("%s: source string == '%s'\n", __func__, _string);
+ ALOGV("%s: source string == '%s'\n", __func__, _string);
kvpair = strtok_r(str, ";", &tmpstr);
while (kvpair && *kvpair) {
@@ -137,7 +137,7 @@ next_pair:
}
if (!items)
- LOGV("%s: no items found in string\n", __func__);
+ ALOGV("%s: no items found in string\n", __func__);
free(str);
diff --git a/libdiskconfig/diskconfig.c b/libdiskconfig/diskconfig.c
index 4dd8c52..aac3e69 100644
--- a/libdiskconfig/diskconfig.c
+++ b/libdiskconfig/diskconfig.c
@@ -336,7 +336,7 @@ validate(struct disk_info *dinfo)
}
#if 1
- LOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d",
+ ALOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d",
dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size);
#endif
diff --git a/libpixelflinger/tinyutils/VectorImpl.cpp b/libpixelflinger/tinyutils/VectorImpl.cpp
index a049706..be3d270 100644
--- a/libpixelflinger/tinyutils/VectorImpl.cpp
+++ b/libpixelflinger/tinyutils/VectorImpl.cpp
@@ -272,7 +272,7 @@ void VectorImpl::release_storage()
void* VectorImpl::_grow(size_t where, size_t amount)
{
-// LOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
+// ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
if (where > mCount)
@@ -281,7 +281,7 @@ void* VectorImpl::_grow(size_t where, size_t amount)
const size_t new_size = mCount + amount;
if (capacity() < new_size) {
const size_t new_capacity = max(kMinVectorCapacity, ((new_size*3)+1)/2);
-// LOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
+// ALOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
if ((mStorage) &&
(mCount==where) &&
(mFlags & HAS_TRIVIAL_COPY) &&
@@ -325,7 +325,7 @@ void VectorImpl::_shrink(size_t where, size_t amount)
if (!mStorage)
return;
-// LOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
+// ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
if (where >= mCount)
@@ -334,7 +334,7 @@ void VectorImpl::_shrink(size_t where, size_t amount)
const size_t new_size = mCount - amount;
if (new_size*3 < capacity()) {
const size_t new_capacity = max(kMinVectorCapacity, new_size*2);
-// LOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
+// ALOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
if ((where == mCount-amount) &&
(mFlags & HAS_TRIVIAL_COPY) &&
(mFlags & HAS_TRIVIAL_DTOR))