diff options
Diffstat (limited to 'dix/dispatch.c')
-rw-r--r-- | dix/dispatch.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index 17f308cf5..5f2fad1b2 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -348,6 +348,9 @@ Dispatch(void) HWEventQueuePtr* icheck = checkForInput; long start_tick; + FILE *fd; + fd = fopen("xserver-requests.txt","a+"); + nextFreeClientID = 1; nClients = 0; @@ -360,7 +363,11 @@ Dispatch(void) { if (*icheck[0] != *icheck[1]) { + int a, b; + a = GetTimeInMillis(); ProcessInputEvents(); + b = GetTimeInMillis(); + fprintf(fd, "INPUTPROCESSING:::%d\n", b - a); FlushIfCriticalOutputPending(); } @@ -396,8 +403,13 @@ Dispatch(void) while (!isItTimeToYield) { if (*icheck[0] != *icheck[1]) - ProcessInputEvents(); - + { + int a, b; + a = GetTimeInMillis(); + ProcessInputEvents(); + b = GetTimeInMillis(); + fprintf(fd, "INPUTPROCESSING:::%d\n", b - a); + } FlushIfCriticalOutputPending(); if (!SmartScheduleDisable && (SmartScheduleTime - start_tick) >= SmartScheduleSlice) @@ -423,6 +435,9 @@ Dispatch(void) ((xReq *)client->requestBuffer)->length, client->index, client->requestBuffer); #endif + int a, b; + a = GetTimeInMillis(); + if (result > (maxBigRequestSize << 2)) result = BadLength; else { @@ -431,6 +446,11 @@ Dispatch(void) result = (* client->requestVector[MAJOROP])(client); XaceHookAuditEnd(client, result); } + + b = GetTimeInMillis(); + fprintf(fd, "%s:%d:%d\n", + LookupRequestName(MAJOROP, MinorOpcodeOfRequest(client)), + MAJOROP, b - a); #ifdef XSERVER_DTRACE XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP, client->sequence, client->index, result); @@ -456,6 +476,7 @@ Dispatch(void) } dispatchException &= ~DE_PRIORITYCHANGE; } + fclose(fd); #if defined(DDXBEFORERESET) ddxBeforeReset (); #endif |