projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c686b0
)
Turbostat: Initialize non existing threads cpu_id
author
Vincent Brillault
<git@lerya.net>
Sat, 18 Apr 2015 08:49:46 +0000
(10:49 +0200)
committer
Vincent Brillault
<git@lerya.net>
Sat, 18 Apr 2015 09:06:22 +0000
(11:06 +0200)
src/turbostat.c
patch
|
blob
|
history
diff --git
a/src/turbostat.c
b/src/turbostat.c
index
9373b61
..
629d792
100644
(file)
--- a/
src/turbostat.c
+++ b/
src/turbostat.c
@@
-1258,6
+1258,9
@@
allocate_counters(struct thread_data **threads, struct core_data **cores, struct
if (*threads == NULL)
goto err;
+ for (i = 0; i < total_threads; ++i)
+ (*threads)[i].cpu_id = topology.max_cpu_id + 1;
+
total_cores = topology.num_cores * topology.num_packages;
*cores = calloc(total_cores, sizeof(struct core_data));
if (*cores == NULL)