Re: Fwd: [Xpert]New extension for keeping track of client resources



Mark Vojkovich <mvojkovich nvidia com> writes: 
>   For each client you get passed a mask and a base such that if
> 
>     XID & ~mask == base
>

Sounds good.
 
>    I'm not sure a pixmap querying function is appropriate for
> this extension.  A "total" pixmap area per client might be useful 
> for assigning blame, however.  In order to be useful it would
> probably need to be in bytes rather than pixels.  That number
> is easy to attain in the SI and XFree86, but some of these end
> up in video ram and aren't actually taking up any system ram. 

I don't think video vs. system matters much, if the goal is to "assign
blame", since clients in video RAM are still responsible for pushing
other clients into system RAM, right. There's effectively a single
memory pool though not all parts of the pool are equal.

>    I'm not sure how to equate PIDs with X-server connections (clients).
> I don't think the X-server knows this.  Maybe an OS specific client
> could do this though.

We have Qt and GTK setting a _NET_WM_PID property on toplevels, so for
many clients we can get the PID that owns the window. This is used by
gnome-system-monitor to display the application icon for each process,
for example. (gnome-system-monitor is a "top" kind of thing.)

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]