]> granicus.if.org Git - strace/commit
Small optimization in signal and ioctl tables
authorDenys Vlasenko <dvlasenk@redhat.com>
Sat, 20 Aug 2011 00:12:33 +0000 (02:12 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 23 Aug 2011 10:53:01 +0000 (12:53 +0200)
commit39fca628019cbfa01835482ac8559e21fde7f03c
treec4c70bdf7c9b37c3b399d7232e56b3eabc7ded56
parent5c774b2be4c64f24c8473d7bdf2ad23b8bc314cc
Small optimization in signal and ioctl tables

Trivial shuffling of data tables puts them all in one file,
allowing gcc to see their sizes and eliminate variables
which store these sizes.

Surprisingly, in C mode gcc does not optimize out static const int
variables. Help it by using enums instead.

* defs.h: Stop exporting ioctlent{0,1,2}, nioctlents{0,1,2},
signalent{0,1,2}, nsignals{0,1,2}.
* ioctl.c: Remove definitions of ioctlent{,0,1,2} and nioctlents{,0,1,2}.
* signal.c: Remove definitions of signalent{,0,1,2} and nsignals{,0,1,2}.
* syscall.c: Move above definitions to this file. Make them static const
or enums if suitable.
defs.h
ioctl.c
signal.c
syscall.c