No description
Find a file
Elliott Hughes 1946d3bca8 init shouldn't call DumpState by default.
The cost of generating and throwing away a bunch of stuff that no one
normally sees is high enough to be worth avoiding.

Here's AOSP ToT on N9...

 init: (Parsing /system/etc/init/atrace.rc took 0.0112s.)
 init: (Parsing /system/etc/init/bootanim.rc took 0.0094s.)
 init: (Parsing /system/etc/init/crash_reporter.rc took 0.0103s.)
 init: (Parsing /system/etc/init/debuggerd.rc took 0.0090s.)
 init: (Parsing /system/etc/init/debuggerd64.rc took 0.0085s.)
 init: (Parsing /system/etc/init/drmserver.rc took 0.0078s.)
 init: (Parsing /system/etc/init/dumpstate.rc took 0.0073s.)
 init: (Parsing /system/etc/init/gatekeeperd.rc took 0.0063s.)
 init: (Parsing /system/etc/init/installd.rc took 0.0067s.)
 init: (Parsing /system/etc/init/keystore.rc took 0.0060s.)
 init: (Parsing /system/etc/init/lmkd.rc took 0.0060s.)
 init: (Parsing /system/etc/init/logcatd.rc took 0.0059s.)
 init: (Parsing /system/etc/init/logd.rc took 0.0068s.)
 init: (Parsing /system/etc/init/mdnsd.rc took 0.0057s.)
 init: (Parsing /system/etc/init/mediaserver.rc took 0.0064s.)
 init: (Parsing /system/etc/init/metrics_daemon.rc took 0.0063s.)
 init: (Parsing /system/etc/init/mtpd.rc took 0.0055s.)
 init: (Parsing /system/etc/init/netd.rc took 0.0066s.)
 init: (Parsing /system/etc/init/perfprofd.rc took 0.0057s.)
 init: (Parsing /system/etc/init/racoon.rc took 0.0054s.)
 init: (Parsing /system/etc/init/rild.rc took 0.0061s.)
 init: (Parsing /system/etc/init/servicemanager.rc took 0.0063s.)
 init: (Parsing /system/etc/init/surfaceflinger.rc took 0.0061s.)
 init: (Parsing /system/etc/init/uncrypt.rc took 0.0068s.)
 init: (Parsing /system/etc/init/vdc.rc took 0.0065s.)
 init: (Parsing /system/etc/init/vold.rc took 0.0063s.)

0.0112+0.0094+0.0103+0.0090+0.0085+0.0078+0.0073+0.0063+0.0067+0.0060+
0.0060+0.0059+0.0068+0.0057+0.0064+0.0063+0.0055+0.0066+0.0057+0.0054+
0.0061+0.0063+0.0061+0.0068+0.0065+0.0063 = 0.1809

And here it is again with the logging disabled:

 init: (Parsing /system/etc/init/atrace.rc took 0.0021s.)
 init: (Parsing /system/etc/init/bootanim.rc took 0.0006s.)
 init: (Parsing /system/etc/init/crash_reporter.rc took 0.0007s.)
 init: (Parsing /system/etc/init/debuggerd.rc took 0.0004s.)
 init: (Parsing /system/etc/init/debuggerd64.rc took 0.0005s.)
 init: (Parsing /system/etc/init/drmserver.rc took 0.0005s.)
 init: (Parsing /system/etc/init/dumpstate.rc took 0.0005s.)
 init: (Parsing /system/etc/init/gatekeeperd.rc took 0.0005s.)
 init: (Parsing /system/etc/init/installd.rc took 0.0005s.)
 init: (Parsing /system/etc/init/keystore.rc took 0.0013s.)
 init: (Parsing /system/etc/init/lmkd.rc took 0.0006s.)
 init: (Parsing /system/etc/init/logcatd.rc took 0.0013s.)
 init: (Parsing /system/etc/init/logd.rc took 0.0007s.)
 init: (Parsing /system/etc/init/mdnsd.rc took 0.0005s.)
 init: (Parsing /system/etc/init/mediaserver.rc took 0.0009s.)
 init: (Parsing /system/etc/init/metrics_daemon.rc took 0.0008s.)
 init: (Parsing /system/etc/init/mtpd.rc took 0.0011s.)
 init: (Parsing /system/etc/init/netd.rc took 0.0005s.)
 init: (Parsing /system/etc/init/perfprofd.rc took 0.0005s.)
 init: (Parsing /system/etc/init/racoon.rc took 0.0005s.)
 init: (Parsing /system/etc/init/rild.rc took 0.0005s.)
 init: (Parsing /system/etc/init/servicemanager.rc took 0.0005s.)
 init: (Parsing /system/etc/init/surfaceflinger.rc took 0.0005s.)
 init: (Parsing /system/etc/init/uncrypt.rc took 0.0005s.)
 init: (Parsing /system/etc/init/vdc.rc took 0.0005s.)
 init: (Parsing /system/etc/init/vold.rc took 0.0006s.)

0.0021+0.0006+0.0007+0.0004+0.0005+0.0005+0.0005+0.0005+0.0005+0.0013+
0.0006+0.0013+0.0007+0.0005+0.0009+0.0008+0.0011+0.0005+0.0005+0.0005+
0.0005+0.0005+0.0005+0.0005+0.0005+0.0006 = 0.0181

It's less than a second, but one problem is that the cost of the current
dumping is proportional to the number of init.rc files, so the more
cleanly you factor things, the more it would cost.

Change-Id: Id96f59e7d0b082d8cfdba4bdbff43a922ba4eeee
2015-10-09 14:03:14 -07:00
adb Use const auto&/auto&& in adb. 2015-10-07 16:11:17 -07:00
adf Adf: Remove unused variable 2015-07-27 22:08:16 -07:00
base base logging: fix errno restoring, severity conditionality, dangling ifs 2015-09-21 12:46:12 -07:00
cpio fs_config: replace getenv('OUT') by new fs_config parameter 2015-07-09 21:47:07 -07:00
crash_reporter crash_reporter: Set Version and Product ID 2015-09-30 16:49:15 -07:00
debuggerd Fix build break due to unknown pragma (on gcc). 2015-09-30 23:30:38 -07:00
fastboot Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
fingerprintd Fingerprint: Add HAL close() code 2015-07-10 16:26:32 -07:00
fs_mgr am ad2a5a89: Merge "fs_mgr: trigger dm-verity error handling for invalid signatures" 2015-09-30 20:04:51 +00:00
gatekeeperd update bundled rc files to their contents from rootdir/init.rc 2015-08-21 21:54:42 +00:00
healthd am 62729a1d: am 565e4c6a: Merge "healthd: Adds cycle_count, current_now and full_charge properties." 2015-08-26 00:22:11 +00:00
include am b955f476: Merge "Add a "tlsdate" AID for unprivileged tlsdate execution." 2015-10-02 18:41:05 +00:00
init init shouldn't call DumpState by default. 2015-10-09 14:03:14 -07:00
libbacktrace libbacktrace: don't let llvm cflags cover libbacktrace's cflags. 2015-09-24 17:46:27 -07:00
libbinderwrapper Add libbinderwrapper. 2015-09-09 14:21:28 -06:00
libcutils fs_config.c: remove setuid from procrank 2015-10-07 16:41:47 -07:00
libdiskconfig am eb075e28: am c8179498: am 2f62edf7: Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:19:27 +00:00
libion am 8d2cd035: am 2ddb9cb1: am ed43be39: Merge "Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it\'s not needed." 2015-04-02 22:07:16 +00:00
liblog liblog: optimize code hotspot 2015-10-02 13:55:44 -07:00
libmemtrack Remove a hack for getting libpagerank's headers. 2015-09-22 22:35:30 -07:00
libmincrypt Enable clang compilation. 2015-05-15 16:13:19 -07:00
libnativebridge Use __ANDROID__ instead of HAVE_ANDROID_OS. 2015-07-30 09:33:43 -07:00
libnetutils am fb1ecbc5: am e6e71608: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS." 2015-07-30 16:50:15 +00:00
libpixelflinger To compile with llvm integrated assembler. 2015-08-21 15:58:26 -07:00
libprocessgroup processgroup: change the polling interval for killProcessGroup() 2015-06-16 13:59:32 -07:00
libsparse Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
libsuspend Adds a parameter to the wakeup_callback to report sucessful wakeup or suspend aborts. 2015-06-25 13:15:22 -07:00
libsync Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed. 2015-04-02 14:31:07 -07:00
libsysutils Fix incorrectly sized buffer. 2015-07-28 17:56:06 +09:00
libusbhost libusbhost: Fix problem reading USB string descriptors on some quirky devices 2015-06-18 13:38:31 -07:00
libutils am c6c6ab50: Merge "Implement C++11 move semantics for android::FileMap" 2015-10-02 01:19:25 +00:00
libziparchive Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
lmkd bundle init.rc contents with its service 2015-08-21 10:14:43 -07:00
logcat logcat: do not exit buffer loop on error 2015-10-07 16:23:54 -07:00
logd logd: clearAll by UID speedup 2015-10-07 16:24:57 -07:00
logwrapper am eaf04aa0: am 3b94cef1: Merge "Add FORK_EXECVP_OPTION_CAPTURE_OUTPUT to logwrap.h" 2015-08-22 02:40:51 +00:00
metricsd metricsd: Rename build_target_id to product_id. 2015-10-06 15:27:37 -07:00
mkbootimg mkbootimg: misc typo fixes 2015-06-04 09:59:01 -07:00
reboot reboot: Turn on -Werror 2014-05-21 12:58:38 -07:00
rootdir Merge "init.rc: mkdir /data/misc/update_engine 0700 root root" 2015-10-07 20:18:36 +00:00
run-as Extend run-as with optional --user argument. 2015-06-10 12:09:10 -07:00
sdcard resolved conflicts for merge of b9f438ff to mnc-dev-plus-aosp 2015-08-06 12:52:25 -07:00
toolbox Lose du to toybox. 2015-09-14 10:37:52 -07:00
trusty/libtrusty Merge "Revert "[core][trusty] add gatekeeper module"" 2015-09-16 22:54:14 +00:00
tzdatacheck Executable to run on boot that removes old tzdata if needed 2015-04-13 11:38:32 +01:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk Add a CleanSpec for grep/toolbox. 2015-03-22 18:04:54 -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