Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpe-2.38] Add ftrace based system tracing #1462

Open
wants to merge 1 commit into
base: wpe-2.38
Choose a base branch
from

Conversation

asurdej-comcast
Copy link

@asurdej-comcast asurdej-comcast commented Feb 14, 2025

[wpe-2.38] Add ftrace based system tracing

Add WebKit tracing with linux 'ftrace' that can be used on STB devices.
Write tracing points into 'trace_marker' file with 'perfetto'
compatible format.
The results can be collected and visualized by 'perfetto'

Quite similar to what is available in 2.46 with sysprof but ftrace can be used directly on the device (ftrace needs to be enabled in kernel). This is initial version to discuss, probably needs to be extended with more tracing points/scopes to mark painting, compositing, etc

fe50f1a

Build-Tests Layout-Tests
✅ 🛠 wpe-238-amd64-build ✅ 🧪 wpe-238-amd64-layout
✅ 🛠 wpe-238-arm32-build ✅ 🧪 wpe-238-arm32-layout

Add WebKit tracing with linux 'ftrace' that can be used on STB devices.
Write tracing points into 'trace_marker' file with 'perfetto'
compatible format.
The results can be collected and visualized by 'perfetto'
@asurdej-comcast
Copy link
Author

Simple preview of what can we see with perfetto. There are not many tracing points in 2.38 currently but probably we can add more later. There will be more for sure with 2.46

Screenshot From 2025-02-17 16-43-48

@asurdej-comcast asurdej-comcast marked this pull request as ready for review February 17, 2025 15:45
@pgorszkowski-igalia
Copy link

@asurdej-comcast : may I ask why you want to have ftrace instead of backporting the change with sysprof?

@asurdej-comcast
Copy link
Author

@pgorszkowski-igalia We've been playing with ftrace for some time and it is supported on our devices. Also perfetto can use ftrace as data source so we can track webkit with CPU scheduling, etc at once

Regarding sysprof, I just had a quick look and my impresion was it is intended to be used in gtk/pc environment, but I can be wrong heare. Is there any simple way to run it directly on STB device? If so then we can definitely try it

@pgorszkowski-igalia
Copy link

@asurdej-comcast : in theory it should be possible to use sysprof(actually muprof: https://gitlab.gnome.org/feaneron/muprof/) on any linux device, we have never tested it with RPi or other devices. Currently it is available on 2.46 so I will try to run wpe-2.46 with muprof on RPi and if it works I will let you know.
Some documentation about integration WebKit with sysprof you can read: WebKit/WebKit#29681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants