diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-15 00:06:36 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-19 20:39:32 +0300 |
commit | 9d9f7c62ef2ff2cfca4ace911ea200346642c2a6 (patch) | |
tree | a4639ceb58101eeb7c366949a3168a94cb1c7981 | |
parent | a2568b2b73c32841dcf46b0b7d1753a80c5ca6a9 (diff) |
HACK-but-turning-less-crap-than-before: dix: fix logging orderclient-logging
if we are not interested on the time spent for each protocol call, then we can
fix the ordering issue.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | dix/dispatch.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index 46d07cc29..9d165aafb 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -393,10 +393,8 @@ Dispatch(void) { if (*icheck[0] != *icheck[1]) { - a = GetTimeInMicros(); + fprintf(fd, "[%10.4f] %-35s:%s\n", GetTimeInMicros()/1000000.0, "INPUTPROCESSING", ""); ProcessInputEvents(); - b = GetTimeInMicros(); - fprintf(fd, "[%10.4f] %-35s:%6d:%s\n", b/1000000.0, "INPUTPROCESSING", b - a, ""); FlushIfCriticalOutputPending(); } @@ -432,10 +430,8 @@ Dispatch(void) while (!isItTimeToYield) { if (*icheck[0] != *icheck[1]) { - a = GetTimeInMicros(); + fprintf(fd, "[%10.4f] %-35s:%s\n", GetTimeInMicros()/1000000.0, "INPUTPROCESSING", ""); ProcessInputEvents(); - b = GetTimeInMicros(); - fprintf(fd, "[%10.4f] %-35s:%6d:%s\n", b/1000000.0, "INPUTPROCESSING", b - a, ""); } FlushIfCriticalOutputPending(); @@ -463,8 +459,10 @@ Dispatch(void) ((xReq *)client->requestBuffer)->length, client->index, client->requestBuffer); #endif - a = GetTimeInMicros(); + fprintf(fd, "[%10.4f] %-35s:%s (%d)\n", GetTimeInMicros()/1000000.0, + LookupRequestName(MAJOROP, MinorOpcodeOfRequest(client)), + GetClientCmdName(client) ? GetClientCmdName(client) : "", GetClientPid(client)); if (result > (maxBigRequestSize << 2)) result = BadLength; else { @@ -474,10 +472,6 @@ Dispatch(void) XaceHookAuditEnd(client, result); } - b = GetTimeInMicros(); - fprintf(fd, "[%10.4f] %-35s:%6d:%s (%d)\n", a/1000000.0, - LookupRequestName(MAJOROP, MinorOpcodeOfRequest(client)), - b - a, GetClientCmdName(client) ? GetClientCmdName(client) : "", GetClientPid(client)); #ifdef XSERVER_DTRACE XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP, client->sequence, client->index, result); |