xorg tracing requests

Nicola Manica nicola.manica at gmail.com
Mon May 28 05:49:32 PDT 2007


Hi, I'm a student on Computer Science, and I need an help. For my
experiments I need to trace the requests which arrive to the X server. I
need to know where is the right point when the server schedule the requests.

After the study of the 7.2 version code I try to put my function in that
point:
1. create a client:
I put it in xorg-server/os/connection.c:
static ClientPtr AllocNewConnection (XtransConnInfo trans_conn, int fd,
CARD32 conn_time){
...
trc_creation(client->index,GetTimeInMillis());
return client;
}

2 .activation of a task(client):
xorg-server/os/WaitFor.c:
int
WaitForSomething(int *pClientsReady){
...
while (clientsReadable.fds_bits [i])
        {
            int client_priority, client_index;

        curclient = ffs (clientsReadable.fds_bits[i]) - 1;
        client_index = /* raphael: modified */
            ConnectionTranslation[curclient + (i * (sizeof(fd_mask) * 8))];
            trc_begin(client_index,GetTimeInMillis());
            ....
}


3. schedule and deschedule the request of a client
xorg-server/dix/dispatch.c:
I think that this two call are in the correct place..

4. deactivation of the task(client)
xorg-server/dix/dispatch.c:
I put it before the break statement on the loop in the dispatch function:
void Dispatch(void)
{
while (!isItTimeToYield){
...
if (result <= 0)
            {
            trc_end(client->index,GetTimeInMillis());
            if (result < 0)
            CloseDownClient(client);
            break;
            }
...
}

Is it the correct way to trace the requests?
Thanks a lot
Nicola M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070528/9f2c34d7/attachment.html>


More information about the xorg mailing list