summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 93c01e0d2..0e6380975 100644
--- a/include/cutils/log.h
+++ b/include/cutils/log.h
@@ -47,7 +47,7 @@ extern "C" {
47// --------------------------------------------------------------------- 47// ---------------------------------------------------------------------
48 48
49/* 49/*
50 * Normally we strip LOGV (VERBOSE messages) from release builds. 50 * Normally we strip ALOGV (VERBOSE messages) from release builds.
51 * You can modify this (for example with "#define LOG_NDEBUG 0" 51 * You can modify this (for example with "#define LOG_NDEBUG 0"
52 * at the top of your source file) to change that behavior. 52 * at the top of your source file) to change that behavior.
53 */ 53 */
@@ -73,21 +73,21 @@ extern "C" {
73/* 73/*
74 * Simplified macro to send a verbose log message using the current LOG_TAG. 74 * Simplified macro to send a verbose log message using the current LOG_TAG.
75 */ 75 */
76#ifndef LOGV 76#ifndef ALOGV
77#if LOG_NDEBUG 77#if LOG_NDEBUG
78#define LOGV(...) ((void)0) 78#define ALOGV(...) ((void)0)
79#else 79#else
80#define LOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) 80#define ALOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
81#endif 81#endif
82#endif 82#endif
83 83
84#define CONDITION(cond) (__builtin_expect((cond)!=0, 0)) 84#define CONDITION(cond) (__builtin_expect((cond)!=0, 0))
85 85
86#ifndef LOGV_IF 86#ifndef ALOGV_IF
87#if LOG_NDEBUG 87#if LOG_NDEBUG
88#define LOGV_IF(cond, ...) ((void)0) 88#define ALOGV_IF(cond, ...) ((void)0)
89#else 89#else
90#define LOGV_IF(cond, ...) \ 90#define ALOGV_IF(cond, ...) \
91 ( (CONDITION(cond)) \ 91 ( (CONDITION(cond)) \
92 ? ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \ 92 ? ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \
93 : (void)0 ) 93 : (void)0 )
@@ -156,11 +156,11 @@ extern "C" {
156 * Conditional based on whether the current LOG_TAG is enabled at 156 * Conditional based on whether the current LOG_TAG is enabled at
157 * verbose priority. 157 * verbose priority.
158 */ 158 */
159#ifndef IF_LOGV 159#ifndef IF_ALOGV
160#if LOG_NDEBUG 160#if LOG_NDEBUG
161#define IF_LOGV() if (false) 161#define IF_ALOGV() if (false)
162#else 162#else
163#define IF_LOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG) 163#define IF_ALOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG)
164#endif 164#endif
165#endif 165#endif
166 166
diff --git a/libcorkscrew/arch-arm/backtrace-arm.c b/libcorkscrew/arch-arm/backtrace-arm.c
index 597662eb0..6bed2ae5e 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(
191 break; 191 break;
192 } 192 }
193 } 193 }
194 LOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, " 194 ALOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, "
195 "exidx_start=0x%08x, exidx_size=%d, handler=0x%08x", 195 "exidx_start=0x%08x, exidx_size=%d, handler=0x%08x",
196 pc, mi ? mi->name : "<unknown>", mi ? mi->start : 0, 196 pc, mi ? mi->name : "<unknown>", mi ? mi->start : 0,
197 exidx_start, exidx_size, handler); 197 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)
227 break; 227 break;
228 } 228 }
229 229
230 LOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value); 230 ALOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value);
231 stream->ptr += 1; 231 stream->ptr += 1;
232 return true; 232 return true;
233} 233}
234 234
235static void set_reg(unwind_state_t* state, uint32_t reg, uint32_t value) { 235static void set_reg(unwind_state_t* state, uint32_t reg, uint32_t value) {
236 LOGV("set_reg: reg=%d, value=0x%08x", reg, value); 236 ALOGV("set_reg: reg=%d, value=0x%08x", reg, value);
237 state->gregs[reg] = value; 237 state->gregs[reg] = value;
238} 238}
239 239
diff --git a/libcorkscrew/ptrace.c b/libcorkscrew/ptrace.c
index 6ed77c45b..a308bb5cc 100644
--- a/libcorkscrew/ptrace.c
+++ b/libcorkscrew/ptrace.c
@@ -36,7 +36,7 @@ static const uint32_t ELF_MAGIC = 0x464C457f; // "ELF\0177"
36 36
37bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) { 37bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) {
38 if (ptr & 3) { 38 if (ptr & 3) {
39 LOGV("try_get_word: invalid pointer 0x%08x", ptr); 39 ALOGV("try_get_word: invalid pointer 0x%08x", ptr);
40 *out_value = 0; 40 *out_value = 0;
41 return false; 41 return false;
42 } 42 }
@@ -46,7 +46,7 @@ bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) {
46 unsigned char vec[1]; 46 unsigned char vec[1];
47 while (mincore((void*)(ptr & PAGE_MASK), sizeof(uint32_t), vec)) { 47 while (mincore((void*)(ptr & PAGE_MASK), sizeof(uint32_t), vec)) {
48 if (errno != EAGAIN && errno != EINTR) { 48 if (errno != EAGAIN && errno != EINTR) {
49 LOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno); 49 ALOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno);
50 *out_value = 0; 50 *out_value = 0;
51 return false; 51 return false;
52 } 52 }
@@ -60,7 +60,7 @@ bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) {
60 errno = 0; 60 errno = 0;
61 *out_value = ptrace(PTRACE_PEEKTEXT, tid, (void*)ptr, NULL); 61 *out_value = ptrace(PTRACE_PEEKTEXT, tid, (void*)ptr, NULL);
62 if (*out_value == 0xffffffffL && errno) { 62 if (*out_value == 0xffffffffL && errno) {
63 LOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno); 63 ALOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno);
64 *out_value = 0; 64 *out_value = 0;
65 return false; 65 return false;
66 } 66 }
diff --git a/libcutils/loghack.h b/libcutils/loghack.h
index 2bfffe4ec..52dfc8c32 100644
--- a/libcutils/loghack.h
+++ b/libcutils/loghack.h
@@ -25,13 +25,13 @@
25#include <cutils/log.h> 25#include <cutils/log.h>
26#else 26#else
27#include <stdio.h> 27#include <stdio.h>
28#define LOG(level, ...) \ 28#define ALOG(level, ...) \
29 ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__)) 29 ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__))
30#define LOGV(...) LOG("V", __VA_ARGS__) 30#define ALOGV(...) ALOG("V", __VA_ARGS__)
31#define LOGD(...) LOG("D", __VA_ARGS__) 31#define LOGD(...) ALOG("D", __VA_ARGS__)
32#define LOGI(...) LOG("I", __VA_ARGS__) 32#define LOGI(...) ALOG("I", __VA_ARGS__)
33#define LOGW(...) LOG("W", __VA_ARGS__) 33#define LOGW(...) ALOG("W", __VA_ARGS__)
34#define LOGE(...) LOG("E", __VA_ARGS__) 34#define LOGE(...) ALOG("E", __VA_ARGS__)
35#define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0) 35#define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0)
36#endif 36#endif
37 37
diff --git a/libcutils/properties.c b/libcutils/properties.c
index 98f356b7e..98dbf5096 100644
--- a/libcutils/properties.c
+++ b/libcutils/properties.c
@@ -130,7 +130,7 @@ static void init(void)
130 if (gPropFd < 0) { 130 if (gPropFd < 0) {
131 //LOGW("not connected to system property server\n"); 131 //LOGW("not connected to system property server\n");
132 } else { 132 } else {
133 //LOGV("Connected to system property server\n"); 133 //ALOGV("Connected to system property server\n");
134 } 134 }
135} 135}
136 136
@@ -140,7 +140,7 @@ int property_get(const char *key, char *value, const char *default_value)
140 char recvBuf[1+PROPERTY_VALUE_MAX]; 140 char recvBuf[1+PROPERTY_VALUE_MAX];
141 int len = -1; 141 int len = -1;
142 142
143 //LOGV("PROPERTY GET [%s]\n", key); 143 //ALOGV("PROPERTY GET [%s]\n", key);
144 144
145 pthread_once(&gInitOnce, init); 145 pthread_once(&gInitOnce, init);
146 if (gPropFd < 0) { 146 if (gPropFd < 0) {
@@ -194,7 +194,7 @@ int property_get(const char *key, char *value, const char *default_value)
194 assert(0); 194 assert(0);
195 return -1; 195 return -1;
196 } 196 }
197 //LOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", 197 //ALOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n",
198 // recvBuf[0], default_value, len, key, value); 198 // recvBuf[0], default_value, len, key, value);
199 199
200 return len; 200 return len;
@@ -207,7 +207,7 @@ int property_set(const char *key, const char *value)
207 char recvBuf[1]; 207 char recvBuf[1];
208 int result = -1; 208 int result = -1;
209 209
210 //LOGV("PROPERTY SET [%s]: [%s]\n", key, value); 210 //ALOGV("PROPERTY SET [%s]: [%s]\n", key, value);
211 211
212 pthread_once(&gInitOnce, init); 212 pthread_once(&gInitOnce, init);
213 if (gPropFd < 0) 213 if (gPropFd < 0)
@@ -241,7 +241,7 @@ int property_set(const char *key, const char *value)
241int property_list(void (*propfn)(const char *key, const char *value, void *cookie), 241int property_list(void (*propfn)(const char *key, const char *value, void *cookie),
242 void *cookie) 242 void *cookie)
243{ 243{
244 //LOGV("PROPERTY LIST\n"); 244 //ALOGV("PROPERTY LIST\n");
245 pthread_once(&gInitOnce, init); 245 pthread_once(&gInitOnce, init);
246 if (gPropFd < 0) 246 if (gPropFd < 0)
247 return -1; 247 return -1;
diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c
index 994ad3283..fee67fdd1 100644
--- a/libcutils/qtaguid.c
+++ b/libcutils/qtaguid.c
@@ -60,7 +60,7 @@ void qtaguid_resTrack(void) {
60static int write_ctrl(const char *cmd) { 60static int write_ctrl(const char *cmd) {
61 int fd, res, savedErrno; 61 int fd, res, savedErrno;
62 62
63 LOGV("write_ctrl(%s)", cmd); 63 ALOGV("write_ctrl(%s)", cmd);
64 64
65 fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY)); 65 fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY));
66 if (fd < 0) { 66 if (fd < 0) {
@@ -107,7 +107,7 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) {
107 107
108 snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid); 108 snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid);
109 109
110 LOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid); 110 ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
111 111
112 res = write_ctrl(lineBuf); 112 res = write_ctrl(lineBuf);
113 if (res < 0) { 113 if (res < 0) {
@@ -122,7 +122,7 @@ int qtaguid_untagSocket(int sockfd) {
122 char lineBuf[CTRL_MAX_INPUT_LEN]; 122 char lineBuf[CTRL_MAX_INPUT_LEN];
123 int res; 123 int res;
124 124
125 LOGV("Untagging socket %d", sockfd); 125 ALOGV("Untagging socket %d", sockfd);
126 126
127 snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd); 127 snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd);
128 res = write_ctrl(lineBuf); 128 res = write_ctrl(lineBuf);
@@ -137,7 +137,7 @@ int qtaguid_setCounterSet(int counterSetNum, uid_t uid) {
137 char lineBuf[CTRL_MAX_INPUT_LEN]; 137 char lineBuf[CTRL_MAX_INPUT_LEN];
138 int res; 138 int res;
139 139
140 LOGV("Setting counters to set %d for uid %d", counterSetNum, uid); 140 ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
141 141
142 snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid); 142 snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid);
143 res = write_ctrl(lineBuf); 143 res = write_ctrl(lineBuf);
@@ -149,7 +149,7 @@ int qtaguid_deleteTagData(int tag, uid_t uid) {
149 int fd, cnt = 0, res = 0; 149 int fd, cnt = 0, res = 0;
150 uint64_t kTag = (uint64_t)tag << 32; 150 uint64_t kTag = (uint64_t)tag << 32;
151 151
152 LOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid); 152 ALOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid);
153 153
154 pthread_once(&resTrackInitDone, qtaguid_resTrack); 154 pthread_once(&resTrackInitDone, qtaguid_resTrack);
155 155
diff --git a/libcutils/str_parms.c b/libcutils/str_parms.c
index dfa1f737c..7ea65cea9 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)
103 if (!str) 103 if (!str)
104 goto err_strdup; 104 goto err_strdup;
105 105
106 LOGV("%s: source string == '%s'\n", __func__, _string); 106 ALOGV("%s: source string == '%s'\n", __func__, _string);
107 107
108 kvpair = strtok_r(str, ";", &tmpstr); 108 kvpair = strtok_r(str, ";", &tmpstr);
109 while (kvpair && *kvpair) { 109 while (kvpair && *kvpair) {
@@ -137,7 +137,7 @@ next_pair:
137 } 137 }
138 138
139 if (!items) 139 if (!items)
140 LOGV("%s: no items found in string\n", __func__); 140 ALOGV("%s: no items found in string\n", __func__);
141 141
142 free(str); 142 free(str);
143 143
diff --git a/libdiskconfig/diskconfig.c b/libdiskconfig/diskconfig.c
index 4dd8c5265..aac3e699b 100644
--- a/libdiskconfig/diskconfig.c
+++ b/libdiskconfig/diskconfig.c
@@ -336,7 +336,7 @@ validate(struct disk_info *dinfo)
336 } 336 }
337 337
338#if 1 338#if 1
339 LOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d", 339 ALOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d",
340 dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size); 340 dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size);
341#endif 341#endif
342 342
diff --git a/libpixelflinger/tinyutils/VectorImpl.cpp b/libpixelflinger/tinyutils/VectorImpl.cpp
index a04970642..be3d27023 100644
--- a/libpixelflinger/tinyutils/VectorImpl.cpp
+++ b/libpixelflinger/tinyutils/VectorImpl.cpp
@@ -272,7 +272,7 @@ void VectorImpl::release_storage()
272 272
273void* VectorImpl::_grow(size_t where, size_t amount) 273void* VectorImpl::_grow(size_t where, size_t amount)
274{ 274{
275// LOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d", 275// ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
276// this, (int)where, (int)amount, (int)mCount, (int)capacity()); 276// this, (int)where, (int)amount, (int)mCount, (int)capacity());
277 277
278 if (where > mCount) 278 if (where > mCount)
@@ -281,7 +281,7 @@ void* VectorImpl::_grow(size_t where, size_t amount)
281 const size_t new_size = mCount + amount; 281 const size_t new_size = mCount + amount;
282 if (capacity() < new_size) { 282 if (capacity() < new_size) {
283 const size_t new_capacity = max(kMinVectorCapacity, ((new_size*3)+1)/2); 283 const size_t new_capacity = max(kMinVectorCapacity, ((new_size*3)+1)/2);
284// LOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity); 284// ALOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
285 if ((mStorage) && 285 if ((mStorage) &&
286 (mCount==where) && 286 (mCount==where) &&
287 (mFlags & HAS_TRIVIAL_COPY) && 287 (mFlags & HAS_TRIVIAL_COPY) &&
@@ -325,7 +325,7 @@ void VectorImpl::_shrink(size_t where, size_t amount)
325 if (!mStorage) 325 if (!mStorage)
326 return; 326 return;
327 327
328// LOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d", 328// ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
329// this, (int)where, (int)amount, (int)mCount, (int)capacity()); 329// this, (int)where, (int)amount, (int)mCount, (int)capacity());
330 330
331 if (where >= mCount) 331 if (where >= mCount)
@@ -334,7 +334,7 @@ void VectorImpl::_shrink(size_t where, size_t amount)
334 const size_t new_size = mCount - amount; 334 const size_t new_size = mCount - amount;
335 if (new_size*3 < capacity()) { 335 if (new_size*3 < capacity()) {
336 const size_t new_capacity = max(kMinVectorCapacity, new_size*2); 336 const size_t new_capacity = max(kMinVectorCapacity, new_size*2);
337// LOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity); 337// ALOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
338 if ((where == mCount-amount) && 338 if ((where == mCount-amount) &&
339 (mFlags & HAS_TRIVIAL_COPY) && 339 (mFlags & HAS_TRIVIAL_COPY) &&
340 (mFlags & HAS_TRIVIAL_DTOR)) 340 (mFlags & HAS_TRIVIAL_DTOR))