summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2012-03-19 09:36:42 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2012-03-19 09:36:42 +0100
commit9fd4f96d2a2527ac7ca90c156bfc11ce10118684 (patch)
tree28fc6ab201afec903b58fad7b21dcaf57085af9f /file.c
parent1be02798f56f3ee940c9cbc047be627fd12eef16 (diff)
downloadstrace-9fd4f96d2a2527ac7ca90c156bfc11ce10118684.tar.gz
strace-9fd4f96d2a2527ac7ca90c156bfc11ce10118684.tar.bz2
strace-9fd4f96d2a2527ac7ca90c156bfc11ce10118684.tar.xz
Optimize code if we have only one personality
On i386: text data bss dec hex filename 238025 672 18980 257677 3ee8d strace.before 237389 704 18944 257037 3ec0d strace * defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined. Introduce new define, current_wordsize as (personality_wordsize[current_personality]). Make set_personality() no-op, current_personality constant zero, current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality. * count.c (call_summary): Use current_wordsize instead of personality_wordsize[current_personality]. * desc.c (printflock): Likewise. * file.c (sys_utime): Likewise. * io.c (tprint_iov): Likewise. * process.c (printargv): Likewise. * resource.c (decode_rlimit): Likewise. * signal.c (sys_kill): Likewise. (sys_rt_sigaction): Likewise. * time.c (sprinttv): Likewise. (sprint_timespec): Likewise. (printitv_bitness): Likewise. (tprint_timex): Likewise. (printsigevent): Likewise. * util.c (dumpiov): Likewise. (umoven): Likewise. (umovestr): Likewise. * syscall.c: Initialize sysent to sysent0 etc. Make current_personality, personality_wordsize[], set_personality() conditional on SUPPORTED_PERSONALITIES > 1. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 32d2122..1a448cd 100644
--- a/file.c
+++ b/file.c
@@ -2059,7 +2059,7 @@ sys_utime(struct tcb *tcp)
long utl[2];
int uti[2];
} u;
- unsigned wordsize = personality_wordsize[current_personality];
+ unsigned wordsize = current_wordsize;
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);