Speed up x86 by avoiding EAX read on syscall entry
Speed up x86 by avoiding EAX read on syscall entry

on x86, EAX read on syscall entry is not necessary if we know
that post-execve SIGTRAP is disabled by PTRACE_O_TRACEEXEC ptrace option.
This patch (a) moves EAX retrieval from syscall_fixup
to get_scno_on_sysexit, and (b) perform EAX retrieval in syscall_fixup
only if we are in syscall entry and PTRACE_O_TRACEEXEC option is not on.

* syscall.c (get_scno_on_sysexit): On I386 and X86_64, read eax/rax
which contain syscall return value.
(syscall_fixup): On I386 and X86_64, read eax/rax only on syscall enter
and only if PTRACE_O_TRACEEXEC is not in effect.

Signed-off-by: Denys Vlasenko <50fbbd36fe0f9c8261d4a3c762c8c29ffb35e48f@redhat.com>

jamel/strace-plus,geekboxzone/mmallow_external_strace,AOSP-YU/platform_external_strace,xin3liang/platform_external_strace,DirtyUnicorns/android_external_strace,cuviper/strace,AOSP-YU/platform_external_strace,lizh06/strace-plus,AOSP-YU/platform_external_strace,vrastogi/strace,lkundrak/strace,cuviper/strace,pgbovine/strace-plus,bigzz/strace_android,AOSP-YU/platform_external_strace,DirtyUnicorns/android_external_strace,DirtyUnicorns/android_external_strace,geekboxzone/mmallow_external_strace,geekboxzone/lollipop_external_strace,android-ia/platform_external_strace,geofft/strace,xin3liang/platform_external_strace,pgbovine/strace-plus,CyanogenMod/android_external_strace,CyanogenMod/android_external_strace,AOSP-YU/platform_external_strace,lizh06/strace-plus,vrastogi/strace,cuviper/strace,lkundrak/strace,CyanogenMod/android_external_strace,MonkeyZZZZ/platform_external_strace,bnoordhuis/strace,kapdop/android_external_strace,MonkeyZZZZ/platform_external_strace,Infinitive-OS/platform_external_strace,lizh06/strace-plus,Andrey9kin/revisor,Saruta/strace,MonkeyZZZZ/platform_external_strace,YUPlayGodDev/platform_external_strace,Distrotech/strace,geekboxzone/mmallow_external_strace,bigzz/strace_android,Infinitive-OS/platform_external_strace,geofft/strace,Saruta/strace,lizh06/strace-plus,TeamExodus/external_strace,gcode-mirror/strace-plus,geekboxzone/lollipop_external_strace,Infinitive-OS/platform_external_strace,TeamExodus/external_strace,android-ia/platform_external_strace,timmattison/strace-arm,TeamExodus/external_strace,Distrotech/strace,YUPlayGodDev/platform_external_strace,YUPlayGodDev/platform_external_strace,jamel/strace-plus,vrastogi/strace,YUPlayGodDev/platform_external_strace,pombredanne/strace,YUPlayGodDev/platform_external_strace,DirtyUnicorns/android_external_strace,geofft/strace,bnoordhuis/strace,Yu-AndroidM/android_external_strace,vrastogi/strace,bnoordhuis/strace,geekboxzone/mmallow_external_strace,Andrey9kin/revisor,Infinitive-OS/platform_external_strace,gcode-mirror/strace-plus,jamel/strace-plus,bigzz/strace_android,Yu-AndroidM/android_external_strace,lkundrak/strace,jamel/strace-plus,geekboxzone/lollipop_external_strace,Saruta/strace,android-ia/platform_external_strace,kapdop/android_external_strace,xin3liang/platform_external_strace,geekboxzone/lollipop_external_strace,Yu-AndroidM/android_external_strace,CyanogenMod/android_external_strace,android-ia/platform_external_strace,pgbovine/strace-plus,gcode-mirror/strace-plus,Yu-AndroidM/android_external_strace,jamel/strace-plus,kapdop/android_external_strace,gcode-mirror/strace-plus,gcode-mirror/strace-plus,Andrey9kin/revisor,Distrotech/strace,timmattison/strace-arm,geofft/strace,cuviper/strace,MonkeyZZZZ/platform_external_strace,MonkeyZZZZ/platform_external_strace,Saruta/strace,pgbovine/strace-plus,android-ia/platform_external_strace,lizh06/strace-plus,Saruta/strace,bnoordhuis/strace,xin3liang/platform_external_strace,timmattison/strace-arm,pgbovine/strace-plus,cuviper/strace,kapdop/android_external_strace,TeamExodus/external_strace,bigzz/strace_android,pombredanne/strace,pombredanne/strace,lkundrak/strace,bigzz/strace_android,geekboxzone/lollipop_external_strace,geofft/strace,geekboxzone/mmallow_external_strace,Infinitive-OS/platform_external_strace,Andrey9kin/revisor,CyanogenMod/android_external_strace,kapdop/android_external_strace,vrastogi/strace,DirtyUnicorns/android_external_strace,pombredanne/strace,Distrotech/strace,Distrotech/strace,TeamExodus/external_strace,Yu-AndroidM/android_external_strace