[perf] Introduce ftrace marker
Needs ReviewPublic

Authored by romangg on Mon, Aug 12, 3:08 PM.

Details

Reviewers
None
Group Reviewers
KWin
Summary

Adds a class for ftrace marking program flow of KWin. This used in conjunction
with a tool like GPUvis can be very powerful.

I use it at the moment for analyzing the compositing behavior of KWin on X11.
For this I also apply a patch to the XServer adding the same capability[1].

Besides the class also some marking points have been added. Ftracing can be,
if it has been built into the binary, activated via D-Bus or per env var
KWIN_PERF_FTRACE directly from the start.

[1] https://gitlab.freedesktop.org/xorg/xserver/merge_requests/209


Example ftrace in GPUvis

Diff Detail

Repository
R108 KWin
Branch
ftraceMarker
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15025
Build 15043: arc lint + arc unit
romangg created this revision.Mon, Aug 12, 3:08 PM
Restricted Application added a project: KWin. · View Herald TranscriptMon, Aug 12, 3:08 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Mon, Aug 12, 3:08 PM
romangg edited the summary of this revision. (Show Details)Mon, Aug 12, 3:12 PM
romangg edited the summary of this revision. (Show Details)Mon, Aug 12, 3:17 PM
zzag added a subscriber: zzag.Mon, Aug 12, 8:44 PM

I think you could just add FtraceMarker class to KWin core and use it directly.

CMakeLists.txt
302

Not sure whether it has to be on by default. This is kind of development thing.

composite.cpp
28

Wrap it in #ifdef KWIN_BUILD_PERF

apol added a subscriber: apol.Wed, Aug 14, 10:42 PM

It would be really cool to have a blog post on how to use this once it's in. 👍

CMakeLists.txt
302

If disabled is not a big penalty. I'd say it's good that it's on, in case you need to test an already existing binary.

dbusinterface.cpp
203

Add a warning?