DRI2InvalidateWalk high in "perf top" profile

Loïc Yhuel loic.yhuel at gmail.com
Mon Feb 16 12:30:43 PST 2015


Please forgive me if my analysis is wrong for the current code, since
I'm running Fedora 21, so xorg 1.16.3, but it doesn't seem to to have
changed much.

I was surprised to see DRI2InvalidateWalk high in "perf top" profile,
both with an idle system, and when running some graphics tests, so I
looked at callstacks with gdb : sna_present_vblank_handler calls
present_execute, which calls present_set_tree_pixmap(screen->root,
For each affected window, DRI2SetWindowPixmap is called, and it calls
DRI2InvalidateDrawableAll, which goes up back to the root and
invalidates all windows which already have the new pixmap.
So if I'm right, the invalidation added by
18744907d0766b1b57be12df5adafd0f93221006 "dri2: Invalidate DRI2Buffers
upon SetWindowPixmap updates" is done in quadratic time.

More information about the xorg-devel mailing list