if (!curr)
return -ENOMEM;
- ret = kernel_get_thread_group_taskstats(curr, pid, true);
+ ret = kernel_get_thread_group_taskstats(curr, pid, false);
if (ret < 0) {
free(curr);
g_hash_table_iter_remove(&iter);
}
if (!prev) {
- node->stats = node->prev = curr;
+ node->prev = curr;
continue;
}
/ (curr->ac_etime - prev->ac_etime);
free(prev);
node->prev = curr;
- node->stats = curr;
}
return 0;
}
g_hash_table_iter_init(&iter, ctx->pi_map);
- while (g_hash_table_iter_next(&iter, &key, &value)) {
- pnode = (struct process_info_node *)value;
- if (!g_hash_table_contains(process_hash, key)) {
- pnode = (struct process_info_node *)value;
-
+ while (g_hash_table_iter_next(&iter, &key, &value))
+ if (!g_hash_table_contains(process_hash, key))
g_hash_table_iter_remove(&iter);
- }
- }
if (ctx->pid < 0) {
/* just add all processes into array if parent pid is negative */