mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 14:00:03 +01:00
xace: ricer tuning for XaceHook
gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the
varargs code for some reason, so do it ourselves.
Before:
40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square
After:
40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 11977fab54)
This commit is contained in:
parent
a3b6ecc893
commit
9eaa0b5c89
1 changed files with 4 additions and 0 deletions
|
|
@ -101,6 +101,10 @@ int XaceHook(int hook, ...)
|
||||||
} u;
|
} u;
|
||||||
int *prv = NULL; /* points to return value from callback */
|
int *prv = NULL; /* points to return value from callback */
|
||||||
va_list ap; /* argument list */
|
va_list ap; /* argument list */
|
||||||
|
|
||||||
|
if (!XaceHooks[hook])
|
||||||
|
return Success;
|
||||||
|
|
||||||
va_start(ap, hook);
|
va_start(ap, hook);
|
||||||
|
|
||||||
/* Marshal arguments for passing to callback.
|
/* Marshal arguments for passing to callback.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue