perf metrics: Fix SEGV with --for-each-cgroup

Ensure the metric threshold is copied correctly or else a use of
uninitialized memory happens.

Fixes: d0a3052f6faefffc ("perf metric: Compute and print threshold values")
Reported-by: Namhyung Kim <>
Signed-off-by: Ian Rogers <>
Tested-by: Namhyung Kim <>
Cc: Adrian Hunter <>
Cc: Alexander Shishkin <>
Cc: Ingo Molnar <>
Cc: Jiri Olsa <>
Cc: Kajol Jain <>
Cc: Mark Rutland <>
Cc: Peter Zijlstra <>
Signed-off-by: Arnaldo Carvalho de Melo <>
1 file changed