Skip to content

Commit

Permalink
am ba7f0d2: Merge "Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)"
Browse files Browse the repository at this point in the history
* commit 'ba7f0d2a03643ce429421b81febf18fd50473070':
  Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
  • Loading branch information
Jean-Baptiste Queru authored and Android Git Automerger committed Jan 20, 2012
2 parents 97aa8ee + ba7f0d2 commit 7ae8420
Show file tree
Hide file tree
Showing 135 changed files with 821 additions and 821 deletions.
6 changes: 3 additions & 3 deletions cmds/bootanimation/BootAnimation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ sp<SurfaceComposerClient> BootAnimation::session() const {
void BootAnimation::binderDied(const wp<IBinder>& who)
{
// woah, surfaceflinger died!
LOGD("SurfaceFlinger died, exiting...");
ALOGD("SurfaceFlinger died, exiting...");

// calling requestExit() is not enough here because the Surface code
// might be blocked on a condition variable that will never be updated.
Expand Down Expand Up @@ -394,13 +394,13 @@ bool BootAnimation::movie()
int fps, width, height, count, pause;
char path[256];
if (sscanf(l, "%d %d %d", &width, &height, &fps) == 3) {
//LOGD("> w=%d, h=%d, fps=%d", fps, width, height);
//ALOGD("> w=%d, h=%d, fps=%d", fps, width, height);
animation.width = width;
animation.height = height;
animation.fps = fps;
}
if (sscanf(l, "p %d %d %s", &count, &pause, path) == 3) {
//LOGD("> count=%d, pause=%d, path=%s", count, pause, path);
//ALOGD("> count=%d, pause=%d, path=%s", count, pause, path);
Animation::Part part;
part.count = count;
part.pause = pause;
Expand Down
2 changes: 1 addition & 1 deletion core/jni/ActivityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int openContentProviderFile(const String16& uri)
}
} else {
// An exception was thrown back; fall through to return failure
LOGD("openContentUri(%s) caught exception %d\n",
ALOGD("openContentUri(%s) caught exception %d\n",
String8(uri).string(), exceptionCode);
}
}
Expand Down
14 changes: 7 additions & 7 deletions core/jni/AndroidRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ status_t AndroidRuntime::callMain(const char* className,
JNIEnv* env;
jmethodID methodId;

LOGD("Calling main entry %s", className);
ALOGD("Calling main entry %s", className);

env = getJNIEnv();
if (clazz == NULL || env == NULL) {
Expand Down Expand Up @@ -416,7 +416,7 @@ static void readLocale(char* language, char* region)
}
strncat(language, propLang, 2);
strncat(region, propRegn, 2);
//LOGD("language=%s region=%s\n", language, region);
//ALOGD("language=%s region=%s\n", language, region);
}

/*
Expand Down Expand Up @@ -629,7 +629,7 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv)
"-agentlib:jdwp=transport=dt_android_adb,suspend=n,server=y";
mOptions.add(opt);

LOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
ALOGD("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
if (checkJni) {
/* extended JNI checking */
opt.optionString = "-Xcheck:jni";
Expand Down Expand Up @@ -798,7 +798,7 @@ char* AndroidRuntime::toSlashClassName(const char* className)
*/
void AndroidRuntime::start(const char* className, const char* options)
{
LOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n",
ALOGD("\n>>>>>> AndroidRuntime START %s <<<<<<\n",
className != NULL ? className : "(unknown)");

blockSigpipe();
Expand All @@ -825,7 +825,7 @@ void AndroidRuntime::start(const char* className, const char* options)
}

//const char* kernelHack = getenv("LD_ASSUME_KERNEL");
//LOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);
//ALOGD("Found LD_ASSUME_KERNEL='%s'\n", kernelHack);

/* start the virtual machine */
JNIEnv* env;
Expand Down Expand Up @@ -888,7 +888,7 @@ void AndroidRuntime::start(const char* className, const char* options)
}
free(slashClassName);

LOGD("Shutting down VM\n");
ALOGD("Shutting down VM\n");
if (mJavaVM->DetachCurrentThread() != JNI_OK)
LOGW("Warning: unable to detach main thread\n");
if (mJavaVM->DestroyJavaVM() != 0)
Expand Down Expand Up @@ -1064,7 +1064,7 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env
for (size_t i = 0; i < count; i++) {
if (array[i].mProc(env) < 0) {
#ifndef NDEBUG
LOGD("----------!!! %s failed to load\n", array[i].mName);
ALOGD("----------!!! %s failed to load\n", array[i].mName);
#endif
return -1;
}
Expand Down
2 changes: 1 addition & 1 deletion core/jni/android/graphics/Canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ class SkCanvasGlue {
#endif
canvas->drawPicture(*picture);
#ifdef TIME_DRAW
LOGD("---- picture playback %d ms\n", get_thread_msec() - now);
ALOGD("---- picture playback %d ms\n", get_thread_msec() - now);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion core/jni/android/graphics/HarfbuzzSkia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static void glyphsToAdvances(HB_Font hbFont, const HB_Glyph* glyphs, hb_uint32 n
for (unsigned i = 0; i < numGlyphs; ++i) {
advances[i] = SkScalarToHBFixed(scalarAdvances[i]);
#if DEBUG_ADVANCES
LOGD("glyphsToAdvances -- advances[%d]=%d", i, advances[i]);
ALOGD("glyphsToAdvances -- advances[%d]=%d", i, advances[i]);
#endif
}
delete glyphs16;
Expand Down
8 changes: 4 additions & 4 deletions core/jni/android/graphics/TextLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void TextLayout::computeAdvancesWithICU(SkPaint* paint, const UChar* chars,
jfloat totalAdvance = 0;
if (widths < count) {
#if DEBUG_ADVANCES
LOGD("ICU -- count=%d", widths);
ALOGD("ICU -- count=%d", widths);
#endif
// Skia operates on code points, not code units, so surrogate pairs return only
// one value. Expand the result so we have one value per UTF-16 code unit.
Expand All @@ -367,17 +367,17 @@ void TextLayout::computeAdvancesWithICU(SkPaint* paint, const UChar* chars,
outAdvances[p++] = 0;
}
#if DEBUG_ADVANCES
LOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
ALOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
#endif
}
} else {
#if DEBUG_ADVANCES
LOGD("ICU -- count=%d", count);
ALOGD("ICU -- count=%d", count);
#endif
for (size_t i = 0; i < count; i++) {
totalAdvance += outAdvances[i] = SkScalarToFloat(scalarArray[i]);
#if DEBUG_ADVANCES
LOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
ALOGD("icu-adv = %f - total = %f", outAdvances[i], totalAdvance);
#endif
}
}
Expand Down
64 changes: 32 additions & 32 deletions core/jni/android/graphics/TextLayoutCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ void TextLayoutCache::init() {

mDebugLevel = readRtlDebugLevel();
mDebugEnabled = mDebugLevel & kRtlDebugCaches;
LOGD("Using debug level: %d - Debug Enabled: %d", mDebugLevel, mDebugEnabled);
ALOGD("Using debug level: %d - Debug Enabled: %d", mDebugLevel, mDebugEnabled);

mCacheStartTime = systemTime(SYSTEM_TIME_MONOTONIC);

if (mDebugEnabled) {
LOGD("Initialization is done - Start time: %lld", mCacheStartTime);
ALOGD("Initialization is done - Start time: %lld", mCacheStartTime);
}

mInitialized = true;
Expand Down Expand Up @@ -89,7 +89,7 @@ void TextLayoutCache::operator()(TextLayoutCacheKey& text, sp<TextLayoutCacheVal
size_t totalSizeToDelete = text.getSize() + desc->getSize();
mSize -= totalSizeToDelete;
if (mDebugEnabled) {
LOGD("Cache value deleted, size = %d", totalSizeToDelete);
ALOGD("Cache value deleted, size = %d", totalSizeToDelete);
}
desc.clear();
}
Expand Down Expand Up @@ -138,7 +138,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
// Cleanup to make some room if needed
if (mSize + size > mMaxSize) {
if (mDebugEnabled) {
LOGD("Need to clean some entries for making some room for a new entry");
ALOGD("Need to clean some entries for making some room for a new entry");
}
while (mSize + size > mMaxSize) {
// This will call the callback
Expand All @@ -157,15 +157,15 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
// Update timing information for statistics
value->setElapsedTime(endTime - startTime);

LOGD("CACHE MISS: Added entry with "
ALOGD("CACHE MISS: Added entry with "
"count=%d, entry size %d bytes, remaining space %d bytes"
" - Compute time in nanos: %d - Text='%s' ",
count, size, mMaxSize - mSize, value->getElapsedTime(),
String8(text, count).string());
}
} else {
if (mDebugEnabled) {
LOGD("CACHE MISS: Calculated but not storing entry because it is too big "
ALOGD("CACHE MISS: Calculated but not storing entry because it is too big "
"with start=%d count=%d contextCount=%d, "
"entry size %d bytes, remaining space %d bytes"
" - Compute time in nanos: %lld - Text='%s'",
Expand All @@ -183,7 +183,7 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
if (value->getElapsedTime() > 0) {
float deltaPercent = 100 * ((value->getElapsedTime() - elapsedTimeThruCacheGet)
/ ((float)value->getElapsedTime()));
LOGD("CACHE HIT #%d with start=%d count=%d contextCount=%d"
ALOGD("CACHE HIT #%d with start=%d count=%d contextCount=%d"
"- Compute time in nanos: %d - "
"Cache get time in nanos: %lld - Gain in percent: %2.2f - Text='%s' ",
mCacheHitCount, start, count, contextCount,
Expand All @@ -201,17 +201,17 @@ sp<TextLayoutCacheValue> TextLayoutCache::getValue(SkPaint* paint,
void TextLayoutCache::dumpCacheStats() {
float remainingPercent = 100 * ((mMaxSize - mSize) / ((float)mMaxSize));
float timeRunningInSec = (systemTime(SYSTEM_TIME_MONOTONIC) - mCacheStartTime) / 1000000000;
LOGD("------------------------------------------------");
LOGD("Cache stats");
LOGD("------------------------------------------------");
LOGD("pid : %d", getpid());
LOGD("running : %.0f seconds", timeRunningInSec);
LOGD("entries : %d", mCache.size());
LOGD("size : %d bytes", mMaxSize);
LOGD("remaining : %d bytes or %2.2f percent", mMaxSize - mSize, remainingPercent);
LOGD("hits : %d", mCacheHitCount);
LOGD("saved : %lld milliseconds", mNanosecondsSaved / 1000000);
LOGD("------------------------------------------------");
ALOGD("------------------------------------------------");
ALOGD("Cache stats");
ALOGD("------------------------------------------------");
ALOGD("pid : %d", getpid());
ALOGD("running : %.0f seconds", timeRunningInSec);
ALOGD("entries : %d", mCache.size());
ALOGD("size : %d bytes", mMaxSize);
ALOGD("remaining : %d bytes or %2.2f percent", mMaxSize - mSize, remainingPercent);
ALOGD("hits : %d", mCacheHitCount);
ALOGD("saved : %lld milliseconds", mNanosecondsSaved / 1000000);
ALOGD("------------------------------------------------");
}

/**
Expand Down Expand Up @@ -319,7 +319,7 @@ void TextLayoutCacheValue::computeValues(SkPaint* paint, const UChar* chars,
computeValuesWithHarfbuzz(paint, chars, start, count, contextCount, dirFlags,
&mAdvances, &mTotalAdvance, &mGlyphs);
#if DEBUG_ADVANCES
LOGD("Advances - start=%d, count=%d, countextCount=%d, totalAdvance=%f", start, count,
ALOGD("Advances - start=%d, count=%d, countextCount=%d, totalAdvance=%f", start, count,
contextCount, mTotalAdvance);
#endif
}
Expand Down Expand Up @@ -434,14 +434,14 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
if (bidi) {
UErrorCode status = U_ZERO_ERROR;
#if DEBUG_GLYPHS
LOGD("computeValuesWithHarfbuzz -- bidiReq=%d", bidiReq);
ALOGD("computeValuesWithHarfbuzz -- bidiReq=%d", bidiReq);
#endif
ubidi_setPara(bidi, chars, contextCount, bidiReq, NULL, &status);
if (U_SUCCESS(status)) {
int paraDir = ubidi_getParaLevel(bidi) & kDirection_Mask; // 0 if ltr, 1 if rtl
ssize_t rc = ubidi_countRuns(bidi, &status);
#if DEBUG_GLYPHS
LOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d",
ALOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d",
dirFlags, rc, paraDir);
#endif
if (U_SUCCESS(status) && rc == 1) {
Expand Down Expand Up @@ -489,7 +489,7 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
isRTL = (runDir == UBIDI_RTL);
jfloat runTotalAdvance = 0;
#if DEBUG_GLYPHS
LOGD("computeValuesWithHarfbuzz -- run-start=%d run-len=%d isRTL=%d",
ALOGD("computeValuesWithHarfbuzz -- run-start=%d run-len=%d isRTL=%d",
startRun, lengthRun, isRTL);
#endif
computeRunValuesWithHarfbuzz(shaperItem, paint,
Expand All @@ -515,7 +515,7 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
// Default single run case
if (useSingleRun){
#if DEBUG_GLYPHS
LOGD("computeValuesWithHarfbuzz -- Using a SINGLE Run "
ALOGD("computeValuesWithHarfbuzz -- Using a SINGLE Run "
"-- run-start=%d run-len=%d isRTL=%d", start, count, isRTL);
#endif
computeRunValuesWithHarfbuzz(shaperItem, paint,
Expand All @@ -527,14 +527,14 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
freeShaperItem(shaperItem);

#if DEBUG_GLYPHS
LOGD("computeValuesWithHarfbuzz -- total-glyphs-count=%d", outGlyphs->size());
ALOGD("computeValuesWithHarfbuzz -- total-glyphs-count=%d", outGlyphs->size());
#endif
}

static void logGlyphs(HB_ShaperItem shaperItem) {
LOGD("Got glyphs - count=%d", shaperItem.num_glyphs);
ALOGD("Got glyphs - count=%d", shaperItem.num_glyphs);
for (size_t i = 0; i < shaperItem.num_glyphs; i++) {
LOGD(" glyph[%d]=%d - offset.x=%f offset.y=%f", i, shaperItem.glyphs[i],
ALOGD(" glyph[%d]=%d - offset.x=%f offset.y=%f", i, shaperItem.glyphs[i],
HBFixedToFloat(shaperItem.offsets[i].x),
HBFixedToFloat(shaperItem.offsets[i].y));
}
Expand All @@ -552,17 +552,17 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte
shapeRun(shaperItem, start, count, isRTL);

#if DEBUG_GLYPHS
LOGD("HARFBUZZ -- num_glypth=%d - kerning_applied=%d", shaperItem.num_glyphs,
ALOGD("HARFBUZZ -- num_glypth=%d - kerning_applied=%d", shaperItem.num_glyphs,
shaperItem.kerning_applied);
LOGD(" -- string= '%s'", String8(shaperItem.string + start, count).string());
LOGD(" -- isDevKernText=%d", paint->isDevKernText());
ALOGD(" -- string= '%s'", String8(shaperItem.string + start, count).string());
ALOGD(" -- isDevKernText=%d", paint->isDevKernText());

logGlyphs(shaperItem);
#endif

if (shaperItem.advances == NULL || shaperItem.num_glyphs == 0) {
#if DEBUG_GLYPHS
LOGD("HARFBUZZ -- advances array is empty or num_glypth = 0");
ALOGD("HARFBUZZ -- advances array is empty or num_glypth = 0");
#endif
outAdvances->insertAt(0, outAdvances->size(), count);
*outTotalAdvance = 0;
Expand All @@ -588,7 +588,7 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte

#if DEBUG_ADVANCES
for (size_t i = 0; i < count; i++) {
LOGD("hb-adv[%d] = %f - log_clusters = %d - total = %f", i,
ALOGD("hb-adv[%d] = %f - log_clusters = %d - total = %f", i,
(*outAdvances)[i], shaperItem.log_clusters[i], totalAdvance);
}
#endif
Expand All @@ -599,7 +599,7 @@ void TextLayoutCacheValue::computeRunValuesWithHarfbuzz(HB_ShaperItem& shaperIte
for (size_t i = 0; i < countGlyphs; i++) {
jchar glyph = (jchar) shaperItem.glyphs[(!isRTL) ? i : countGlyphs - 1 - i];
#if DEBUG_GLYPHS
LOGD("HARFBUZZ -- glyph[%d]=%d", i, glyph);
ALOGD("HARFBUZZ -- glyph[%d]=%d", i, glyph);
#endif
outGlyphs->add(glyph);
}
Expand Down
2 changes: 1 addition & 1 deletion core/jni/android_app_NativeActivity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ static const char* const kNativeActivityPathName = "android/app/NativeActivity";

int register_android_app_NativeActivity(JNIEnv* env)
{
//LOGD("register_android_app_NativeActivity");
//ALOGD("register_android_app_NativeActivity");
jclass clazz;
FIND_CLASS(clazz, kNativeActivityPathName);

Expand Down
4 changes: 2 additions & 2 deletions core/jni/android_backup_BackupDataInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ readNextHeader_native(JNIEnv* env, jobject clazz, int r, jobject entity)
return 0;
}
default:
LOGD("Unknown header type: 0x%08x\n", type);
ALOGD("Unknown header type: 0x%08x\n", type);
return -1;
}

Expand Down Expand Up @@ -133,7 +133,7 @@ static const JNINativeMethod g_methods[] = {

int register_android_backup_BackupDataInput(JNIEnv* env)
{
//LOGD("register_android_backup_BackupDataInput");
//ALOGD("register_android_backup_BackupDataInput");

jclass clazz = env->FindClass("android/app/backup/BackupDataInput$EntityHeader");
LOG_FATAL_IF(clazz == NULL, "Unable to find class android.app.backup.BackupDataInput.EntityHeader");
Expand Down
2 changes: 1 addition & 1 deletion core/jni/android_backup_BackupDataOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static const JNINativeMethod g_methods[] = {

int register_android_backup_BackupDataOutput(JNIEnv* env)
{
//LOGD("register_android_backup_BackupDataOutput");
//ALOGD("register_android_backup_BackupDataOutput");
return AndroidRuntime::registerNativeMethods(env, "android/app/backup/BackupDataOutput",
g_methods, NELEM(g_methods));
}
Expand Down
10 changes: 5 additions & 5 deletions core/jni/android_backup_BackupHelperDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ readHeader_native(JNIEnv* env, jobject clazz, jobject headerObj, jobject fdObj)
}

#if 0
LOGD("chunk header:");
LOGD(" headerSize=%d", flattenedHeader.headerSize);
LOGD(" version=0x%08x", flattenedHeader.version);
LOGD(" dataSize=%d", flattenedHeader.dataSize);
LOGD(" nameLength=%d", flattenedHeader.nameLength);
ALOGD("chunk header:");
ALOGD(" headerSize=%d", flattenedHeader.headerSize);
ALOGD(" version=0x%08x", flattenedHeader.version);
ALOGD(" dataSize=%d", flattenedHeader.dataSize);
ALOGD(" nameLength=%d", flattenedHeader.nameLength);
#endif

if (flattenedHeader.dataSize < 0 || flattenedHeader.nameLength < 0 ||
Expand Down
Loading

0 comments on commit 7ae8420

Please sign in to comment.