xserver: Branch 'server-1.11-branch' - 4 commits
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Wed Jan 18 10:40:50 PST 2012
Xext/xace.c | 4 ++++
dix/dispatch.c | 14 +++++++++-----
dix/dixutils.c | 7 +++----
hw/xfree86/common/xf86Xinput.c | 11 ++++++-----
4 files changed, 22 insertions(+), 14 deletions(-)
New commits:
commit 5b28bcb340e279e7f4e76617e86b439092367690
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 13 21:23:12 2011 -0500
dix: Tune dixLookupDrawable for success
The vast vast vast majority of resource lookups are successful. Move some
work to the error paths so we don't punish success.
Before:
40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square
After:
40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
(cherry picked from commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51)
diff --git a/dix/dixutils.c b/dix/dixutils.c
index 1e31346..cfb0397 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -202,13 +202,12 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client,
int rc;
*pDraw = NULL;
- client->errorValue = id;
-
- if (id == INVALID)
- return BadDrawable;
rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access);
+ if (rc != Success)
+ client->errorValue = id;
+
if (rc == BadValue)
return BadDrawable;
if (rc != Success)
commit e1ea93fec93b13d18df4451210aaaf322b769b6a
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 13 20:23:40 2011 -0500
dix: Tune dtrace hooks around Dispatch
Don't call LookupMajorName if the hooks aren't active, it's quite expensive.
Before:
40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square
After:
40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square
60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
(cherry picked from commit 83a98543b58c661a22574a6f8d8f9d777c0955b8)
diff --git a/dix/dispatch.c b/dix/dispatch.c
index a13274c..316384a 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -425,9 +425,11 @@ Dispatch(void)
client->minorOp = ext->MinorOpcode(client);
}
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp,
- ((xReq *)client->requestBuffer)->length,
- client->index, client->requestBuffer);
+ if (XSERVER_REQUEST_START_ENABLED())
+ XSERVER_REQUEST_START(LookupMajorName(client->majorOp),
+ client->majorOp,
+ ((xReq *)client->requestBuffer)->length,
+ client->index, client->requestBuffer);
#endif
if (result > (maxBigRequestSize << 2))
result = BadLength;
@@ -438,8 +440,10 @@ Dispatch(void)
XaceHookAuditEnd(client, result);
}
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp,
- client->sequence, client->index, result);
+ if (XSERVER_REQUEST_DONE_ENABLED())
+ XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp),
+ client->majorOp, client->sequence,
+ client->index, result);
#endif
if (client->noClientException != Success)
commit 9eaa0b5c89f645c50ea90e07e8b49ebacf4349a0
Author: Adam Jackson <ajax at redhat.com>
Date: Tue Dec 13 21:00:05 2011 -0500
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 at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
(cherry picked from commit 11977fab546da35d579ebe285e3c26864007805e)
diff --git a/Xext/xace.c b/Xext/xace.c
index c757cad..ef69fe3 100644
--- a/Xext/xace.c
+++ b/Xext/xace.c
@@ -101,6 +101,10 @@ int XaceHook(int hook, ...)
} u;
int *prv = NULL; /* points to return value from callback */
va_list ap; /* argument list */
+
+ if (!XaceHooks[hook])
+ return Success;
+
va_start(ap, hook);
/* Marshal arguments for passing to callback.
commit a3b6ecc893e17028cfbe16d8d7981c9037fc0766
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Jan 3 10:45:45 2012 +1000
xfree86: split warning about missing identifier or input driver
Check for identifier first and bail if it's missing (also remove the current
identifier check after we've already bailed due to missing identifiers)
If a driver is missing, warn but also say that we may have added this device
already. I see too many bugreports with incorrectly shortened log files.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Cyril Brulebois <kibi at debian.org>
(cherry picked from commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae)
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index d22fdc8..6625545 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -939,15 +939,16 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs,
pInfo->attrs = DuplicateInputAttributes(attrs);
}
- if (!pInfo->driver || !pInfo->name) {
- xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n");
+ if (!pInfo->name) {
+ xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n");
rval = BadRequest;
goto unwind;
}
- if (!pInfo->name) {
- xf86Msg(X_ERROR, "No device identifier specified (ignoring)\n");
- rval = BadMatch;
+ if (!pInfo->driver) {
+ xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n");
+ xf86Msg(X_INFO, "This device may have been added with another device file.\n");
+ rval = BadRequest;
goto unwind;
}
More information about the xorg-commit
mailing list