Skip to content

Commit

Permalink
sleep tracer
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Feb 12, 2024
1 parent 0ab3e07 commit 1e15cf4
Show file tree
Hide file tree
Showing 10 changed files with 97,596 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,17 @@ static bool load_shader_source_for_condition(const c2_lptr_t *cond, void *data)
return load_shader_source(data, c2_list_get_data(cond));
}

#ifndef NDEBUG
#define probe __attribute__((noinline)) void
probe xcb_connection_probe(xcb_connection_t *conn) {
__asm__ volatile("" : : "r"(conn));
}
#undef probe
#else
static inline void xcb_connection_probe(xcb_connection_t *conn attr_unused) {
}
#endif

/**
* Initialize a session.
*
Expand Down Expand Up @@ -2088,6 +2099,7 @@ static session_t *session_init(int argc, char **argv, Display *dpy,

// Use the same Display across reset, primarily for resource leak checking
x_connection_init(&ps->c, dpy);
xcb_connection_probe(ps->c.c);
// We store width/height from screen_info instead using them directly because they
// can change, see configure_root().
ps->root_width = ps->c.screen_info->width_in_pixels;
Expand Down
1 change: 1 addition & 0 deletions tracer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading

0 comments on commit 1e15cf4

Please sign in to comment.