perf: make sure we emit finished after last process exits

This fixes the "auto-stop" feature when the child exits, at least in the
case of /usr/bin/gnome-calculator. However, when testing with gedit I
did not see it accurately clean up, so something still needs to be
troubleshooted.
This commit is contained in:
Christian Hergert
2016-04-18 22:31:39 -07:00
parent a85bd6e41f
commit b97425b300

View File

@ -214,7 +214,7 @@ sp_perf_source_handle_event (SpPerfCounterEvent *event,
{
g_hash_table_remove (self->pids, GINT_TO_POINTER (event->exit.pid));
if (self->running && (g_hash_table_size (self->pids) > 0))
if (self->running && (g_hash_table_size (self->pids) == 0))
{
self->running = FALSE;
sp_perf_counter_disable (self->counter);