summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
* | | liblog: add IF_ALOG_RATELIMITMark Salyzyn2016-12-211-1/+49
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IF_ALOG_RATELIMIT() ALOGE("Only one message globally using IF_ALOG_RATELIMIT()" " in the process may appear ever ten seconds," " (%s)", strerror(errno)); static time_t last; /* initial state zero */ IF_ALOG_RATELIMIT_LOCAL(60, &last) ALOGE("Only one message locally may appear every minute," " (%s)", strerror(errno)); These new calls are guaranteed not to affect the value of a non-zero errno to simplify logging of errors. However, the ALOGE calls in the above examples may update the errno value upon their return. Test: gTest liblog-unit-tests --gtest_filter=liblog.__android_log_ratelimit Bug: 33535908 Change-Id: Id8cc192fc7d14504ffd418933cf88ae945c089f2
* | Define range of GIDs for cached app data.Jeff Sharkey2016-12-132-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support upcoming disk usage calculation optimizations, this change creates a new GID for each app that will be used to mark its cached data. We're allocating these unique GIDs so that we can use quotactl() to track cached data on a per-app basis. This change also tightens up the implementation of both the cache and shared GID calculation to ensure that they stay inside the valid ranges, and includes tests to verify. Test: builds, boots, tests pass Bug: 27948817 Change-Id: Ie4377e5aae267f2da39a165888139228995987cb
* | Merge "Revert "android_ids: move to bionic""Treehugger Robot2016-12-131-6/+95
|\|
| * Revert "android_ids: move to bionic"Elliott Hughes2016-12-121-6/+95
| | | | | | | | | | | | This reverts commit bc56847e84816e10908d8eea599f2afff5cc139d. Change-Id: I2d00db0aaa7dfe292e36c6bdbaaa76230849e732
* | cutils: add adb trace tag.Josh Gao2016-12-121-1/+2
| | | | | | | | | | | | Bug: http://b/31289465 Test: systrace Change-Id: I8537731febc6629f055b86f6e19b16104208c4f8
* | libutils: allow multiple ATRACE_NAMEs in a scope.Josh Gao2016-12-121-4/+4
| | | | | | | | | | | | Bug: http://b/31289465 Test: m Change-Id: Iabd97439fa55ea285ce0501dbb4fd9d07149ae61
* | Merge changes from topic 'fsconfig-2'Elliott Hughes2016-12-101-95/+33
|\ \ | | | | | | | | | | | | | | | * changes: fs_config: add comment to header android_ids: move to bionic
| * | fs_config: add comment to headerWilliam Roberts2016-12-081-0/+27
| |/ | | | | | | | | | | | | | | | | | | | | Add a comment to android_filesystem_config.h about AID and OEM Range "scraping" done by build/tools/fs_config. Test: Build and boot. Change-Id: I2d4845d91546ae967a1ee5166b73d119938faccc Signed-off-by: William Roberts <william.c.roberts@intel.com>
| * android_ids: move to bionicWilliam Roberts2016-12-081-95/+6
| | | | | | | | | | | | | | | | | | | | | | Prevent others from using android_ids and force them to use grp.h and pwd.h family of functions. Test: Build and boot, verify services are running properly. Bug: 27999086 Change-Id: Idcd75cf7e91a49ef07a0ed3bdb514ad61aa82e69 Signed-off-by: William Roberts <william.c.roberts@intel.com>
* | utils: Add FastStrcmp.hMark Salyzyn2016-12-091-0/+54
|/ | | | | | | | | | Move existing fast<str*cmp> templates for general use, pulled from the implementation used in logd that dealt with speed through cache locality and subroutine call mitigation. Rename to fastcmp. Test: logd-benchmarks and based on manual profiling from the past Bug: 31456426 Change-Id: Ic62f4a437fc3e06ffdeaae73a6f34e197957a6b0
* Merge "Define GIDs for internal media file types."Jeff Sharkey2016-12-031-0/+6
|\ | | | | | | | | | | am: 4b44753085 Change-Id: I95df8c122f0600e3af6306d800724d1ac9f26040
| * Define GIDs for internal media file types.Jeff Sharkey2016-12-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | Currently, all internal media storage files (under /data/media) are given the same "media_rw" GID. To support an upcoming optimization to disk usage calculation, this CL defines three new GIDs that can be used to quickly identify common types: audio, video, and images. Test: builds Bug: 27948817 Change-Id: I8548459c3d3ccbf7d822431c6e2ebd1c2e309d70
* | Merge "liblog: add private android_log_write_list_buffer()"Mark Salyzyn2016-11-222-0/+42
|\| | | | | | | | | | | am: 636c851f8d Change-Id: If0c24576c69b9d2aad6637c7548d61f79173e932
| * liblog: add private android_log_write_list_buffer()Mark Salyzyn2016-11-212-0/+42
| | | | | | | | | | | | | | | | | | | | | | Allows us to compose an event message for our own in-memory purposes. Will be used to compose an event message in logd and directly write it to just the pmsg buffer. Provide an internal enhanced C++ wrapper for event handling. Test: gTest liblog-unit-tests --gtest_filter=liblog.android_log_write_list_buffer Bug: 31456426 Change-Id: I98246898ba580f9e506baba8af2fd1b26a2a8aae
* | Merge "liblog: move android_log_event_context class to log/log_event_list.h"Mark Salyzyn2016-11-222-209/+297
|\| | | | | | | | | | | am: 418558f8af Change-Id: I4f537d4010e60b86ad4f565135804cf92fa7bd37
| * liblog: move android_log_event_context class to log/log_event_list.hMark Salyzyn2016-11-212-209/+297
| | | | | | | | | | | | | | | | | | rename class from android_log_event_context to android_log_event_list Test: gTest logcat-unit-tests Bug: 31992412 Bug: 31456426 Change-Id: Ib61cbca7d453837d64959c56b0e11f8c5edbfbdd
* | Merge "libcutils: move cutils/files.h to cutils/android_get_control_file.h"Mark Salyzyn2016-11-172-3/+4
|\| | | | | | | | | | | am: 8c41e791ed Change-Id: Ifbc00285da734859d590153a7c6cfc8e51c014f9
| * libcutils: move cutils/files.h to cutils/android_get_control_file.hMark Salyzyn2016-11-162-3/+4
| | | | | | | | | | | | | | | | | | | | files.[h|cpp] is bound to be abused with junk, replace with android_get_control_file.[h|cpp]. Plus some sundry cleanup. Test: gTest libcutils-tests, logd-unit-tests, liblog-unit-tests, logcat-unit-tests and init_tests Bug: 32450474 Change-Id: Ibd4a7aa4624ea19a43d1f98a3c71ac37805d36b5
* | Merge "ziparchive: Allow ExtractEntryToFile() to work with block device."Tao Bao2016-11-151-1/+2
|\| | | | | | | | | | | am: 787482ecd9 Change-Id: Icdce4207cb64e084e200b6f7f8ae194831d5c4f0
| * ziparchive: Allow ExtractEntryToFile() to work with block device.Tao Bao2016-11-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileWriter::Create() calls ftruncate(2) to truncate the destination file, which doesn't work with FD that references a block device. It leads to kIoError when calling ExtractEntryToFile() to extract an entry to block device FD. As a result, it fails the package_extract_file() command in OTA updates (e.g. 'package_extract_file("boot.img", "/dev/block/platform/soc.0/f9824900.sdhci/by-name/boot")'). This CL skips the call to ftruncate(2) if FD references a block device. Bug: 32903624 Test: ziparchive-tests works. Test: Build an OTA updater (m updater) and call package_extract_file(). Change-Id: Ia81116f1a8d7cab802396bdc32c6096b4cb56a3c
| * Merge changes I93a1c003,I283fec89Mark Salyzyn2016-11-072-1/+10
| |\ | | | | | | | | | | | | | | | * changes: liblog: logcat: logprint support -v descriptive liblog: add android_lookupEventFormat_len
* | \ liblog: logcat: logprint support -v descriptiveMark Salyzyn2016-11-071-0/+1
|\ \ \ | | |/ | |/| | | | | | | | | | am: 4fd0507b20 Change-Id: Idd4379d83b1d2f708451e1f2dd21cd40bfa49811
| * | liblog: logcat: logprint support -v descriptiveMark Salyzyn2016-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expand logprint feature to pull out the log tag description fields, parse them and merge into the logging content. Add -v descriptive, -v colour(british, hidden) and -v help. Also added a unit test for the descriptive format borrowing from event tags that have been unchanged since 2009. Had to add -v help because we have too many undocumented formats and format adverbs. Test: gTest logcat-unit-tests --gtest_filter=logcat.descriptive Bug: 31456426 Change-Id: I93a1c003b7a3f4c332544946fdedb7277919cec3
* | | liblog: add android_lookupEventFormat_lenMark Salyzyn2016-11-071-1/+9
|\| | | | | | | | | | | | | | | | | am: 530711b39e Change-Id: I62a33b249df6afdc4405a89b3f60a51a2897f98e
| * | liblog: add android_lookupEventFormat_lenMark Salyzyn2016-11-041-1/+9
| | | | | | | | | | | | | | | | | | Test: compile Bug: 31456426 Change-Id: I283fec89431c18af788fa0477a2ab78792221878
* | | Merge "Allow different namespace types for different classloaders"Dimitry Ivanov2016-11-071-2/+2
|\ \ \ | | |/ | |/| | | | | | | | | | am: a61c48d5fd Change-Id: Idcf998f47e8a09fbe1e56a898f23b2c82a75aa44
| * | Allow different namespace types for different classloadersDimitry Ivanov2016-11-041-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | An app should be able to make cross-arch calls to different apps via other app's Context.getClassLoader() Bug: 32542970 Test: Boot fugu. Check that there are no linker-namespace related errors in the log. Change-Id: I1593f4688bcde0121a5e24a707441a4935fa7dc4
* | libcutils: add android_get_control_file()Mark Salyzyn2016-11-041-0/+37
|\| | | | | | | | | | | am: 0b034d9d7b Change-Id: I7d0a58c12839dba59aa43b96e5a920d3c415efcf
| * libcutils: add android_get_control_file()Mark Salyzyn2016-11-031-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solve one more issue where privilege is required to open a file and we do not want to grant such to the service. This is the client side of the picture, init is the server. The file's descriptor was placed into the environment as "ANDROID_FILE_<path>" where non-alpha and non-numeric characters in the <path> are replaced with _ and this function picks the file descriptor up. Added definition ANDROID_FILE_ENV_PREFIX ("ANDROID_FILE_") and android_get_control_file() prototype in a new include <cutils/files.h> android_get_control_file() checks if the resulting file descriptor is valid, open and matches the name reference, which on purpose will fail if a symbolic link is in the path rather than using a fully qualified path. Add gTest unit test for both. Test: gTest libcutils_test --gtest_filter=FileTest.android_get_control_file Bug: 32450474 Change-Id: I2d0310a1727f1e393a00d9fc7e6cf5d028f27905
* | Merge "Add UID for vehicle network"Keun-young Park2016-10-281-0/+2
|\| | | | | | | | | | | am: 9112b419bd Change-Id: Ie6111026580d97d8552fd3de1fe10e88820205c6
| * Add UID for vehicle networkKeun-young Park2016-10-281-0/+2
| | | | | | | | | | | | | | | | - Access to vehicle network is done in vehicle network service process. Test: build bug: 32508433 Change-Id: I340d1f4964d70b53f10d84fb15a62107e1dedc0e
* | Merge "Upgrade native bridge to version 3 to support namespace"Dimitry Ivanov2016-10-261-1/+138
|\| | | | | | | | | | | am: 28c0c0762e Change-Id: Ic4263e89f59b1ad34f1f8f28b52f4b45a4df351d
| * Merge "Upgrade native bridge to version 3 to support namespace"Dimitry Ivanov2016-10-261-1/+138
| |\
| | * Upgrade native bridge to version 3 to support namespaceZhenhua WANG2016-10-251-1/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native bridge implements namespace related interfaces in version 3. The namespace semantic here is same as Android dynamic linker's. Native loader wraps library loading functions of dynamic linker and native bridge. Thus, Android runtime is able to load native library of different ISA on one device by calling native loader directly. Bug: http://b/28242460 Test: mm && make test-art-host -j48 Change-Id: Idde2b9d99fb6ebe547407c716b5478a231f745a7 Signed-off-by: Zhenhua WANG <zhenhua.wang@intel.com>
* | | Merge "log/logd.h should point to log/log.h"Mark Salyzyn2016-10-251-1/+1
|\| | | | | | | | | | | | | | | | | am: d97efe0383 Change-Id: I5fbbe7f957f303fb61d60177474f615c9f3e7c25
| * | log/logd.h should point to log/log.hMark Salyzyn2016-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Test: compile Bug: 32395896 Bug: 30465923 Change-Id: I1ee85594a0dc6b094480161dc5dbec71eaecdfb9
* | | liblog: logd: logcat: Split out log/logger.h into public and private.Mark Salyzyn2016-10-244-502/+598
|\| | | | | | | | | | | | | | | | | am: aeaaf81c2c Change-Id: I124c69673c30bb5f2259849792ed4ca99f4d6b60
| * | liblog: logd: logcat: Split out log/logger.h into public and private.Mark Salyzyn2016-10-244-502/+598
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log/logger.h pieces moved into log/log.h. Correct for some minor Android Coding standards. Test: gTests liblog-unit-tests, logd-unit-tests and logcat-unit-tests Bug: 19235719 Bug: 26552300 Bug: 31289077 Bug: 31456426 Change-Id: I0a19fd8788eec20a582e72e4c62c04534bdb1b9a
* | | Merge "liblog: restructure log/log.h and android/log.h"Mark Salyzyn2016-10-243-512/+662
|\| | | | | | | | | | | | | | | | | am: 11a7165ecf Change-Id: I6ebdebdd82e8a59a711ee0fe41056abdacb084b3
| * | liblog: restructure log/log.h and android/log.hMark Salyzyn2016-10-243-512/+662
| |/ | | | | | | | | | | | | | | | | | | | | | | | | We went too far, so this is a partial revert, part deux. Keep general purpose logging macros in android/log.h for the NDK. More internal features like Radio, System and Events logging are moved back to log/log.h. Correct liblog ndk symbols. Correct for some Android Coding standards. Test: compile Bug: 31992412 Change-Id: Id3731496fa226e8c170305d0d2a1859e8cf67e14
* | Merge "system/core: preparation to pull back interfaces from android/log.h"Mark Salyzyn2016-10-204-4/+4
|\| | | | | | | | | | | am: 27d2d49f48 Change-Id: I604bb1d4cf62636663fa92e3d14a55887dbcae23
| * system/core: preparation to pull back interfaces from android/log.hMark Salyzyn2016-10-204-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Point to log/log.h where necessary, define LOG_TAG where necessary. Accept that private/android_logger.h is suitable replacement for log/logger.h and android/log.h. Correct liblog/README Effectively a cleanup and controlled select revert of 'system/core: drop or replace log/logger.h' and 'system/core: Replace log/log.h with android/log.h'. Test: compile Bug: 30465923 Change-Id: Ic2ad157bad6f5efe2c6af293a73bb753300b17a2
* | Merge "liblog: Add private interfaces for buffer size properties"Mark Salyzyn2016-10-181-0/+15
|\| | | | | | | | | | | am: 094004bf42 Change-Id: I81c6ff947b0f0939b41ea59dae153c5584ac9049
| * Merge "liblog: Add private interfaces for buffer size properties"Mark Salyzyn2016-10-181-0/+15
| |\
| | * liblog: Add private interfaces for buffer size propertiesMark Salyzyn2016-10-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add private function __android_logger_get_buffer_size() to read properties and compose the default buffer size. This interface complements the existing android_looger_get_size() which returns the logd setting which can differ at runtime. For use in logd and dumpstate. Side effect is we also add the private functions __android_logger_property_get_bool() and __android_logger_valid_buffer_size() for reuse in logd. Test: gTest liblog-unit-test, logd-unit-tests and logcat-unit-tests in combination with commit 'logd: Use private interfaces for buffer size properties' Bug: 31750617 Change-Id: Id95cb68f775ef6b427c122e10f6f8291d336d184
* | | Merge "Add functions in recovery/minzip to libziparchive"Tianjie Xu2016-10-181-0/+13
|\| | | | | | | | | | | | | | | | | am: 4bc51d1ea4 Change-Id: Ica94e8050286bed1c5bc23a33305050ab8da8ec5
| * | Merge "Add functions in recovery/minzip to libziparchive"Tianjie Xu2016-10-181-0/+13
| |\ \ | | |/ | |/|
| | * Add functions in recovery/minzip to libziparchiveTianjie Xu2016-10-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two functions libziparchive that libminzip has. And create corresponding unit tests. 1. Open a zip archive from a memory mapped region. 2. A new writer that takes a call back function pointer. (Used by the OTA updater to stream the data.) Test: Unit tests passed Bug: 19472796 Change-Id: I2b2daec71174afe221030357e39bff5faea51e72
* | | Merge "liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()"Mark Salyzyn2016-10-171-0/+2
|\| | | | | | | | | | | | | | | | | am: 915d620359 Change-Id: I66547a2d32c96b9baffccb8a391a15a155faf123
| * | Merge "liblog: LIBLOG_ABI_PRIVATE __android_log_is_debuggable()"Treehugger Robot2016-10-171-0/+2
| |\ \ | | |/ | |/|