No description
Find a file
Tom Cherry 012c573e26 init: Stop combining actions
In the past, I had thought it didn't make sense to have multiple
Action classes with identical triggers within ActionManager::actions_,
and opted to instead combine these into a single action.  In theory,
it should reduce memory overhead as only one copy of the triggers
needs to be stored.

In practice, this ends up not being a good idea.

Most importantly, given a file with the below three sections in this
same order:

on boot
  setprop a b

on boot && property:true=true
  setprop c d

on boot
  setprop e f

Assuming that property 'true' == 'true', when the `boot` event
happens, the order of the setprop commands will actually be:

setprop a b
setprop e f
setprop c d

instead of the more intuitive order of:

setprop a b
setprop c d
setprop e f

This is a mistake and this CL fixes it.  It also documents this order.

Secondly, with a given 'Action' now spanning multiple files, in order
to keep track of which file a command is run from, the 'Command'
itself needs to store this.  Ironically to the original intention,
this increases total ram usage.  This change now only stores the file
name in each 'Action' instead of each 'Command'.  All in all this is a
negligible trade off of ram usage.

Thirdly, this requires a bunch of extra code and assumptions that
don't help anything else.  In particular it forces to keep property triggers
sorted for easy comparison, which I'm using an std::map for currently,
but that is not the best data structure to contain them.

Lastly, I added the filename and line number to the 'processing
action' LOG(INFO) message.

Test: Boot bullhead, observe above changes
Test: Boot sailfish, observe no change in boot time
Change-Id: I3fbcac4ee677351314e33012c758145be82346e9
2017-04-19 11:26:29 -07:00
adb libcutils: compile with BOARD_VNDK_VERSION current 2017-04-17 14:44:17 -07:00
adf libadfhwc: Fix adf_hwc_close 2017-03-02 17:40:16 +00:00
base Merge "Add android::base::ScopeGuard" 2017-04-06 22:41:02 +00:00
bootstat Add test config to bootstat_tests 2017-04-05 14:49:47 +00:00
cpio Possible null pointer miss on realloc 2017-03-23 22:41:14 +01:00
debuggerd Merge "crash_dump: during early boot, output to kmsg on userdebug." 2017-04-10 20:51:59 +00:00
demangle Make demangle work more like c++filt. 2017-03-28 17:38:01 -07:00
fastboot fastboot: Support larger transfers during flash 2017-04-17 09:22:49 -05:00
fingerprintd fingerprint: bump hw api version to 2.1 [DO NOT MERGE] 2017-01-27 22:11:15 +00:00
fs_mgr run e2fsck -f selectively with mount retry 2017-04-18 19:28:55 -07:00
gatekeeperd Merge "liblog: use log/log.h when utilizing ALOG macros" am: 01e12b4ee7 am: c3b346ea93 2017-01-11 19:26:19 +00:00
healthd Merge "healthd: Implement scheduleUpdate" 2017-03-23 00:48:48 +00:00
include Moved include/backtrace to libbacktrace/include 2017-04-11 11:22:43 -07:00
init init: Stop combining actions 2017-04-19 11:26:29 -07:00
libappfuse Add test config to libappfuse_test 2017-03-31 17:11:50 -07:00
libbacktrace Moved include/backtrace to libbacktrace/include 2017-04-11 11:22:43 -07:00
libbinderwrapper Convert libbinderwrapper_test_support to be a static library 2017-03-03 17:14:04 -08:00
libcrypto_utils Rely on the platform -std default. 2016-10-10 14:31:12 -07:00
libcutils Merge "Allocate a GID range for external cache files." 2017-04-18 22:34:16 +00:00
libdiskconfig liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libion liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
liblog liblog: __android_logger_property_bool svelte+eng default 2017-04-18 15:36:36 -07:00
libmemtrack liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libmemunreachable liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libmetricslogger libmetricslogger: Use libBionicGtestMain instead of a custom test runner. 2017-02-13 13:41:44 -08:00
libnativebridge NativeBridge: add "linked namespace" semantic corresponding to linker 2017-03-29 17:34:11 -07:00
libnativeloader NativeBridge: add "linked namespace" semantic corresponding to linker 2017-03-29 17:34:11 -07:00
libnetutils liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libpackagelistparser liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libpixelflinger liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
libprocessgroup add killProcessGroupOnce 2017-03-29 16:33:15 -07:00
libprocinfo Enable more modules on linux_bionic builds 2017-03-15 15:44:00 -07:00
libsparse libsparse: Fix verbose_error string usage 2017-04-18 10:53:49 -05:00
libsuspend Merge "liblog: use log/log.h when utilizing ALOG macros" am: 01e12b4ee7 2017-01-11 19:20:50 +00:00
libsync libsync: Replace inserting tuple into unordered_map in favour of pair. 2017-01-30 23:39:03 +00:00
libsystem Moved all files from include/system to libsystem/include/system 2017-04-06 10:28:50 -07:00
libsysutils There's no longer a limit to property names. 2017-02-28 14:12:54 -08:00
libunwindstack Implement maps parsing. 2017-04-06 15:01:02 -07:00
libusbhost usb-bulk-transfer: Clarify sign-iy-ness of param 2016-09-21 15:51:35 +00:00
libutils libutils: mark as vendor_available 2017-04-12 08:59:41 -07:00
libziparchive ZipWriter: Keep LFH and CFH in sync 2017-04-11 01:45:25 +00:00
lmkd liblog: use log/log.h when utilizing ALOG macros 2017-01-11 09:31:15 -08:00
logcat liblog: allow event tags to include some punctuations 2017-04-14 12:56:06 -07:00
logd logd: report log reader instantiation 2017-04-18 14:59:46 -07:00
logwrapper Merge "logwrapper: add a benchmark for android_fork_execvp_ext" 2017-03-23 11:56:10 +00:00
mkbootimg mkbootimg: use int for os_version and os_patch_level 2016-03-29 16:06:37 -07:00
reboot Convert more Android.mk files to Android.bp 2016-07-13 17:41:45 -07:00
rootdir init.rc: move load_system_props to beginning of 'on fs' 2017-04-19 14:55:35 +00:00
run-as Define range of GIDs for cached app data. 2016-12-13 13:28:08 -07:00
sdcard Merge "Switch sdcardfs over to bind mounts." 2016-11-30 05:20:40 +00:00
shell_and_utilities Add a README.md about our shell and utilities. 2017-04-14 17:59:55 -07:00
toolbox Add a reasonably full implementation of gzip/gunzip/zcat. 2017-04-10 10:56:40 -07:00
trusty trusty: keymaster: update device tests to use 2.0 API 2017-04-10 17:33:49 -07:00
tzdatacheck Update to support staging behavior 2017-03-29 10:56:45 +01:00
.clang-format Add a 2 width option of clang format. 2017-03-10 13:01:39 -08:00
.clang-format-2 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.clang-format-4 Only allow short functions in class definitions. 2017-03-28 12:31:37 -07:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.bp Export android_filesystem_config.h as a filegroup 2017-01-17 18:20:28 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk init.rc: have hwservicemanager start the HAL class 2016-09-26 00:23:51 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00
PREUPLOAD.cfg Add a PREUPLOAD.cfg file to run git-clang-format on every commit 2017-03-08 16:51:26 +08:00