1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
systemd/src
Michal Schmidt d200735e13 dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
 - only the .data members change at runtime, yet the whole arrays of
   properties with all the fields are constructed on the stack one by
   one by the code.
 - there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
   are repeated in several unit types.

Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).

On my system the code shrinks by 60 KB, data increases by 10 KB.
2012-01-16 13:34:42 +01:00
..
binfmt build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
cryptsetup core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
hostname dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
journal journal: drop privileges when storing coredump 2012-01-14 03:37:32 +01:00
linux build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
locale dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
login dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
readahead core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
systemd journal: hook up coredumping with journal 2012-01-14 01:54:33 +01:00
timedate dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
vconsole build-sys: add stub makefiles to subdirs 2012-01-05 16:29:21 +01:00
.gitignore journal: hook up coredumping with journal 2012-01-14 01:54:33 +01:00
70-uaccess.rules logind: implement D-Bus properties 2011-06-21 19:29:44 +02:00
71-seat.rules seat: add another 'Plugable' device id 2011-07-25 14:35:33 +02:00
73-seat-late.rules.in acl: properly handle if devices are tagged as uaccess but do not have a device node 2011-08-25 16:50:49 +02:00
99-systemd.rules.in udev: exclude loopback device from udev rule based sysctl application, since we can just apply that directly at boot 2011-12-27 22:52:15 +01:00
ac-power.c ac-power: make ac-power a proper binary that scripts can call 2010-11-10 22:38:44 +01:00
acl-util.c journal: split user logs into their own journal files 2011-10-07 23:03:07 +02:00
acl-util.h journal: split user logs into their own journal files 2011-10-07 23:03:07 +02:00
ask-password-api.c util: rework ANSI escape code macros 2012-01-14 01:54:33 +01:00
ask-password-api.h ask-password: supported plymouth cached passwords 2011-02-23 01:12:07 +01:00
ask-password.c ask-password: use default timeout 2011-04-16 02:03:34 +02:00
automount.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
automount.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
bridge.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
build.h build: expose libcryptsetup dependency in build string 2010-11-18 00:39:09 +01:00
bus-errors.h systemctl: introduce systemctl kill 2010-10-22 16:11:50 +02:00
cgls.c systemctl: hide all information on --kill-mode= since it is mostly useless 2011-07-07 04:19:03 +02:00
cgroup-attr.c exec: optionally apply cgroup attributes to the cgroups we create 2011-08-20 00:22:02 +02:00
cgroup-attr.h exec: optionally apply cgroup attributes to the cgroups we create 2011-08-20 00:22:02 +02:00
cgroup-show.c journal: add preliminary incomplete implementation 2011-10-07 22:02:05 +02:00
cgroup-show.h
cgroup-util.c cgroup: optionally mount a specific cgroup controllers together, and add cpu+cpuacct to the default 2011-08-23 00:37:35 +02:00
cgroup-util.h cgroup: honour sticky bit when trimming cgroup trees 2011-08-21 20:07:46 +02:00
cgroup.c unit: remove union Unit 2012-01-16 13:34:42 +01:00
cgroup.h exec: add ControlGroupModify= switch to allow changing access mode to cgroups fs 2011-06-30 00:11:25 +02:00
cgroups-agent.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
condition.c condition: Fix file descriptor leak in test_capability() 2011-11-01 17:02:32 +01:00
condition.h unit: introduce ConditionCapability 2011-10-11 15:16:52 +02:00
conf-parser.c conf-parser: silence compiler warning 2012-01-05 00:46:55 +01:00
conf-parser.h journald: parse configuration file 2012-01-04 20:40:04 +01:00
dbus-automount.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-automount.h
dbus-common.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-common.h dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-device.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-device.h
dbus-execute.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-execute.h dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-job.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-job.h dbus: pass along information why a job failed when it failed (dbus api change!) 2011-02-24 02:36:34 +01:00
dbus-loop.c logind: first version that compiles fine 2011-06-21 19:29:44 +02:00
dbus-loop.h logind: first version that compiles fine 2011-06-21 19:29:44 +02:00
dbus-manager.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-manager.h
dbus-mount.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-mount.h
dbus-path.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-path.h
dbus-service.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-service.h
dbus-snapshot.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-snapshot.h
dbus-socket.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-socket.h
dbus-swap.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-swap.h
dbus-target.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-target.h
dbus-timer.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-timer.h
dbus-unit.c dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus-unit.h dbus: more efficient implementation of properties 2012-01-16 13:34:42 +01:00
dbus.c unit: remove union Unit 2012-01-16 13:34:42 +01:00
dbus.h dbus: send our finished signal when we are finished booting 2011-06-27 13:47:03 +02:00
def.h def: lower default timeout to 90s 2011-04-27 22:30:50 +02:00
detect-virt.c util: move virtualization detection into its own files, and extend return codes 2011-09-23 17:00:33 +02:00
device.c unit: use the UNIT() macro consistently 2012-01-16 13:34:42 +01:00
device.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
execute.c journal: introduce log target 'journal' for executed processes 2012-01-06 02:48:38 +01:00
execute.h journal: introduce log target 'journal' for executed processes 2012-01-06 02:48:38 +01:00
exit-status.c execute: log errors from "sd(EXEC)" 2011-11-17 01:36:11 +01:00
exit-status.h execute: log errors from "sd(EXEC)" 2011-11-17 01:36:11 +01:00
fdset.c manager: merge serialization and desrialization counter into one, and increase it when reexecuting 2011-07-06 00:47:42 +02:00
fdset.h
fsck.c fsck: Fix typo in comment 2011-12-15 18:48:15 +01:00
getty-generator.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
gnome-ask-password-agent.vala gnome-ask-password-agent: require libnotify >= 0.7.0 2011-12-31 18:15:27 +01:00
hashmap.c hashmap: add hashmap_first_key() 2011-12-19 19:54:51 +01:00
hashmap.h hashmap: add hashmap_first_key() 2011-12-19 19:54:51 +01:00
hostname-setup.c Add Mageia support 2011-11-02 02:16:39 +01:00
hostname-setup.h
initctl.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
initreq.h
install.c Allow 'list-unit-files' to run with --root. 2011-12-05 22:04:42 +01:00
install.h bus: expose installer functions 2011-07-23 03:44:47 +02:00
ioprio.h
job.c unit: remove union Unit 2012-01-16 13:34:42 +01:00
job.h job: fix deserialization of jobs: do not ignore ordering 2011-04-06 19:09:33 +02:00
kmod-setup.c exec: optionally apply cgroup attributes to the cgroups we create 2011-08-20 00:22:02 +02:00
kmod-setup.h
label.c label: fix labeling of symbolic links 2011-12-19 23:58:58 +01:00
label.h label: introduce label_bind() and make use of it where necessary 2011-08-31 01:02:00 +02:00
libsystemd-daemon.pc.in build-sys: move .pc files next to the matching sources 2012-01-07 01:36:36 +01:00
libsystemd-daemon.sym libs: add symbol versioning for the benefit of RPM 2011-07-14 23:49:37 +02:00
libsystemd-id128.pc.in build-sys: move .pc files next to the matching sources 2012-01-07 01:36:36 +01:00
libsystemd-id128.sym sd-id128: let's make our API a bit smaller, since sd_id128_make_v4_uuid() is dispensable 2012-01-07 01:37:39 +01:00
list.h manager: always pull 'following' units into transaction 2010-11-14 23:48:21 +01:00
load-dropin.c unit: remove union Unit 2012-01-16 13:34:42 +01:00
load-dropin.h
load-fragment-gperf.gperf.m4 unit: remove union Unit 2012-01-16 13:34:42 +01:00
load-fragment.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
load-fragment.h exec: add high-level controls for blkio cgroup attributes 2011-08-21 20:07:08 +02:00
locale-setup.c Add Mageia support 2011-11-02 02:16:39 +01:00
locale-setup.h
log.c util: rework ANSI escape code macros 2012-01-14 01:54:33 +01:00
log.h log: make internal log api log directly to the journal 2012-01-12 04:34:31 +01:00
logs-show.c journal: when show blob data show length 2012-01-14 03:07:47 +01:00
logs-show.h journal: add output mode that just prints simple messages without any decorations 2012-01-13 02:58:45 +01:00
loopback-setup.c loopback: downgrade an error to warning 2011-03-16 03:35:38 +01:00
loopback-setup.h
machine-id-main.c main: introduce /etc/machine-id 2011-03-04 21:53:19 +01:00
machine-id-setup.c build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
machine-id-setup.h main: introduce /etc/machine-id 2011-03-04 21:53:19 +01:00
macro.h macro: fix ALIGN_TO macro definition 2011-11-08 18:18:48 +01:00
main.c unit: remove union Unit 2012-01-16 13:34:42 +01:00
Makefile
manager.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
manager.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
missing.h missing: define gettid() 2011-08-01 05:06:15 +02:00
modules-load.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
mount-setup.c selinux: explicitly relabel /run/initramfs/root-fsck and friends 2011-08-30 18:49:41 +02:00
mount-setup.h cgroup: optionally mount a specific cgroup controllers together, and add cpu+cpuacct to the default 2011-08-23 00:37:35 +02:00
mount.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
mount.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
namespace.c namespace: remount namespace root dir for SLAVE to avoid propagation of mounts from the namespace to the host 2012-01-03 21:12:10 +01:00
namespace.h
notify.c build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
nspawn.c build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
org.freedesktop.systemd1.conf systemctl: hook up new install logic 2011-07-25 04:58:02 +02:00
org.freedesktop.systemd1.policy.in.in build-sys: fix make distcheck 2011-07-12 01:11:40 +02:00
org.freedesktop.systemd1.service
pager.c pager: add _noreturn_ to pager_fallback() 2011-10-11 15:41:32 +02:00
pager.h cgls: add pager support to systemd-cgls 2011-07-07 02:34:35 +02:00
path-lookup.c path-lookup: monitor /etc/systemd/user for user manager 2011-08-24 14:08:56 +02:00
path-lookup.h path-lookup: make inclusion of user private units optional 2011-07-22 04:31:20 +02:00
path.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
path.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
polkit.c mechanisms: add mechanisms to change system locale and clock 2011-06-21 19:29:45 +02:00
polkit.h mechanisms: add mechanisms to change system locale and clock 2011-06-21 19:29:45 +02:00
quotacheck.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
random-seed.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
ratelimit.c ratelimit: removed n_printed 2011-02-28 23:04:18 +01:00
ratelimit.h ratelimit: removed n_printed 2011-02-28 23:04:18 +01:00
rc-local-generator.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
remount-api-vfs.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
reply-password.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
sd-daemon.c sd-daemon: turn sd-daemon.c into a shared library 2011-07-14 23:06:31 +02:00
sd-id128.c sd-id128: let's make our API a bit smaller, since sd_id128_make_v4_uuid() is dispensable 2012-01-07 01:37:39 +01:00
securebits.h Spelling Corrections 2011-02-28 22:47:38 +01:00
selinux-setup.c selinux: reopen log when loading the SELinux policy fails 2011-09-22 04:05:40 +02:00
selinux-setup.h selinux: use setcon() instead of reexec to apply selinux policy 2011-07-28 23:52:23 +02:00
service.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
service.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
set.c
set.h
shutdown.c shutdown: add link to root storage daemon text 2012-01-11 02:52:34 +01:00
shutdownd.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
shutdownd.h shutdown: respect the dry run option '-k' 2011-07-03 00:12:16 +02:00
snapshot.c unit: use the UNIT() macro consistently 2012-01-16 13:34:42 +01:00
snapshot.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
socket-util.c label: introduce label_bind() and make use of it where necessary 2011-08-31 01:02:00 +02:00
socket-util.h socket: expose IP_TRANSPARENT 2011-05-19 13:22:31 +02:00
socket.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
socket.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
spawn-agent.c systemctl: hook up new install logic 2011-07-25 04:58:02 +02:00
spawn-agent.h systemctl: hook up new install logic 2011-07-25 04:58:02 +02:00
special.h systemd: reconnect to syslog as soon as the journal is fully up 2012-01-11 03:16:24 +01:00
specifier.c specifier: drop misplaced assert() 2011-08-30 16:49:48 +02:00
specifier.h
strv.c coverity: change a few things so that coverity doesn't show so many false positives 2011-09-23 01:45:34 +02:00
strv.h cgroup: optionally mount a specific cgroup controllers together, and add cpu+cpuacct to the default 2011-08-23 00:37:35 +02:00
swap.c unit: use safe downcasts, remove pointless casts 2012-01-16 13:34:42 +01:00
swap.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
sysctl.c umask: change default umask to 0022 just to be sure, and set it explicitly in all binaries, in order to make sure it is set when started from the terminal 2011-08-01 20:52:18 +02:00
sysfs-show.c llvm-analyze: change a few things to make llvm-analyze show fewer false positives 2011-09-23 16:28:27 +02:00
sysfs-show.h loginctl: add missing header file 2011-07-09 00:04:27 +02:00
system.conf core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
systemadm.vala systemadm: use colors for id too, remove color from fragment link 2011-09-20 01:07:28 +02:00
systemctl.c util: rework ANSI escape code macros 2012-01-14 01:54:33 +01:00
systemd-analyze analyze: always draw top kernel, initramfs, userspace bars 2011-09-27 12:57:28 +02:00
systemd-bash-completion.sh bash-completion: rename file since it is no longer for systemctl only 2011-11-02 13:07:47 +01:00
systemd-interfaces.vala dbus: pass along information why a job failed when it failed (dbus api change!) 2011-02-24 02:36:34 +01:00
systemd.pc.in build-sys: move .pc files next to the matching sources 2012-01-07 01:36:36 +01:00
target.c unit: use the UNIT() macro consistently 2012-01-16 13:34:42 +01:00
target.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
tcpwrap.c
tcpwrap.h
test-cgroup.c kill: always send SIGCONT after SIGTERM 2011-03-03 23:55:30 +01:00
test-daemon.c build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
test-engine.c test: rename test directory 2011-12-31 18:06:56 +01:00
test-env-replace.c ask-password: supported plymouth cached passwords 2011-02-23 01:12:07 +01:00
test-hostname.c
test-id128.c build-sys: move public header files into a dir of their own 2012-01-05 16:01:58 +01:00
test-install.c install: add new installer implementation 2011-07-22 04:31:21 +02:00
test-job-type.c Spelling Corrections 2011-02-28 22:47:38 +01:00
test-loopback.c
test-ns.c
test-strv.c specifier: at minimal test 2011-01-06 23:51:52 +01:00
timer.c unit: use the UNIT() macro consistently 2012-01-16 13:34:42 +01:00
timer.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
timestamp.c manager: parse RD_TIMESTAMP passed from initrd 2010-11-10 22:38:44 +01:00
tmpfiles.c tmpfiles: fix parsing of /proc/net/unix on 32Bit machines 2012-01-11 22:08:33 +01:00
tty-ask-password-agent.c plymouth: fix ply proto endianess issues 2011-11-01 14:20:31 +01:00
umount.c llvm-analyze: change a few things to make llvm-analyze show fewer false positives 2011-09-23 16:28:27 +02:00
umount.h
unit-name.c util: various optimizations, using join() 2011-08-01 01:55:31 +02:00
unit-name.h unit: introduce %f specifier to decode file names 2010-10-20 16:16:45 +02:00
unit.c unit: remove union Unit 2012-01-16 13:34:42 +01:00
unit.h unit: remove union Unit 2012-01-16 13:34:42 +01:00
update-utmp.c core: switch all log targets to go directly to the journal, instead via syslog 2012-01-12 05:09:06 +01:00
user.conf logind: add man page for configuration file 2011-06-29 02:27:53 +02:00
util.c util: support formatting eta and peta bytes with format_bytes() 2012-01-14 03:07:29 +01:00
util.h util: introduce FORMAT_BYTES_MAX 2012-01-14 03:06:57 +01:00
utmp-wtmp.c utmp: for DEAD_PROCESS write the current time to wtmp 2011-11-07 01:10:35 +01:00
utmp-wtmp.h utmp: remove unneded parameters 2011-11-07 01:09:53 +01:00
virt.c util: move virtualization detection into its own files, and extend return codes 2011-09-23 17:00:33 +02:00
virt.h util: move virtualization detection into its own files, and extend return codes 2011-09-23 17:00:33 +02:00
wraplabel.vala systemadm: add a wrappable label and use it for status lines 2011-09-20 01:06:01 +02:00