diff options
author | 2011-07-12 23:27:51 -0700 | |
---|---|---|
committer | 2011-07-12 23:27:51 -0700 | |
commit | 3e41c071e603d3b192f471ea3153aa02435f7303 (patch) | |
tree | 1f5d06c67be2d0307e9efe283bc700990cfef8ff /native/src/defines.h | |
parent | 0adf7ae2997a7e4fa2c2d84cad12f6ffd9c31f70 (diff) | |
parent | 20d9fdae3ac12a7efa6daf6f582a3d5a4311a375 (diff) | |
download | latinime-3e41c071e603d3b192f471ea3153aa02435f7303.tar.gz latinime-3e41c071e603d3b192f471ea3153aa02435f7303.tar.xz latinime-3e41c071e603d3b192f471ea3153aa02435f7303.zip |
Merge "Add a flag for a profiling"
Diffstat (limited to 'native/src/defines.h')
-rw-r--r-- | native/src/defines.h | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/native/src/defines.h b/native/src/defines.h index 2c0afbc51..a516190af 100644 --- a/native/src/defines.h +++ b/native/src/defines.h @@ -18,18 +18,7 @@ #ifndef LATINIME_DEFINES_H #define LATINIME_DEFINES_H -#ifdef FLAG_DBG -#include <cutils/log.h> -#ifndef LOG_TAG -#define LOG_TAG "LatinIME: " -#endif -#define DEBUG_DICT true -#define DEBUG_DICT_FULL false -#define DEBUG_SHOW_FOUND_WORD DEBUG_DICT_FULL -#define DEBUG_NODE DEBUG_DICT_FULL -#define DEBUG_TRACE DEBUG_DICT_FULL -#define DEBUG_PROXIMITY_INFO true - +#ifdef FLAG_DO_PROFILE // Profiler #include <time.h> #define PROF_BUF_SIZE 100 @@ -76,16 +65,7 @@ static void prof_out(void) { } } -#else // FLAG_DBG -#define LOGE(fmt, ...) -#define LOGI(fmt, ...) -#define DEBUG_DICT false -#define DEBUG_DICT_FULL false -#define DEBUG_SHOW_FOUND_WORD false -#define DEBUG_NODE false -#define DEBUG_TRACE false -#define DEBUG_PROXIMITY_INFO false - +#else // FLAG_DO_PROFILE #define PROF_BUF_SIZE 0 #define PROF_RESET #define PROF_COUNT(prof_buf_id) @@ -97,6 +77,30 @@ static void prof_out(void) { #define PROF_CLOCKOUT(prof_buf_id) #define PROF_OUTALL +#endif // FLAG_DO_PROFILE + +#ifdef FLAG_DBG +#include <cutils/log.h> +#ifndef LOG_TAG +#define LOG_TAG "LatinIME: " +#endif +#define DEBUG_DICT true +#define DEBUG_DICT_FULL false +#define DEBUG_SHOW_FOUND_WORD DEBUG_DICT_FULL +#define DEBUG_NODE DEBUG_DICT_FULL +#define DEBUG_TRACE DEBUG_DICT_FULL +#define DEBUG_PROXIMITY_INFO true + +#else // FLAG_DBG +#define LOGE(fmt, ...) +#define LOGI(fmt, ...) +#define DEBUG_DICT false +#define DEBUG_DICT_FULL false +#define DEBUG_SHOW_FOUND_WORD false +#define DEBUG_NODE false +#define DEBUG_TRACE false +#define DEBUG_PROXIMITY_INFO false + #endif // FLAG_DBG #ifndef U_SHORT_MAX |