diff options
author | Steve Block | 2011-12-20 10:23:08 -0600 |
---|---|---|
committer | Alex Ray | 2013-07-30 15:56:58 -0500 |
commit | eb0953307ce75cec031aedbf21abff08e5a737e5 (patch) | |
tree | f68629af933e04983e26db5503983990de9b2881 /libs/utils/Looper.cpp | |
parent | 53ddace1a585c0515ea1c2e2091c4a8cd3a94864 (diff) | |
download | platform-system-core-eb0953307ce75cec031aedbf21abff08e5a737e5.tar.gz platform-system-core-eb0953307ce75cec031aedbf21abff08e5a737e5.tar.xz platform-system-core-eb0953307ce75cec031aedbf21abff08e5a737e5.zip |
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016
Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
Diffstat (limited to 'libs/utils/Looper.cpp')
-rw-r--r-- | libs/utils/Looper.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/libs/utils/Looper.cpp b/libs/utils/Looper.cpp index b54fb9dd7..1bc92cf88 100644 --- a/libs/utils/Looper.cpp +++ b/libs/utils/Looper.cpp | |||
@@ -185,7 +185,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa | |||
185 | int events = response.events; | 185 | int events = response.events; |
186 | void* data = response.request.data; | 186 | void* data = response.request.data; |
187 | #if DEBUG_POLL_AND_WAKE | 187 | #if DEBUG_POLL_AND_WAKE |
188 | LOGD("%p ~ pollOnce - returning signalled identifier %d: " | 188 | ALOGD("%p ~ pollOnce - returning signalled identifier %d: " |
189 | "fd=%d, events=0x%x, data=%p", | 189 | "fd=%d, events=0x%x, data=%p", |
190 | this, ident, fd, events, data); | 190 | this, ident, fd, events, data); |
191 | #endif | 191 | #endif |
@@ -198,7 +198,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa | |||
198 | 198 | ||
199 | if (result != 0) { | 199 | if (result != 0) { |
200 | #if DEBUG_POLL_AND_WAKE | 200 | #if DEBUG_POLL_AND_WAKE |
201 | LOGD("%p ~ pollOnce - returning result %d", this, result); | 201 | ALOGD("%p ~ pollOnce - returning result %d", this, result); |
202 | #endif | 202 | #endif |
203 | if (outFd != NULL) *outFd = 0; | 203 | if (outFd != NULL) *outFd = 0; |
204 | if (outEvents != NULL) *outEvents = NULL; | 204 | if (outEvents != NULL) *outEvents = NULL; |
@@ -212,7 +212,7 @@ int Looper::pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outDa | |||
212 | 212 | ||
213 | int Looper::pollInner(int timeoutMillis) { | 213 | int Looper::pollInner(int timeoutMillis) { |
214 | #if DEBUG_POLL_AND_WAKE | 214 | #if DEBUG_POLL_AND_WAKE |
215 | LOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis); | 215 | ALOGD("%p ~ pollOnce - waiting: timeoutMillis=%d", this, timeoutMillis); |
216 | #endif | 216 | #endif |
217 | 217 | ||
218 | // Adjust the timeout based on when the next message is due. | 218 | // Adjust the timeout based on when the next message is due. |
@@ -224,7 +224,7 @@ int Looper::pollInner(int timeoutMillis) { | |||
224 | timeoutMillis = messageTimeoutMillis; | 224 | timeoutMillis = messageTimeoutMillis; |
225 | } | 225 | } |
226 | #if DEBUG_POLL_AND_WAKE | 226 | #if DEBUG_POLL_AND_WAKE |
227 | LOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d", | 227 | ALOGD("%p ~ pollOnce - next message in %lldns, adjusted timeout: timeoutMillis=%d", |
228 | this, mNextMessageUptime - now, timeoutMillis); | 228 | this, mNextMessageUptime - now, timeoutMillis); |
229 | #endif | 229 | #endif |
230 | } | 230 | } |
@@ -270,7 +270,7 @@ int Looper::pollInner(int timeoutMillis) { | |||
270 | // Check for poll timeout. | 270 | // Check for poll timeout. |
271 | if (eventCount == 0) { | 271 | if (eventCount == 0) { |
272 | #if DEBUG_POLL_AND_WAKE | 272 | #if DEBUG_POLL_AND_WAKE |
273 | LOGD("%p ~ pollOnce - timeout", this); | 273 | ALOGD("%p ~ pollOnce - timeout", this); |
274 | #endif | 274 | #endif |
275 | result = ALOOPER_POLL_TIMEOUT; | 275 | result = ALOOPER_POLL_TIMEOUT; |
276 | goto Done; | 276 | goto Done; |
@@ -278,7 +278,7 @@ int Looper::pollInner(int timeoutMillis) { | |||
278 | 278 | ||
279 | // Handle all events. | 279 | // Handle all events. |
280 | #if DEBUG_POLL_AND_WAKE | 280 | #if DEBUG_POLL_AND_WAKE |
281 | LOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount); | 281 | ALOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount); |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | #ifdef LOOPER_USES_EPOLL | 284 | #ifdef LOOPER_USES_EPOLL |
@@ -353,7 +353,7 @@ Done: | |||
353 | - milliseconds_to_nanoseconds(timeoutMillis); | 353 | - milliseconds_to_nanoseconds(timeoutMillis); |
354 | } | 354 | } |
355 | if (mSampledPolls == SAMPLED_POLLS_TO_AGGREGATE) { | 355 | if (mSampledPolls == SAMPLED_POLLS_TO_AGGREGATE) { |
356 | LOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this, | 356 | ALOGD("%p ~ poll latency statistics: %0.3fms zero timeout, %0.3fms non-zero timeout", this, |
357 | 0.000001f * float(mSampledZeroPollLatencySum) / mSampledZeroPollCount, | 357 | 0.000001f * float(mSampledZeroPollLatencySum) / mSampledZeroPollCount, |
358 | 0.000001f * float(mSampledTimeoutPollLatencySum) / mSampledTimeoutPollCount); | 358 | 0.000001f * float(mSampledTimeoutPollLatencySum) / mSampledTimeoutPollCount); |
359 | mSampledPolls = 0; | 359 | mSampledPolls = 0; |
@@ -382,7 +382,7 @@ Done: | |||
382 | mLock.unlock(); | 382 | mLock.unlock(); |
383 | 383 | ||
384 | #if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS | 384 | #if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS |
385 | LOGD("%p ~ pollOnce - sending message: handler=%p, what=%d", | 385 | ALOGD("%p ~ pollOnce - sending message: handler=%p, what=%d", |
386 | this, handler.get(), message.what); | 386 | this, handler.get(), message.what); |
387 | #endif | 387 | #endif |
388 | handler->handleMessage(message); | 388 | handler->handleMessage(message); |
@@ -410,7 +410,7 @@ Done: | |||
410 | int events = response.events; | 410 | int events = response.events; |
411 | void* data = response.request.data; | 411 | void* data = response.request.data; |
412 | #if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS | 412 | #if DEBUG_POLL_AND_WAKE || DEBUG_CALLBACKS |
413 | LOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p", | 413 | ALOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p", |
414 | this, callback, fd, events, data); | 414 | this, callback, fd, events, data); |
415 | #endif | 415 | #endif |
416 | int callbackResult = callback(fd, events, data); | 416 | int callbackResult = callback(fd, events, data); |
@@ -451,7 +451,7 @@ int Looper::pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outDat | |||
451 | 451 | ||
452 | void Looper::wake() { | 452 | void Looper::wake() { |
453 | #if DEBUG_POLL_AND_WAKE | 453 | #if DEBUG_POLL_AND_WAKE |
454 | LOGD("%p ~ wake", this); | 454 | ALOGD("%p ~ wake", this); |
455 | #endif | 455 | #endif |
456 | 456 | ||
457 | #ifdef LOOPER_STATISTICS | 457 | #ifdef LOOPER_STATISTICS |
@@ -475,12 +475,12 @@ void Looper::wake() { | |||
475 | 475 | ||
476 | void Looper::awoken() { | 476 | void Looper::awoken() { |
477 | #if DEBUG_POLL_AND_WAKE | 477 | #if DEBUG_POLL_AND_WAKE |
478 | LOGD("%p ~ awoken", this); | 478 | ALOGD("%p ~ awoken", this); |
479 | #endif | 479 | #endif |
480 | 480 | ||
481 | #ifdef LOOPER_STATISTICS | 481 | #ifdef LOOPER_STATISTICS |
482 | if (mPendingWakeCount == 0) { | 482 | if (mPendingWakeCount == 0) { |
483 | LOGD("%p ~ awoken: spurious!", this); | 483 | ALOGD("%p ~ awoken: spurious!", this); |
484 | } else { | 484 | } else { |
485 | mSampledWakeCycles += 1; | 485 | mSampledWakeCycles += 1; |
486 | mSampledWakeCountSum += mPendingWakeCount; | 486 | mSampledWakeCountSum += mPendingWakeCount; |
@@ -488,7 +488,7 @@ void Looper::awoken() { | |||
488 | mPendingWakeCount = 0; | 488 | mPendingWakeCount = 0; |
489 | mPendingWakeTime = -1; | 489 | mPendingWakeTime = -1; |
490 | if (mSampledWakeCycles == SAMPLED_WAKE_CYCLES_TO_AGGREGATE) { | 490 | if (mSampledWakeCycles == SAMPLED_WAKE_CYCLES_TO_AGGREGATE) { |
491 | LOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this, | 491 | ALOGD("%p ~ wake statistics: %0.3fms wake latency, %0.3f wakes per cycle", this, |
492 | 0.000001f * float(mSampledWakeLatencySum) / mSampledWakeCycles, | 492 | 0.000001f * float(mSampledWakeLatencySum) / mSampledWakeCycles, |
493 | float(mSampledWakeCountSum) / mSampledWakeCycles); | 493 | float(mSampledWakeCountSum) / mSampledWakeCycles); |
494 | mSampledWakeCycles = 0; | 494 | mSampledWakeCycles = 0; |
@@ -514,7 +514,7 @@ void Looper::pushResponse(int events, const Request& request) { | |||
514 | 514 | ||
515 | int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) { | 515 | int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) { |
516 | #if DEBUG_CALLBACKS | 516 | #if DEBUG_CALLBACKS |
517 | LOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident, | 517 | ALOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident, |
518 | events, callback, data); | 518 | events, callback, data); |
519 | #endif | 519 | #endif |
520 | 520 | ||
@@ -598,7 +598,7 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, | |||
598 | 598 | ||
599 | int Looper::removeFd(int fd) { | 599 | int Looper::removeFd(int fd) { |
600 | #if DEBUG_CALLBACKS | 600 | #if DEBUG_CALLBACKS |
601 | LOGD("%p ~ removeFd - fd=%d", this, fd); | 601 | ALOGD("%p ~ removeFd - fd=%d", this, fd); |
602 | #endif | 602 | #endif |
603 | 603 | ||
604 | #ifdef LOOPER_USES_EPOLL | 604 | #ifdef LOOPER_USES_EPOLL |
@@ -675,7 +675,7 @@ void Looper::sendMessageDelayed(nsecs_t uptimeDelay, const sp<MessageHandler>& h | |||
675 | void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler, | 675 | void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler, |
676 | const Message& message) { | 676 | const Message& message) { |
677 | #if DEBUG_CALLBACKS | 677 | #if DEBUG_CALLBACKS |
678 | LOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d", | 678 | ALOGD("%p ~ sendMessageAtTime - uptime=%lld, handler=%p, what=%d", |
679 | this, uptime, handler.get(), message.what); | 679 | this, uptime, handler.get(), message.what); |
680 | #endif | 680 | #endif |
681 | 681 | ||
@@ -708,7 +708,7 @@ void Looper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler | |||
708 | 708 | ||
709 | void Looper::removeMessages(const sp<MessageHandler>& handler) { | 709 | void Looper::removeMessages(const sp<MessageHandler>& handler) { |
710 | #if DEBUG_CALLBACKS | 710 | #if DEBUG_CALLBACKS |
711 | LOGD("%p ~ removeMessages - handler=%p", this, handler.get()); | 711 | ALOGD("%p ~ removeMessages - handler=%p", this, handler.get()); |
712 | #endif | 712 | #endif |
713 | 713 | ||
714 | { // acquire lock | 714 | { // acquire lock |
@@ -725,7 +725,7 @@ void Looper::removeMessages(const sp<MessageHandler>& handler) { | |||
725 | 725 | ||
726 | void Looper::removeMessages(const sp<MessageHandler>& handler, int what) { | 726 | void Looper::removeMessages(const sp<MessageHandler>& handler, int what) { |
727 | #if DEBUG_CALLBACKS | 727 | #if DEBUG_CALLBACKS |
728 | LOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what); | 728 | ALOGD("%p ~ removeMessages - handler=%p, what=%d", this, handler.get(), what); |
729 | #endif | 729 | #endif |
730 | 730 | ||
731 | { // acquire lock | 731 | { // acquire lock |