aboutsummaryrefslogtreecommitdiff
path: root/libc/bionic/system_property_set.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Adding system property tracing"Bowgo Tsai2021-07-151-5/+2
| | | | | | | | | | | | | | | Revert submission 1403568-sysprop_trace Reason for revert: makes property get/set non-reentrant Reverted Changes: I6f85f3f52:Add systrace tag for system property Id2b93acb2:Adding system property tracing Id78992d23:Add systrace tag for system property I1ba9fc7bd:Add systrace tag for system property Bug: 193050299 Test: build and boot a device Change-Id: Ic7a83fb01a39113d408ed0c95d27f694d5a2649c
* Revert^2 "Adding system property tracing"Chienyuan Huang2020-08-201-2/+5
| | | | | | 3d3bf59a641c08659fdccb9040d4d9bae2aa0d22 Change-Id: I46dfc4a45706856936cad90eca7fe30a3235cb62
* Revert "Adding system property tracing"Chienyuan Huang2020-08-201-5/+2
| | | | | | | | | | | | | | | Revert submission 12208265-sysprop_trace Reason for revert: cause BB on several branches Reverted Changes: I6f85f3f52:Add systrace tag for system property I6f85f3f52:Add systrace tag for system property I18dae8357:Add systrace tag for system property Id2b93acb2:Adding system property tracing Id78992d23:Add systrace tag for system property I1ba9fc7bd:Add systrace tag for system property Change-Id: Ife971eac1e511bb41035c780bfdb9a583c9197c4
* Adding system property tracingBowgo Tsai2020-08-181-2/+5
| | | | | | | | | | | | | | | | | | | | Introducing a new systrace tag, TRACE_TAG_SYSPROP, for use with system property. For property set, the tracing is added in __system_property_set() instead of __system_property_update() / __system_property_add() so we can record control properties like ctl.*, sys.powerctl.*, etc.., which won't be updated via the latter two functions. Bug: 147275573 Test: atest CtsBionicTestCases Test: adb shell perfetto -o /data/misc/perfetto-traces/test_trace -t 10s bionic Test: adb shell perfetto -o /data/misc/perfetto-traces/test_trace -t 10s sysprop Test: adb shell /data/benchmarktest64/bionic-benchmarks/bionic-benchmarks \ --benchmark_filter=BM_property --bionic_cpu=4, then compares the results of property benchmarks before and after the change, didn't see significant difference. Change-Id: Id2b93acb2ce02b308c0e4889f836159151af3b46
* Cleanup some trivial TODOs.Tom Cherry2020-04-101-1/+0
| | | | | | | | | | | | | | | | 1) "fix the system properties design" is written for the old protocol, so we've already changed the design. There are no other further planned changes. 2) "don't drag in all the macros, just the types." is not likely to happen or be particularly impactful. 3) "Find a location suitable for these functions ..." is refering to legacy code. More likely that this code will be removed before we find a serious reason to fix this TODO. 4) "(73062966) We still don't have a good way ..." is stale; we fixed this bug and added the appropriate mechanism. Test: n/a Change-Id: I23991692cdeb81ad00844a6a1680900ff384208b
* Move bionic_macros.h from private to platform.Josh Gao2020-01-021-1/+1
| | | | | Test: treehugger Change-Id: Ie473914f4c8924c7240b3ac22093a9daf42fc948
* Add the ScopedFd that we've never quite gotten around to.Elliott Hughes2019-10-311-15/+10
| | | | | | | | | This is actually for the new change I'm working on, but let's retrofit it first to separate any bugs in these changes from those in the new change... Test: treehugger Change-Id: I890aeb61f9792810a77ad0da3f9674c9cc5db7bb
* libasync_safe: stop clobbering other folks' identifiers.Elliott Hughes2019-02-141-0/+1
| | | | | | | | | | | | The log priorities and ids are in an NDK header, available to everyone. Move CHECK into its own header for now. This would be better if it was more like the <android-base/logging.h> CHECK family, but I don't have an easy way to do that without lots of copy & paste, so punting for now. Bug: https://issuetracker.google.com/issues/119713191 Test: boots Change-Id: I4566be8a0a024fede0e2d257c98b908ec67af2a8
* Clean up bionic_macros.h a bit.Elliott Hughes2018-10-251-1/+1
| | | | | | | | | | | Use <android-base/macros.h> instead where possible, and move the bionic macros out of the way of the libbase ones. Yes, there are folks who manage to end up with both included at once (thanks OpenGL!), and cleaning that up doesn't seem nearly as practical as just making this change. Bug: N/A Test: builds Change-Id: I23fc544f39d5addf81dc61471771a5438778895b
* Split properties into their own class to make testing betterTom Cherry2017-12-181-0/+314
Reinitializing system properties can result in crashes later in the program, and is generally not recommended or even supported. This change moves the actual logic for system properties into a class that can be tested in isolation, without reinitializing the actual system property area used in libc. Bug: 62197783 Test: boot devices, ensure properties work Test: system property unit tests and benchmarks Change-Id: I9ae6e1b56c62f51a4d3fdb5b62b8926cef545649