diff options
author | Mark Salyzyn | 2016-03-08 18:18:26 -0600 |
---|---|---|
committer | Mark Salyzyn | 2017-02-08 15:37:44 -0600 |
commit | 62d0d2d683f5d19cf9d451548bd03c4b4f53c42e (patch) | |
tree | 6df22a249f02d030b93b7b4db8b5eb815a41614a /liblog/include | |
parent | 8f2492f5821f7163a13c58286de8d0d419fefddc (diff) | |
download | platform-system-core-62d0d2d683f5d19cf9d451548bd03c4b4f53c42e.tar.gz platform-system-core-62d0d2d683f5d19cf9d451548bd03c4b4f53c42e.tar.xz platform-system-core-62d0d2d683f5d19cf9d451548bd03c4b4f53c42e.zip |
liblog: add logprint to host build
- cleanup of some style issues
- resolve a few minor bugs
- add -lrt for host so that clock_gettime can be issued
- enable write-only logging, logprint and event list
handling tests for host consumption.
NB: CtsLiblogTestCases_list is only outlet for host testing of
the interfaces, but it is not part of any automated testing
Test: gTest liblog-unit-tests, liblog-benchmarks and
CtsLiblogTestCases_list && build mmma system/core/liblog
Bug: 27405083
Change-Id: I13db1f45f67569407587a5a909248de33809b8cf
Diffstat (limited to 'liblog/include')
-rw-r--r-- | liblog/include/log/log_radio.h | 4 | ||||
-rw-r--r-- | liblog/include/log/log_read.h | 4 | ||||
-rw-r--r-- | liblog/include/log/log_system.h | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/liblog/include/log/log_radio.h b/liblog/include/log/log_radio.h index 30a73f267..430e5229b 100644 --- a/liblog/include/log/log_radio.h +++ b/liblog/include/log/log_radio.h | |||
@@ -38,6 +38,10 @@ | |||
38 | 38 | ||
39 | /* --------------------------------------------------------------------- */ | 39 | /* --------------------------------------------------------------------- */ |
40 | 40 | ||
41 | #ifndef __predict_false | ||
42 | #define __predict_false(exp) __builtin_expect((exp) != 0, 0) | ||
43 | #endif | ||
44 | |||
41 | /* | 45 | /* |
42 | * Simplified macro to send a verbose radio log message using current LOG_TAG. | 46 | * Simplified macro to send a verbose radio log message using current LOG_TAG. |
43 | */ | 47 | */ |
diff --git a/liblog/include/log/log_read.h b/liblog/include/log/log_read.h index 5b5eebca6..6a44b5685 100644 --- a/liblog/include/log/log_read.h +++ b/liblog/include/log/log_read.h | |||
@@ -251,7 +251,11 @@ int android_logger_set_prune_list(struct logger_list* logger_list, | |||
251 | #define ANDROID_LOG_WRONLY O_WRONLY | 251 | #define ANDROID_LOG_WRONLY O_WRONLY |
252 | #define ANDROID_LOG_RDWR O_RDWR | 252 | #define ANDROID_LOG_RDWR O_RDWR |
253 | #define ANDROID_LOG_ACCMODE O_ACCMODE | 253 | #define ANDROID_LOG_ACCMODE O_ACCMODE |
254 | #ifndef O_NONBLOCK | ||
255 | #define ANDROID_LOG_NONBLOCK 0x00000800 | ||
256 | #else | ||
254 | #define ANDROID_LOG_NONBLOCK O_NONBLOCK | 257 | #define ANDROID_LOG_NONBLOCK O_NONBLOCK |
258 | #endif | ||
255 | #if __ANDROID_USE_LIBLOG_READER_INTERFACE > 2 | 259 | #if __ANDROID_USE_LIBLOG_READER_INTERFACE > 2 |
256 | #define ANDROID_LOG_WRAP 0x40000000 /* Block until buffer about to wrap */ | 260 | #define ANDROID_LOG_WRAP 0x40000000 /* Block until buffer about to wrap */ |
257 | #define ANDROID_LOG_WRAP_DEFAULT_TIMEOUT 7200 /* 2 hour default */ | 261 | #define ANDROID_LOG_WRAP_DEFAULT_TIMEOUT 7200 /* 2 hour default */ |
diff --git a/liblog/include/log/log_system.h b/liblog/include/log/log_system.h index 8c1ec96e8..394a10645 100644 --- a/liblog/include/log/log_system.h +++ b/liblog/include/log/log_system.h | |||
@@ -36,6 +36,10 @@ | |||
36 | #endif | 36 | #endif |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #ifndef __predict_false | ||
40 | #define __predict_false(exp) __builtin_expect((exp) != 0, 0) | ||
41 | #endif | ||
42 | |||
39 | /* | 43 | /* |
40 | * Simplified macro to send a verbose system log message using current LOG_TAG. | 44 | * Simplified macro to send a verbose system log message using current LOG_TAG. |
41 | */ | 45 | */ |