]> granicus.if.org Git - strace/commitdiff
Use tcp->qual_flg instead of qual_flags[] in verbose() and abbrev()
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 22 Feb 2013 12:23:38 +0000 (13:23 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 22 Feb 2013 12:23:38 +0000 (13:23 +0100)
We have hundreds of uses of these macros.
Result is more efficient and 1.1 kbyte shorter code:

  text    data     bss     dec     hex filename
245579     700   12928  259207   3f487 strace.t5/strace
244471     700   12928  258099   3f033 strace.t6/strace

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
defs.h

diff --git a/defs.h b/defs.h
index 35620792010cc377a919bf443a22814fc18cbd71..39d8b90ed69ab0a2dcc14cf040140561683dd51d 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -476,8 +476,8 @@ typedef uint8_t qualbits_t;
 #define entering(tcp)  (!((tcp)->flags & TCB_INSYSCALL))
 #define exiting(tcp)   ((tcp)->flags & TCB_INSYSCALL)
 #define syserror(tcp)  ((tcp)->u_error != 0)
-#define verbose(tcp)   (qual_flags[(tcp)->scno] & QUAL_VERBOSE)
-#define abbrev(tcp)    (qual_flags[(tcp)->scno] & QUAL_ABBREV)
+#define verbose(tcp)   ((tcp)->qual_flg & QUAL_VERBOSE)
+#define abbrev(tcp)    ((tcp)->qual_flg & QUAL_ABBREV)
 #define filtered(tcp)  ((tcp)->flags & TCB_FILTERED)
 
 struct xlat {