Discussion:
[Xcb] OpenGL applications spends 20% of CPU-cycles in discard_reply
Clemens Eisserer
2016-08-02 04:25:08 UTC
Permalink
Hi,

I am currently working on an OpenGL based application which streams
video content asynchronously to the GPU.
For simplicity I am using freeglut3 as "toolkit".

When running the application I get quite a strange profile, a serious
amount of time is spent in the function "discard_reply" contained in
libxcb:

samples % image name app name symbol name
3665 17.5401 libxcb.so.1.1.0 streamapp
discard_reply

Unfourtunately even with callgraph profiling I don't get any helpful
information:

-------------------------------------------------------------------------------
3670 100.000 libxcb.so.1.1.0 testprog
xcb_discard_reply
3665 17.5401 libxcb.so.1.1.0 testprog
discard_reply
3665 99.8638 libxcb.so.1.1.0 testprog
discard_reply [self]

Ideas how to track this issue down, would be very welcome.

Thank you in advance, Clemens
Clemens Eisserer
2016-08-02 12:13:15 UTC
Permalink
Hi again,

Sorry my fault - I didn't notice the window manager used for the tests
was performing composition - which explains all the unnecessary
context switches as well as the IPC overhead I observed.
With another WM everything performs now as expected.

Best regards, Clemens

Loading...