module-profiler: ignore peer targets

Only log the targets of the node, ignoring the peers of the driver or
else we will log some nodes twice.

Fixes #3278
This commit is contained in:
Wim Taymans 2023-06-09 17:06:48 +02:00
parent f0e8b95d76
commit 4e070c90aa
3 changed files with 5 additions and 1 deletions

View file

@ -221,7 +221,7 @@ static void context_do_profile(void *data, struct pw_impl_node *node)
struct pw_node_activation *na;
struct spa_fraction latency;
if (t->id == id)
if (t->id == id || t->flags & PW_NODE_TARGET_PEER)
continue;
if (n != NULL) {

View file

@ -71,6 +71,7 @@ static struct pw_node_peer *pw_node_peer_ref(struct pw_impl_node *onode, struct
peer->output = onode;
peer->active_count = 0;
copy_target(&peer->target, &inode->rt.target);
peer->target.flags = PW_NODE_TARGET_PEER;
spa_list_append(&onode->peer_list, &peer->link);
pw_log_debug("new peer %p from %p to %p", peer, onode, inode);

View file

@ -591,6 +591,9 @@ static inline void pw_node_activation_state_reset(struct pw_node_activation_stat
struct pw_node_target {
struct spa_list link;
#define PW_NODE_TARGET_NONE 0
#define PW_NODE_TARGET_PEER 1
uint32_t flags;
uint32_t id;
char name[128];
struct pw_impl_node *node;