summaryrefslogtreecommitdiffstats
path: root/liblog
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-111-3/+1
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/core into cm-13.0 Android 6.0.1 release 22 Change-Id: Ia61f8e863f7413a67fe65f41ea2a30c086528df4
| * Add macro to call event logger for errors.William Luh2015-11-103-1/+485
| | | | | | | | | | Bug:23180694 Change-Id: I566a290334345f48013029534efef3e08e726e40
* | liblog: build log_event_write regardless of TARGET_USES_LOGDSimon Shields2016-03-101-1/+3
| | | | | | | | Change-Id: Id9b331dee567438960edc70b23044ca647fa452a
* | Merge tag 'android-6.0.1_r10' into HEADJessica Wagantall2016-01-053-1/+485
|\ \ | | | | | | | | | | | | Ticket: CYNGNOS-1404 Android 6.0.1 release 10
| * | Add macro to call event logger for errors.William Luh2015-12-013-1/+485
| |/ | | | | | | | | Bug:23180694 Change-Id: I566a290334345f48013029534efef3e08e726e40
* | liblog: fix building with LOGD disabledDan Pasanen2015-11-101-0/+4
| | | | | | | | Change-Id: Ief05c7bef25e2d18b94fb0a231aba5db8cea6f84
* | liblog: optimize code hotspotMark Salyzyn2015-11-011-1/+1
|/ | | | | | | | strcmp was 1/10 #2 behind find_property in __android_log_level(), now virtually eliminated from performance profile. Bug: 23685592 Change-Id: I3978886193af77e489c6d1728d6a26b7f53f8f2f
* liblog: __android_log_is_loggable support global propertiesMark Salyzyn2015-06-153-23/+334
| | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit c158456f50817ac506f4eed780978e63dd222fe4) - Add support for "log.tag" and "persist.log.tag" global logging properties, effectively a runtime default minimum logging level. - Add a thread-safe single level cache plus selective logic for the four properties being checked to help speed up logging decision on subsequent identical calls. - Using new __system_property_area_serial() to make for efficient (<100ns) handling of cache misses. Despite adding two new properties, we are 8 times faster on subsequent calls even if the properties do not exist. - A NULL or blank tag is no longer directed to return default, it will check the pair of global logging properties first. - Add liblog.is_loggable gTest - Fixup liblog.android_logger_get_, allow no content in crash buffer - Fixup liblog.max_payload, lowered logd priority increases latency Bug: 19544788 Bug: 21696721 Change-Id: Ideb887755aa3f1fd14a2603bda1fe23cba49642c
* liblog: logcat: Add printable format modifierMark Salyzyn2015-06-041-31/+182
| | | | | | | | | | | | | | | (cherry pick from commit b932b2f8bac124b088edc93966281cca4567dc54) - added printable format modifier: logcat -v printable - opencoded borrowed individual utf8 validity checking algorithm from utf8_length() in libutils/Unicode.cpp - if considered basic one-character ASCII, use popular \x escape sequences for non-printable - logprint convert to C comments to drop mixed-mode Bug: 19000361 Change-Id: I122a5b8fb41216fc0bc816178c0b768f3df56586
* logcat: -f flag to continueMark Salyzyn2015-06-021-1/+1
| | | | | | | | | | | | | (cherry pick from commit f3555d9427425c2cba9600ceffb49305c440aa4a) On startup, check the current logging content, then grab logs from that time forward rather than restarting from the beginning. Add support for reading tail time down to the nano-second. Bonus, permits us to create a logcatd logpersist daemon Bug: 19608716 Change-Id: Iaab58de4c02b7f97c69de12cf954fedc2163059e
* liblog: gtest open("/dev/pmsg0", "a")Mark Salyzyn2015-05-131-0/+9
| | | | | | (cherry pick from commit df0257d344b6d85bbbdae248748040e15aac35b8) Change-Id: I918025a8ac28204076ce4831ce277b04091619f6
* logcat: liblog: Add "usec" format argumentMark Salyzyn2015-05-131-12/+27
| | | | | | | | | | (cherry pick from commit e1f2004ecc05ce2d5d4313d16c7791594643f2ef) - Add additional 3 digits of time precision for time output adding in the reporting of usec - Remove trailing space in header file Change-Id: Ifb560850b8e01080e126fbaeab640db71cce3eea
* liblog: Add kernel log idMark Salyzyn2015-05-133-2/+5
| | | | | | (cherry pick from commit 440e109d642b691eb857d14bcd1af76740e305fa) Change-Id: I53002f05a8bdf8d67e1d761c56c8761d3b534a76
* Switch liblog.so to hash-style=bothDmitriy Ivanov2015-05-081-1/+1
| | | | | | Bug: http://b/19059885 Change-Id: I7cde911f11b09c3a13553154aca6e291bb91befb (cherry picked from commit fd8afe6f31c4dd290d8bc68ce9848d73879f4f8a)
* Add float support to binary event log.Jeff Brown2015-04-281-3/+27
| | | | | Bug: 20664753 Change-Id: Ib4752bd785496dab5bb4d4979d5d80f662adbdfa
* liblog: Add BM_is_loggable benchmarkMark Salyzyn2015-04-241-0/+14
| | | | | | | | | | - On a N9 64-bit benchmark, the __android_log_is_loggable overhead is roughly 500ns (1/2 of a syscall?) Bug: 19544788 Bug: 17760225 Bug: 20416721 Change-Id: Ib9e4d06d96e1b19ca5d459e569ead451ef47a9c0
* liblog: __android_log_is_loggable support Developer OptionsMark Salyzyn2015-04-221-13/+5
| | | | | | | | | - If logd.tag.<tag> is not found, check if persist.logd.tag.<tag> is available - Do not turn off the isLoggable functionality on "user" builds Bug: 19544788 Bug: 17760225 Change-Id: I3fec67b547aa431438965519507033798398e1e1
* Merge "Share log writing code."Dan Albert2015-04-032-72/+12
|\
| * Share log writing code.Dan Albert2015-04-032-72/+12
| | | | | | | | | | | | | | | | | | __android_log_write() was just a special form of __android_log_buf_write that used a default log ID and set the abort message for fatal messages. Presumably the latter was intended to be set for __android_log_buf_write as well. Change-Id: I51cff7561a2754676b2088d95fa4f4505ac3c3c2
* | Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed.Elliott Hughes2015-04-021-2/+0
|/ | | | Change-Id: I720b8ef1050da45a7833adef8219b6acb2cf3a38
* liblog: remove internal __write_to_log_nullMark Salyzyn2015-03-231-37/+27
| | | | | | | | | __write_to_log_null never retries initialization and only made sense for the kernel logger. The user space logger can come and go. Bug: 19732485 Change-Id: Iac34ea1c52ec82db4ee0c2c73ba0950ace4d4dec
* liblog: reject empty logging messagesMark Salyzyn2015-03-181-0/+4
| | | | | | | | A regression after "liblog: Instrument logging of logd write drops" where an empty payload would result in an insufficient iovec to report the write drop. Change-Id: Iffabcfbb0680898d7a42004700e638e9d940ff5f
* Switch liblog to sysv-only hash styleDmitriy Ivanov2015-03-131-1/+1
| | | | | Bug: 19059885 Change-Id: I5519a4e19716303692d4117bc24988f21d5a829e
* Generate gnu hash for arm onlyGoran Jakovljevic2015-03-101-1/+1
| | | | | | | | | | | Fixes mips build failure caused by: https://android-review.googlesource.com/#/c/139580/ As previously discussed [1], MIPS does not support GNU-style ELF hashes. [1] https://android-review.googlesource.com/#/c/49282/2/tests/Android.mk Change-Id: I757fef1d47663da3e414f5771dfc580ea7aa3732
* Generate sysv hash for liblogDmitriy Ivanov2015-03-091-0/+4
| | | | | Bug: 19059885 Change-Id: I6fff4372504e3ca0d870c5cafe6f19d412787923
* Fix __android_log_assert to abort.Elliott Hughes2015-03-072-2/+2
| | | | | | | | | If you rely on __builtin_trap, it's likely to use an illegal instruction, which is a misleading way to abort. If we just call abort, it's more immediately obvious that we've aborted. Bug: 19644330 Change-Id: I63a962e4748aec7b019ea94b007593e478a3b61a
* Revert "liblog: logprint use <endian.h>"Mark Salyzyn2015-03-061-5/+25
| | | | | | | This reverts commit 66bfc5ccbda1c36923230b8dea36e86e8ac62d67. Bug: 19634248 Change-Id: I7c4851a247042193674f226fd0d5c5663e8074c7
* liblog: build cleanupMark Salyzyn2015-03-051-13/+9
| | | | | | | | - Drop CYGWIN build checking - Hard code the "liblog" event tag - Drop use of internal WITH_MINGW Change-Id: I7b63bd7fa4471f340f356b477a0e5e25fe83a851
* liblog: logprint use <endian.h> part threeMark Salyzyn2015-03-042-1/+5
| | | | | | | | Fix host/sdk builds: - Drop logprint from list of host products - Drop <endian.h> for FAKE_LOG_DEVICE Change-Id: I8aa854413ff6d809f0b04987cf913eb228e4213c
* Merge changes I12d6aa4e,I9e802113,I2b30e0fc,Iaf387b9eMark Salyzyn2015-03-054-5/+96
|\ | | | | | | | | | | | | | | * changes: logcat: remove dead label code logcat: do not stop on unexpected log ID Revert "logd: Add minimum time bucket statistics" liblog: Instrument logging of logd write drops
| * liblog: Instrument logging of logd write dropsMark Salyzyn2015-03-044-5/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | - If logger system is prostrated, send an event message with the liblog tag from the associated UID and PID with a count of dropped messages once logging is resumed. - Added to the README a description of the error return values. - Describe in the README the appropriate mitigations for dropped messages. - If the caller sees this message, then /proc/sys/net/unix/max_dgram_qlen is likely too small Change-Id: Iaf387b9e5e1b6aa93bebc7481f9e8353732e3229
* | liblog: logprint use <endian.h> part deuxMark Salyzyn2015-03-041-0/+1
|/ | | | Change-Id: I042194d0f5ec444dd192ee9da50d6b48d556f8ac
* liblog: logprint use <endian.h>Mark Salyzyn2015-03-041-25/+4
| | | | Change-Id: I0ec0fe3e954f6f04964d58e57c817d28057b630b
* liblog: add pstore readMark Salyzyn2015-02-262-1/+176
| | | | | | | | | | | Used to pull the Android log messages after a reboot. Adding an ANDROID_LOG_PSTORE flag to the mode parameter in calls to android_logger_list_alloc() and android_logger_list_alloc_time(). The side effects are that android_logger_clear() and android_logger_list_read() will react with the user space pstore driver. Forms a companion to the pstore console logs. Change-Id: I7bb07b87b3bf73f059a21af3f810af37c7715b6d
* liblog: introduce ANDROID_LOG_* flagsMark Salyzyn2015-02-256-34/+35
| | | | | | | | Move away from using POSIX open(2) flags and introduce ANDROID_LOG_* flags to replace them. Add security by preventing random mode flags from getting into underlying POSIX calls. ANDROID_LOG_* flags overlap POSIX O_* flag definitions. Change-Id: Ib32bb64c287e8bf150be62242e1ba46bb37839fc
* liblog: test: ARM64: Enable 32 and 64-bit liblog_benchmarkMark Salyzyn2015-02-102-5/+5
| | | | | | | - Enable build for 32 and 64 bit benchmark executables - Fix some cosmetics issues in logd_write.c Change-Id: I544446e5116607d7fec89171135f6e1eff6aebd8
* liblog: add __android_log_is_loggable()Mark Salyzyn2015-02-094-1/+80
| | | | | | | | | - Add new liblog API __android_log_is_loggable(prio, tag, def) - future plan to integrate this into the runtime checks and into the logd daemon for filtration. Inert for now. Bug: 17760225 Change-Id: I16395b4d42acc08f0209f55a1cbf87b0b2112898
* Kill HAVE_PTHREADS.Yabin Cui2015-01-273-31/+12
| | | | | Bug: 19083585 Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
* liblog: add pstore writeMark Salyzyn2015-01-231-19/+48
| | | | | | | Used to push the Android log messages into pstore (when available, and no propagation of error). Change-Id: I9def8cf796d35d347f502d9745d5f42ec1200253
* liblog: use private/android_logger.hMark Salyzyn2015-01-231-20/+13
| | | | | | - fix a latent issue with retransmitting on failure. Change-Id: I2d0e5c3531c279f2dc1fbd74807210ff8d804de1
* liblog: logcat color output corrupted on 32-bitMark Salyzyn2015-01-221-1/+1
| | | | | | sizeof(suffixBuf), not sizeof(suffixLen)! Change-Id: I6e085089237585bb8b406372639b644556747699
* liblog: Add log_time += operatorMark Salyzyn2015-01-051-0/+22
| | | | Change-Id: I1d2987b6cb333fc344d4fee1b7bb25f32a4143c6
* Only Windows doesn't have <sys/uio.h>.Elliott Hughes2014-11-251-2/+2
| | | | | | | This should probably be in libcutils instead, so code that needs to care about Windows can use readv/writev. Change-Id: I7c2ceec3f742cee0e44f69fd4c88459376bd0e08
* Only Win32 doesn't have writev.Elliott Hughes2014-11-251-2/+2
| | | | Change-Id: I9b5328cea3c88a75135dcb0711cbb5471e8fa388
* Liblog: Remove unused functionAndreas Gampe2014-11-241-9/+0
| | | | | | For build-system CFLAGS clean-up, remove unused function. Change-Id: I8c28c4bbbadaea6a5b32483e9e220794967bdd4e
* Kill LOCAL_SOCKET_NAMESPACE.Elliott Hughes2014-11-211-3/+3
| | | | Change-Id: I18928f89f66c37be310c45ff4c05a6d47ab84f66
* kill HAVE_LOCALTIME_RYabin Cui2014-11-133-6/+6
| | | | | Bug: 18361583 Change-Id: Icdc745a5204bba26c6438d16ed38ec791e136163
* Move liblog tests and benchmarks to libc++.Dan Albert2014-11-122-1/+1
| | | | Bug: 15193147 Change-Id: Ib063eb9490e40f9d10c0b0f29b7808c729e4fff9
* am a1ac84cd: MingW doesn\'t handle __attribute__((weak)) for Windows PEAdam Lesinski2014-10-201-2/+1
|\ | | | | | | | | * commit 'a1ac84cd8d7357f38a9fc60ab9d42e81d1790fd2': MingW doesn't handle __attribute__((weak)) for Windows PE
| * MingW doesn't handle __attribute__((weak)) for Windows PEAdam Lesinski2014-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows PE format doesn't have the same support for weak symbols as ELF does. The symbol android_log_id_to_name was strangely omitted from the resulting Windows executable and the callsite where it was supposed to be called was relaced with a different symbol, which caused a crash in AAPT on Windows. This change works due to a careful set of #ifdefs that ensure only one definition of android_log_id_to_name is defined, but there are other uses of __attribute__((weak)) which should be inspected. Change-Id: I3b58076e31d9b28c5143773a170e9ffda9fa3815