summaryrefslogtreecommitdiff
path: root/init/bootchartd.c
Commit message (Collapse)AuthorAgeFilesLines
* libbb: consolidate NOMMU fix of restoring high bit in argv[0][0]Denys Vlasenko2023-04-061-2/+0
| | | | | | | | | | | function old new delta fork_or_rexec 46 56 +10 bootchartd_main 1087 1079 -8 cpio_main 674 661 -13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 10/-21) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use fopen helpers where appropriateDenys Vlasenko2020-12-301-5/+5
| | | | | | | | | | | | function old new delta finalize 348 343 -5 parse_resolvconf 306 299 -7 list_i2c_busses_and_exit 495 483 -12 bootchartd_main 1091 1076 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-39) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower overhead call to bb_perror_msg() when only a string was being printed with no parameters. This saves space for some CPU architectures because it avoids the overhead of a call to a variadic function. However there has never been a simple version of bb_error_msg(), and since 2007 many new calls to bb_perror_msg() have been added that only take a single parameter and so could have been using bb_simple_perror_message(). This changeset introduces 'simple' versions of bb_info_msg(), bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and bb_herror_msg_and_die(), and replaces all calls that only take a single parameter, or use something like ("%s", arg), with calls to the corresponding 'simple' version. Since it is likely that single parameter calls to the variadic functions may be accidentally reintroduced in the future a new debugging config option WARN_SIMPLE_MSG has been introduced. This uses some macro magic which will cause any such calls to generate a warning, but this is turned off by default to avoid use of the unpleasant macros in normal circumstances. This is a large changeset due to the number of calls that have been replaced. The only files that contain changes other than simple substitution of function calls are libbb.h, libbb/herror_msg.c, libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c, networking/udhcp/common.h and util-linux/mdev.c additonal macros have been added for logging so that single parameter and multiple parameter logging variants exist. The amount of space saved varies considerably by architecture, and was found to be as follows (for 'defconfig' using GCC 7.4): Arm: -92 bytes MIPS: -52 bytes PPC: -1836 bytes x86_64: -938 bytes Note that for the MIPS architecture only an exception had to be made disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h) because it made these files larger on MIPS. Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: more tweaksDenys Vlasenko2018-12-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* regularize format of source file headers, no code changesDenys Vlasenko2017-09-181-5/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* config: deindent all help textsDenys Vlasenko2017-07-211-21/+21
| | | | | | Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: fix typo in commentDenys Vlasenko2017-07-201-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: prevent premature stop by device mapperUwe Geuder2017-07-201-1/+3
| | | | | | | | Kernel thread kdmflush was recognized as display manager kdm, check for string length. Signed-off-by: Uwe Geuder <busybox2017-ugeuder@snkmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Update menuconfig items with approximate applet sizesDenys Vlasenko2017-07-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: slap on a few ALIGN1/2s where appropriateDenys Vlasenko2016-04-221-1/+1
| | | | | | | | | | The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" text data bss dec hex filename 829901 4086 1904 835891 cc133 busybox_before 829665 4086 1904 835655 cc047 busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: add most of the required setup_common_bufsiz() callsDenys Vlasenko2016-04-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: warn if .config looks wrongDenys Vlasenko2013-11-031-0/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: add process accounting featureQuentin Casasnovas2012-01-181-15/+24
| | | | | | | | | | | | function old new delta bootchartd_main 962 1088 +126 finalize 294 357 +63 acct - 33 +33 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 222/0) Total: 222 bytes Signed-off-by: Quentin Casasnovas <quentin.casasnovas@mathembedded.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nommu: fix cases where we mangle argv[0][0]Denys Vlasenko2011-11-221-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mass removal of underscores from _BB_DIR_foo and _BB_SUID_fooDenys Vlasenko2011-01-181-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* use BB_EXECVP_or_die where appropriateDenys Vlasenko2010-11-281-2/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* init/*: move applet/kbuild/config/help bits into applet source filesDenys Vlasenko2010-10-121-0/+4
| | | | Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: mounting tmpfs is Linux-specificJeremie Koenig2010-07-301-7/+13
| | | | | Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mark Linux-specific configuration optionsJeremie Koenig2010-07-191-0/+1
| | | | | | | | PLATFORM_LINUX is used as a dependency for applets or features which require Linux-specific interfaces. Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: fix labels in config system. no code changesDenys Vlasenko2010-07-061-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: introduce and use xfork() and xvfork()Pascal Bellard2010-07-041-3/+1
| | | | | | | | | | | | | | | | function old new delta launch_helper 170 169 -1 setup_heredoc 312 302 -10 handle_dir_common 367 354 -13 expand_vars_to_list 2456 2443 -13 open_transformer 89 74 -15 data_extract_to_command 439 423 -16 do_ipaddr 1406 1389 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85) Total: -85 bytes Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: fix sample period calculationsKeisuke Yasui2010-06-281-5/+7
| | | | | Signed-off-by: Keisuke Yasui <keisuke.yasui@toshiba.co.jp> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* conspy: code shrinkPascal Bellard2010-06-281-16/+15
| | | | | | | | | | function old new delta conspy_main 1446 1444 -2 screen_read_close 114 108 -6 screen_char 299 293 -6 Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixDenys Vlasenko2010-06-221-6/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix config help textDenys Vlasenko2010-06-211-11/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: added optional compat featuresDenys Vlasenko2010-06-211-29/+125
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: use CONFIG_FEATURE_EDITING_MAX_LENDenys Vlasenko2010-05-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: better wording in commentDenys Vlasenko2010-05-051-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: add missing parenthesisDenys Vlasenko2010-05-041-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* bootchartd: new appletDenys Vlasenko2010-05-041-0/+355
Usage: bootchartd start [PROG ARGS]|init|stop Create /var/log/bootchart.tgz with boot chart data Options: start: start background logging; with PROG, run PROG, then kill logging with USR1 stop: send USR1 to all bootchartd processes init: start background logging; stop when getty/gdm is seen (for init scripts) Under PID 1: as init, then exec $bootchart_init, /init, /sbin/init function old new delta bootchartd_main - 907 +907 dump_procs - 353 +353 packed_usage 26566 26735 +169 dump_file - 91 +91 static.dirs - 23 +23 applet_names 2176 2187 +11 applet_main 1284 1288 +4 applet_nameofs 642 644 +2 ------------------------------------------------------------------------------ (add/remove: 5/0 grow/shrink: 4/0 up/down: 1560/0) Total: 1560 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>