memcpy(newcpu, tmpcpu, sizeof(struct cputime));
newcpu->perf = g_hash_table_new(g_direct_hash, g_direct_equal);
g_hash_table_foreach(tmpcpu->perf, copy_perf_counter, newcpu->perf);
memcpy(newcpu, tmpcpu, sizeof(struct cputime));
newcpu->perf = g_hash_table_new(g_direct_hash, g_direct_equal);
g_hash_table_foreach(tmpcpu->perf, copy_perf_counter, newcpu->perf);