Merge "log: Add check for LINT_RLOG"
This commit is contained in:
commit
e65c2210d0
1 changed files with 23 additions and 4 deletions
|
|
@ -67,6 +67,23 @@ extern "C" {
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef __predict_false
|
||||||
|
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* -DLINT_RLOG in sources that you want to enforce that all logging
|
||||||
|
* goes to the radio log buffer. If any logging goes to any of the other
|
||||||
|
* log buffers, there will be a compile or link error to highlight the
|
||||||
|
* problem. This is not a replacement for a full audit of the code since
|
||||||
|
* this only catches compiled code, not ifdef'd debug code. Options to
|
||||||
|
* defining this, either temporarily to do a spot check, or permanently
|
||||||
|
* to enforce, in all the communications trees; We have hopes to ensure
|
||||||
|
* that by supplying just the radio log buffer that the communications
|
||||||
|
* teams will have their one-stop shop for triaging issues.
|
||||||
|
*/
|
||||||
|
#ifndef LINT_RLOG
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Simplified macro to send a verbose log message using the current LOG_TAG.
|
* Simplified macro to send a verbose log message using the current LOG_TAG.
|
||||||
*/
|
*/
|
||||||
|
|
@ -79,10 +96,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __predict_false
|
|
||||||
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ALOGV_IF
|
#ifndef ALOGV_IF
|
||||||
#if LOG_NDEBUG
|
#if LOG_NDEBUG
|
||||||
#define ALOGV_IF(cond, ...) ((void)0)
|
#define ALOGV_IF(cond, ...) ((void)0)
|
||||||
|
|
@ -283,6 +296,8 @@ extern "C" {
|
||||||
: (void)0 )
|
: (void)0 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* !LINT_RLOG */
|
||||||
|
|
||||||
// ---------------------------------------------------------------------
|
// ---------------------------------------------------------------------
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -567,11 +582,15 @@ typedef enum {
|
||||||
typedef enum log_id {
|
typedef enum log_id {
|
||||||
LOG_ID_MIN = 0,
|
LOG_ID_MIN = 0,
|
||||||
|
|
||||||
|
#ifndef LINT_RLOG
|
||||||
LOG_ID_MAIN = 0,
|
LOG_ID_MAIN = 0,
|
||||||
|
#endif
|
||||||
LOG_ID_RADIO = 1,
|
LOG_ID_RADIO = 1,
|
||||||
|
#ifndef LINT_RLOG
|
||||||
LOG_ID_EVENTS = 2,
|
LOG_ID_EVENTS = 2,
|
||||||
LOG_ID_SYSTEM = 3,
|
LOG_ID_SYSTEM = 3,
|
||||||
LOG_ID_CRASH = 4,
|
LOG_ID_CRASH = 4,
|
||||||
|
#endif
|
||||||
|
|
||||||
LOG_ID_MAX
|
LOG_ID_MAX
|
||||||
} log_id_t;
|
} log_id_t;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue