Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE

See https://android-git.corp.google.com/g/157519

Bug: 5449033
Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
This commit is contained in:
Steve Block 2012-01-09 18:35:44 +00:00 committed by Alex Ray
parent 1b781ab0e0
commit ae07445e97
4 changed files with 20 additions and 20 deletions

View file

@ -332,7 +332,7 @@ void RefBase::incStrong(const void* id) const
refs->addStrongRef(id);
const int32_t c = android_atomic_inc(&refs->mStrong);
LOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
ALOG_ASSERT(c > 0, "incStrong() called on %p after last strong ref", refs);
#if PRINT_REFS
ALOGD("incStrong of %p from %p: cnt=%d\n", this, id, c);
#endif
@ -352,7 +352,7 @@ void RefBase::decStrong(const void* id) const
#if PRINT_REFS
ALOGD("decStrong of %p from %p: cnt=%d\n", this, id, c);
#endif
LOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
ALOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs);
if (c == 1) {
refs->mBase->onLastStrongRef(id);
if ((refs->mFlags&OBJECT_LIFETIME_MASK) == OBJECT_LIFETIME_STRONG) {
@ -369,7 +369,7 @@ void RefBase::forceIncStrong(const void* id) const
refs->addStrongRef(id);
const int32_t c = android_atomic_inc(&refs->mStrong);
LOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
ALOG_ASSERT(c >= 0, "forceIncStrong called on %p after ref count underflow",
refs);
#if PRINT_REFS
ALOGD("forceIncStrong of %p from %p: cnt=%d\n", this, id, c);
@ -399,7 +399,7 @@ void RefBase::weakref_type::incWeak(const void* id)
weakref_impl* const impl = static_cast<weakref_impl*>(this);
impl->addWeakRef(id);
const int32_t c = android_atomic_inc(&impl->mWeak);
LOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this);
ALOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this);
}
@ -408,7 +408,7 @@ void RefBase::weakref_type::decWeak(const void* id)
weakref_impl* const impl = static_cast<weakref_impl*>(this);
impl->removeWeakRef(id);
const int32_t c = android_atomic_dec(&impl->mWeak);
LOG_ASSERT(c >= 1, "decWeak called on %p too many times", this);
ALOG_ASSERT(c >= 1, "decWeak called on %p too many times", this);
if (c != 1) return;
if ((impl->mFlags&OBJECT_LIFETIME_WEAK) == OBJECT_LIFETIME_STRONG) {
@ -442,7 +442,7 @@ bool RefBase::weakref_type::attemptIncStrong(const void* id)
weakref_impl* const impl = static_cast<weakref_impl*>(this);
int32_t curCount = impl->mStrong;
LOG_ASSERT(curCount >= 0, "attemptIncStrong called on %p after underflow",
ALOG_ASSERT(curCount >= 0, "attemptIncStrong called on %p after underflow",
this);
while (curCount > 0 && curCount != INITIAL_STRONG_VALUE) {
if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mStrong) == 0) {
@ -503,7 +503,7 @@ bool RefBase::weakref_type::attemptIncWeak(const void* id)
weakref_impl* const impl = static_cast<weakref_impl*>(this);
int32_t curCount = impl->mWeak;
LOG_ASSERT(curCount >= 0, "attemptIncWeak called on %p after underflow",
ALOG_ASSERT(curCount >= 0, "attemptIncWeak called on %p after underflow",
this);
while (curCount > 0) {
if (android_atomic_cmpxchg(curCount, curCount+1, &impl->mWeak) == 0) {

View file

@ -112,7 +112,7 @@ String16::String16(const char16_t* o)
{
size_t len = strlen16(o);
SharedBuffer* buf = SharedBuffer::alloc((len+1)*sizeof(char16_t));
LOG_ASSERT(buf, "Unable to allocate shared buffer");
ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (buf) {
char16_t* str = (char16_t*)buf->data();
strcpy16(str, o);
@ -126,7 +126,7 @@ String16::String16(const char16_t* o)
String16::String16(const char16_t* o, size_t len)
{
SharedBuffer* buf = SharedBuffer::alloc((len+1)*sizeof(char16_t));
LOG_ASSERT(buf, "Unable to allocate shared buffer");
ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (buf) {
char16_t* str = (char16_t*)buf->data();
memcpy(str, o, len*sizeof(char16_t));

View file

@ -80,7 +80,7 @@ static char* allocFromUTF8(const char* in, size_t len)
{
if (len > 0) {
SharedBuffer* buf = SharedBuffer::alloc(len+1);
LOG_ASSERT(buf, "Unable to allocate shared buffer");
ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (buf) {
char* str = (char*)buf->data();
memcpy(str, in, len);
@ -103,7 +103,7 @@ static char* allocFromUTF16(const char16_t* in, size_t len)
}
SharedBuffer* buf = SharedBuffer::alloc(bytes+1);
LOG_ASSERT(buf, "Unable to allocate shared buffer");
ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (!buf) {
return getEmptyString();
}
@ -125,7 +125,7 @@ static char* allocFromUTF32(const char32_t* in, size_t len)
}
SharedBuffer* buf = SharedBuffer::alloc(bytes+1);
LOG_ASSERT(buf, "Unable to allocate shared buffer");
ALOG_ASSERT(buf, "Unable to allocate shared buffer");
if (!buf) {
return getEmptyString();
}

View file

@ -56,7 +56,7 @@ VectorImpl::VectorImpl(const VectorImpl& rhs)
VectorImpl::~VectorImpl()
{
LOG_ASSERT(!mCount,
ALOG_ASSERT(!mCount,
"[%p] "
"subclasses of VectorImpl must call finish_vector()"
" in their destructor. Leaking %d bytes.",
@ -66,7 +66,7 @@ VectorImpl::~VectorImpl()
VectorImpl& VectorImpl::operator = (const VectorImpl& rhs)
{
LOG_ASSERT(mItemSize == rhs.mItemSize,
ALOG_ASSERT(mItemSize == rhs.mItemSize,
"Vector<> have different types (this=%p, rhs=%p)", this, &rhs);
if (this != &rhs) {
release_storage();
@ -248,7 +248,7 @@ ssize_t VectorImpl::replaceAt(size_t index)
ssize_t VectorImpl::replaceAt(const void* prototype, size_t index)
{
LOG_ASSERT(index<size(),
ALOG_ASSERT(index<size(),
"[%p] replace: index=%d, size=%d", this, (int)index, (int)size());
void* item = editItemLocation(index);
@ -267,7 +267,7 @@ ssize_t VectorImpl::replaceAt(const void* prototype, size_t index)
ssize_t VectorImpl::removeItemsAt(size_t index, size_t count)
{
LOG_ASSERT((index+count)<=size(),
ALOG_ASSERT((index+count)<=size(),
"[%p] remove: index=%d, count=%d, size=%d",
this, (int)index, (int)count, (int)size());
@ -291,7 +291,7 @@ void VectorImpl::clear()
void* VectorImpl::editItemLocation(size_t index)
{
LOG_ASSERT(index<capacity(),
ALOG_ASSERT(index<capacity(),
"[%p] editItemLocation: index=%d, capacity=%d, count=%d",
this, (int)index, (int)capacity(), (int)mCount);
@ -303,7 +303,7 @@ void* VectorImpl::editItemLocation(size_t index)
const void* VectorImpl::itemLocation(size_t index) const
{
LOG_ASSERT(index<capacity(),
ALOG_ASSERT(index<capacity(),
"[%p] itemLocation: index=%d, capacity=%d, count=%d",
this, (int)index, (int)capacity(), (int)mCount);
@ -349,7 +349,7 @@ void* VectorImpl::_grow(size_t where, size_t amount)
// ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
LOG_ASSERT(where <= mCount,
ALOG_ASSERT(where <= mCount,
"[%p] _grow: where=%d, amount=%d, count=%d",
this, (int)where, (int)amount, (int)mCount); // caller already checked
@ -402,7 +402,7 @@ void VectorImpl::_shrink(size_t where, size_t amount)
// ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
LOG_ASSERT(where + amount <= mCount,
ALOG_ASSERT(where + amount <= mCount,
"[%p] _shrink: where=%d, amount=%d, count=%d",
this, (int)where, (int)amount, (int)mCount); // caller already checked