Refine DebugHelper.h into Log.h.

This removes USE_FUNC_LOGGER from libbcc-config.mk.
diff --git a/include/bcc/ExecutionEngine/SymbolResolverProxy.h b/include/bcc/ExecutionEngine/SymbolResolverProxy.h
index bf489d1..996b829 100644
--- a/include/bcc/ExecutionEngine/SymbolResolverProxy.h
+++ b/include/bcc/ExecutionEngine/SymbolResolverProxy.h
@@ -18,7 +18,7 @@
 #define BCC_EXECUTION_ENGINE_SYMBOL_RESOLVER_PROXY_H
 
 #include "bcc/ExecutionEngine/SymbolResolverInterface.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 #include <utils/Vector.h>
 
diff --git a/include/bcc/RenderScript/RSExecutable.h b/include/bcc/RenderScript/RSExecutable.h
index 24e7f1f..22131b7 100644
--- a/include/bcc/RenderScript/RSExecutable.h
+++ b/include/bcc/RenderScript/RSExecutable.h
@@ -22,7 +22,7 @@
 
 #include "bcc/ExecutionEngine/ObjectLoader.h"
 #include "bcc/RenderScript/RSInfo.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 #include <utils/Vector.h>
 
diff --git a/include/bcc/RenderScript/RSInfo.h b/include/bcc/RenderScript/RSInfo.h
index d621a72..bdabe3a 100644
--- a/include/bcc/RenderScript/RSInfo.h
+++ b/include/bcc/RenderScript/RSInfo.h
@@ -22,7 +22,7 @@
 #include <utility>
 
 #include "bcc/RenderScript/RSScript.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 #include <utils/String8.h>
 #include <utils/Vector.h>
diff --git a/include/bcc/Support/DebugHelper.h b/include/bcc/Support/DebugHelper.h
deleted file mode 100644
index 2d5d019..0000000
--- a/include/bcc/Support/DebugHelper.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2010-2012, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef BCC_SUPPORT_DEBUG_HELPER_H
-#define BCC_SUPPORT_DEBUG_HELPER_H
-
-#include "bcc/Config/Config.h"
-
-#define LOG_TAG "bcc"
-#include <cutils/log.h>
-
-#if !USE_FUNC_LOGGER
-
-#define BCC_FUNC_LOGGER()
-
-#else // USE_FUNC_LOGGER
-
-#if defined(__cplusplus)
-namespace bcc {
-  class FuncLogger {
-  private:
-    char const *mFuncName;
-
-  public:
-    FuncLogger(char const *name) : mFuncName(name) {
-      ALOGD("---> BEGIN: libbcc [ %s ]\n", name);
-    }
-
-    ~FuncLogger() {
-      ALOGD("---> END: libbcc [ %s ]\n", mFuncName);
-    }
-  };
-} // namespace bcc
-
-#define BCC_FUNC_LOGGER() bcc::FuncLogger XX__FuncLogger(__func__)
-#endif
-
-#endif
-
-#endif // BCC_SUPPORT_DEBUG_HELPER_H
diff --git a/include/bcc/Support/Log.h b/include/bcc/Support/Log.h
new file mode 100644
index 0000000..f4079ef
--- /dev/null
+++ b/include/bcc/Support/Log.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2012, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef BCC_SUPPORT_LOG_H
+#define BCC_SUPPORT_LOG_H
+
+#ifndef LOG_TAG
+#   define LOG_TAG "bcc"
+#   include <cutils/log.h>
+#endif
+
+#endif // BCC_SUPPORT_LOG_H
diff --git a/lib/Core/BCCContext.cpp b/lib/Core/BCCContext.cpp
index e2284de..2aa2882 100644
--- a/lib/Core/BCCContext.cpp
+++ b/lib/Core/BCCContext.cpp
@@ -19,7 +19,7 @@
 #include <new>
 
 #include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 #include "BCCContextImpl.h"
 
diff --git a/lib/Core/Compiler.cpp b/lib/Core/Compiler.cpp
index 97b18bc..c229098 100644
--- a/lib/Core/Compiler.cpp
+++ b/lib/Core/Compiler.cpp
@@ -30,7 +30,7 @@
 #include "bcc/Script.h"
 #include "bcc/Source.h"
 #include "bcc/Support/CompilerConfig.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/OutputFile.h"
 
 using namespace bcc;
diff --git a/lib/Core/Source.cpp b/lib/Core/Source.cpp
index ad5561b..17d0363 100644
--- a/lib/Core/Source.cpp
+++ b/lib/Core/Source.cpp
@@ -26,7 +26,7 @@
 #include <llvm/Support/system_error.h>
 
 #include "bcc/BCCContext.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 #include "BCCContextImpl.h"
 
diff --git a/lib/Core/bcc.cpp b/lib/Core/bcc.cpp
index a8589ff..fd1153c 100644
--- a/lib/Core/bcc.cpp
+++ b/lib/Core/bcc.cpp
@@ -29,7 +29,7 @@
 #include "bcc/RenderScript/RSExecutable.h"
 #include "bcc/RenderScript/RSScript.h"
 #include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/Initialization.h"
 #include "bcc/Support/Sha1Helper.h"
 
@@ -52,7 +52,6 @@
 }
 
 extern "C" BCCScriptRef bccCreateScript() {
-  BCC_FUNC_LOGGER();
   bccPrintBuildStamp();
   init::Initialize();
   RSScriptContext *rsctx = new (std::nothrow) RSScriptContext();
@@ -65,7 +64,6 @@
 
 
 extern "C" void bccDisposeScript(BCCScriptRef script) {
-  BCC_FUNC_LOGGER();
   RSScriptContext *rsctx = unwrap(script);
   if (rsctx != NULL) {
     delete rsctx->script;
@@ -78,7 +76,6 @@
 extern "C" int bccRegisterSymbolCallback(BCCScriptRef script,
                                          BCCSymbolLookupFn pFn,
                                          void *pContext) {
-  BCC_FUNC_LOGGER();
   unwrap(script)->driver.setRSRuntimeLookupFunction(pFn);
   unwrap(script)->driver.setRSRuntimeLookupContext(pContext);
   return BCC_NO_ERROR;
@@ -86,7 +83,6 @@
 
 
 extern "C" int bccGetError(BCCScriptRef script) {
-  BCC_FUNC_LOGGER();
   return BCC_DEPRECATED_API;
 }
 
@@ -225,7 +221,6 @@
                          char const *bitcode,
                          size_t bitcodeSize,
                          unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return (helper_add_source(unwrap(script), resName,
                             bitcode, bitcodeSize,
                             flags, /* pIsLink */false) == false);
@@ -236,7 +231,6 @@
                              char const *resName /* deprecated */,
                              LLVMModuleRef module,
                              unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return (helper_add_source(unwrap(script), unwrap(module),
                             /* pIsLink */false) == false);
 }
@@ -245,7 +239,6 @@
 extern "C" int bccReadFile(BCCScriptRef script,
                            char const *path,
                            unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return (helper_add_source(unwrap(script), path,
                             flags, /* pIsLink */false) == false);
 }
@@ -256,7 +249,6 @@
                          char const *bitcode,
                          size_t bitcodeSize,
                          unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return (helper_add_source(unwrap(script), resName,
                             bitcode, bitcodeSize,
                             flags, /* pIsLink */true) == false);
@@ -266,14 +258,12 @@
 extern "C" int bccLinkFile(BCCScriptRef script,
                            char const *path,
                            unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return (helper_add_source(unwrap(script), path,
                             flags, /* pIsLink */true) == false);
 }
 
 
 extern "C" void bccMarkExternalSymbol(BCCScriptRef script, char const *name) {
-  BCC_FUNC_LOGGER();
   return /* BCC_DEPRECATED_API */;
 }
 
@@ -282,7 +272,6 @@
                                      char const *objPath,
                                      bccRelocModelEnum RelocModel,
                                      unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return BCC_DEPRECATED_API;
 }
 
@@ -291,7 +280,6 @@
                                       char const *objPath,
                                       char const *dsoPath,
                                       unsigned long flags) {
-  BCC_FUNC_LOGGER();
   return BCC_DEPRECATED_API;
 }
 
@@ -300,8 +288,6 @@
                                     char const *cacheDir,
                                     char const *cacheName,
                                     unsigned long flags) {
-  BCC_FUNC_LOGGER();
-
   android::StopWatch compileTimer("bcc: PrepareExecutable time");
 
   RSScriptContext *rsctx = unwrap(script);
@@ -331,7 +317,6 @@
 
 
 extern "C" void *bccGetFuncAddr(BCCScriptRef script, char const *funcname) {
-  BCC_FUNC_LOGGER();
 
   RSScriptContext *rsctx = unwrap(script);
 
@@ -351,8 +336,6 @@
 extern "C" void bccGetExportVarList(BCCScriptRef script,
                                     size_t varListSize,
                                     void **varList) {
-  BCC_FUNC_LOGGER();
-
   const RSScriptContext *rsctx = unwrap(script);
   if (varList && rsctx->result) {
     const android::Vector<void *> &export_var_addrs =
@@ -383,8 +366,6 @@
 extern "C" void bccGetExportFuncList(BCCScriptRef script,
                                      size_t funcListSize,
                                      void **funcList) {
-  BCC_FUNC_LOGGER();
-
   const RSScriptContext *rsctx = unwrap(script);
   if (funcList && rsctx->result) {
     const android::Vector<void *> &export_func_addrs =
@@ -415,8 +396,6 @@
 extern "C" void bccGetExportForEachList(BCCScriptRef script,
                                         size_t forEachListSize,
                                         void **forEachList) {
-  BCC_FUNC_LOGGER();
-
   const RSScriptContext *rsctx = unwrap(script);
   if (forEachList && rsctx->result) {
     const android::Vector<void *> &export_foreach_func_addrs =
diff --git a/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp b/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
index 82eac5f..86e6efd 100644
--- a/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
+++ b/lib/ExecutionEngine/ELFObjectLoaderImpl.cpp
@@ -25,7 +25,7 @@
 #include "utils/serialize.h"
 
 #include "bcc/ExecutionEngine/SymbolResolverInterface.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/ExecutionEngine/ObjectLoader.cpp b/lib/ExecutionEngine/ObjectLoader.cpp
index 1277e13..8ec3dd2 100644
--- a/lib/ExecutionEngine/ObjectLoader.cpp
+++ b/lib/ExecutionEngine/ObjectLoader.cpp
@@ -19,8 +19,8 @@
 #include <utils/FileMap.h>
 
 #include "bcc/ExecutionEngine/GDBJITRegistrar.h"
-#include "bcc/Support/DebugHelper.h"
 #include "bcc/Support/FileBase.h"
+#include "bcc/Support/Log.h"
 
 #include "ELFObjectLoaderImpl.h"
 
diff --git a/lib/RenderScript/RSCompiler.cpp b/lib/RenderScript/RSCompiler.cpp
index 4325f11..324696f 100644
--- a/lib/RenderScript/RSCompiler.cpp
+++ b/lib/RenderScript/RSCompiler.cpp
@@ -25,7 +25,7 @@
 #include "bcc/RenderScript/RSScript.h"
 #include "bcc/RenderScript/RSTransforms.h"
 #include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSCompilerDriver.cpp b/lib/RenderScript/RSCompilerDriver.cpp
index 0089a28..da87968 100644
--- a/lib/RenderScript/RSCompilerDriver.cpp
+++ b/lib/RenderScript/RSCompilerDriver.cpp
@@ -19,8 +19,8 @@
 #include "bcc/RenderScript/RSExecutable.h"
 #include "bcc/Support/CompilerConfig.h"
 #include "bcc/Support/TargetCompilerConfigs.h"
-#include "bcc/Support/DebugHelper.h"
 #include "bcc/Support/FileMutex.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/InputFile.h"
 #include "bcc/Support/Initialization.h"
 #include "bcc/Support/OutputFile.h"
diff --git a/lib/RenderScript/RSExecutable.cpp b/lib/RenderScript/RSExecutable.cpp
index de730ed..bbb31db 100644
--- a/lib/RenderScript/RSExecutable.cpp
+++ b/lib/RenderScript/RSExecutable.cpp
@@ -16,8 +16,8 @@
 
 #include "bcc/RenderScript/RSExecutable.h"
 
-#include "bcc/Support/DebugHelper.h"
 #include "bcc/Support/FileBase.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/OutputFile.h"
 #include "bcc/ExecutionEngine/SymbolResolverProxy.h"
 
diff --git a/lib/RenderScript/RSForEachExpand.cpp b/lib/RenderScript/RSForEachExpand.cpp
index 2c7315e..cf5008f 100644
--- a/lib/RenderScript/RSForEachExpand.cpp
+++ b/lib/RenderScript/RSForEachExpand.cpp
@@ -28,8 +28,8 @@
 #include <llvm/Type.h>
 
 #include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
 #include "bcc/RenderScript/RSInfo.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSInfo.cpp b/lib/RenderScript/RSInfo.cpp
index 0d31e38..536c83b 100644
--- a/lib/RenderScript/RSInfo.cpp
+++ b/lib/RenderScript/RSInfo.cpp
@@ -21,7 +21,7 @@
 #include <new>
 
 #include "bcc/Support/FileBase.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/Sha1Helper.h"
 
 using namespace bcc;
diff --git a/lib/RenderScript/RSInfoExtractor.cpp b/lib/RenderScript/RSInfoExtractor.cpp
index 2c55c4c..549e5e0 100644
--- a/lib/RenderScript/RSInfoExtractor.cpp
+++ b/lib/RenderScript/RSInfoExtractor.cpp
@@ -24,7 +24,7 @@
 #include <llvm/Module.h>
 
 #include "bcc/Source.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/RenderScript/RSInfoReader.cpp b/lib/RenderScript/RSInfoReader.cpp
index 4e42ffd..035209a 100644
--- a/lib/RenderScript/RSInfoReader.cpp
+++ b/lib/RenderScript/RSInfoReader.cpp
@@ -24,7 +24,7 @@
 
 #include <utils/FileMap.h>
 
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/InputFile.h"
 
 using namespace bcc;
diff --git a/lib/RenderScript/RSInfoWriter.cpp b/lib/RenderScript/RSInfoWriter.cpp
index 1f19839..3cfb8da 100644
--- a/lib/RenderScript/RSInfoWriter.cpp
+++ b/lib/RenderScript/RSInfoWriter.cpp
@@ -20,7 +20,7 @@
 
 #include "bcc/RenderScript/RSInfo.h"
 
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/OutputFile.h"
 
 using namespace bcc;
diff --git a/lib/RenderScript/RSScript.cpp b/lib/RenderScript/RSScript.cpp
index 4cf8475..ef39897 100644
--- a/lib/RenderScript/RSScript.cpp
+++ b/lib/RenderScript/RSScript.cpp
@@ -20,7 +20,7 @@
 
 #include <llvm/ADT/STLExtras.h>
 
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/Support/CompilerConfig.cpp b/lib/Support/CompilerConfig.cpp
index f96c8a9..8465fec 100644
--- a/lib/Support/CompilerConfig.cpp
+++ b/lib/Support/CompilerConfig.cpp
@@ -20,7 +20,7 @@
 #include <llvm/MC/SubtargetFeature.h>
 #include <llvm/Support/TargetRegistry.h>
 
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/TargetCompilerConfigs.h"
 
 using namespace bcc;
diff --git a/lib/Support/Disassembler.cpp b/lib/Support/Disassembler.cpp
index b22ff81..5179d0d 100644
--- a/lib/Support/Disassembler.cpp
+++ b/lib/Support/Disassembler.cpp
@@ -33,7 +33,7 @@
 #include <llvm/Target/TargetOptions.h>
 
 #include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 #if USE_DISASSEMBLER
 
diff --git a/lib/Support/Initialization.cpp b/lib/Support/Initialization.cpp
index eb4428c..ad233af 100644
--- a/lib/Support/Initialization.cpp
+++ b/lib/Support/Initialization.cpp
@@ -22,7 +22,7 @@
 #include <llvm/Support/TargetSelect.h>
 
 #include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 namespace {
 
diff --git a/lib/Support/InputFile.cpp b/lib/Support/InputFile.cpp
index 729a5fb..eeae894 100644
--- a/lib/Support/InputFile.cpp
+++ b/lib/Support/InputFile.cpp
@@ -16,7 +16,7 @@
 
 #include "bcc/Support/InputFile.h"
 
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/Support/OutputFile.cpp b/lib/Support/OutputFile.cpp
index e9a8c12..e8e66e6 100644
--- a/lib/Support/OutputFile.cpp
+++ b/lib/Support/OutputFile.cpp
@@ -20,7 +20,7 @@
 
 #include <llvm/Support/raw_ostream.h>
 
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 
 using namespace bcc;
 
diff --git a/lib/Support/Sha1Helper.cpp b/lib/Support/Sha1Helper.cpp
index 350e704..6885131 100644
--- a/lib/Support/Sha1Helper.cpp
+++ b/lib/Support/Sha1Helper.cpp
@@ -21,7 +21,7 @@
 #include <utils/StopWatch.h>
 
 #include "bcc/Config/Config.h"
-#include "bcc/Support/DebugHelper.h"
+#include "bcc/Support/Log.h"
 #include "bcc/Support/InputFile.h"
 
 #include "sha1.h"
diff --git a/libbcc-config.mk b/libbcc-config.mk
index debf929..bd243ee 100644
--- a/libbcc-config.mk
+++ b/libbcc-config.mk
@@ -21,7 +21,6 @@
 
 libbcc_DEBUG_MC_DISASSEMBLER        := 0
 
-libbcc_USE_FUNC_LOGGER              := 0
 libbcc_DEBUG_BCC_REFLECT            := 0
 libbcc_DEBUG_MC_REFLECT             := 0