flightrecorder: Don't subscribe by default to the drm-backend

As the flight recorder subscribed by default to the drm-backend will
implicily arm the KMS page flip counter. Just use the "log", log scope.

To make this more obvious, with this change we also print the
subscriptions, when we detect that the flight recorder is enabled.

Users can use the provided cmd line args (-f/--flight-rec-scopes) to
adjust those.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2025-02-28 10:57:33 +02:00
parent 5beca735b0
commit c706e1f8c8

View file

@ -74,7 +74,7 @@
#define WINDOW_TITLE "Weston Compositor" #define WINDOW_TITLE "Weston Compositor"
/* flight recorder size (in bytes) */ /* flight recorder size (in bytes) */
#define DEFAULT_FLIGHT_REC_SIZE (5 * 1024 * 1024) #define DEFAULT_FLIGHT_REC_SIZE (5 * 1024 * 1024)
#define DEFAULT_FLIGHT_REC_SCOPES "log,drm-backend" #define DEFAULT_FLIGHT_REC_SCOPES "log"
struct wet_output_config { struct wet_output_config {
int width; int width;
@ -4586,7 +4586,11 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data)
free(cmdline); free(cmdline);
log_uname(); log_uname();
weston_log("Flight recorder: %s\n", flight_rec ? "enabled" : "disabled"); weston_log("Flight recorder: %s", flight_rec ? "enabled" : "disabled");
if (flight_rec)
weston_log_continue(", scopes subscribed: %s", flight_rec_scopes);
weston_log_continue("\n");
verify_xdg_runtime_dir(); verify_xdg_runtime_dir();
display = wl_display_create(); display = wl_display_create();