mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
tools: print async node state in pw-top
Pass the node async state in the profiler and use this in pw-top to draw the node with = instead of a + in the tree when it's async.
This commit is contained in:
parent
09cd7bf783
commit
f89428d9f8
4 changed files with 11 additions and 7 deletions
|
|
@ -298,7 +298,8 @@ static void context_do_profile(void *data)
|
|||
SPA_POD_Long(n->async ? na->prev_finish_time : na->finish_time),
|
||||
SPA_POD_Int(na->status),
|
||||
SPA_POD_Fraction(&latency),
|
||||
SPA_POD_Int(na->xrun_count));
|
||||
SPA_POD_Int(na->xrun_count),
|
||||
SPA_POD_Bool(n->async));
|
||||
|
||||
if (n->driver) {
|
||||
spa_pod_builder_prop(&b, SPA_PROFILER_followerClock, 0);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ struct measurement {
|
|||
int64_t finish;
|
||||
struct spa_fraction latency;
|
||||
uint32_t xrun_count;
|
||||
bool async;
|
||||
};
|
||||
|
||||
struct node {
|
||||
|
|
@ -419,7 +420,8 @@ static int process_follower_block(struct data *d, const struct spa_pod *pod, str
|
|||
SPA_POD_Long(&m.finish),
|
||||
SPA_POD_Int(&m.status),
|
||||
SPA_POD_Fraction(&m.latency),
|
||||
SPA_POD_OPT_Int(&m.xrun_count))) < 0)
|
||||
SPA_POD_OPT_Int(&m.xrun_count),
|
||||
SPA_POD_OPT_Bool(&m.async))) < 0)
|
||||
return res;
|
||||
|
||||
if ((n = find_node(d, id)) == NULL)
|
||||
|
|
@ -540,7 +542,7 @@ static void print_node(struct data *d, struct node *dr, struct node *n, int y)
|
|||
i->xrun_count - dr->info_base :
|
||||
n->measurement.xrun_count - n->measurement_base,
|
||||
active ? n->format : "",
|
||||
n->driver == n ? "" : " + ",
|
||||
n->driver == n ? "" : n->measurement.async ? " = " : " + ",
|
||||
n->name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue