]> granicus.if.org Git - strace/commit
Shrink space needed by undefined syscalls in syscall tables.
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 19 Mar 2012 08:51:42 +0000 (09:51 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 19 Mar 2012 08:51:42 +0000 (09:51 +0100)
commitc1371ebc400fe9578908beca87f2bf407daf1506
tree0cea1f0643f0c7233f9c37516b3d4c5d634a33e7
parent9fd4f96d2a2527ac7ca90c156bfc11ce10118684
Shrink space needed by undefined syscalls in syscall tables.

Undefined syscall looked like this before this change:
{ 5,    0,      printargs,              "SYS_53"                },
That is, "SYS_53" string had to be allocated and stored in strace binary.
Since now SCNO_IN_RANGE() macro requires sysent[scno].sys_func != NULL
for valid syscalls, we can replace printargs with NULL in such lines
and make them "invalid", thus not requiring syscall name string.

Savings on i386:
   text    data     bss     dec     hex filename
 237389     704   18944  257037   3ec0d strace.before
 236973     704   18944  256621   3ea6d strace
Savings on mips:
 336551  153692   38320  528563   810b3 strace.before
 275543  153688   38320  467551   7225f strace

Tested to still decode undefined syscalls correctly (syscall no. 222 on i386).

* linux/*/syscallent.h: Replace 'printargs, "SYS_nnn"' with
'NULL, NULL'.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
18 files changed:
linux/alpha/syscallent.h
linux/arm/syscallent.h
linux/arm/syscallent1.h
linux/avr32/syscallent.h
linux/bfin/syscallent.h
linux/hppa/syscallent.h
linux/i386/syscallent.h
linux/ia64/syscallent.h
linux/m68k/syscallent.h
linux/microblaze/syscallent.h
linux/mips/syscallent.h
linux/powerpc/syscallent.h
linux/s390/syscallent.h
linux/s390x/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/sparc/syscallent1.h