Hi,
I run powertop [1] version 1dfdb80d6333960ed310fff7b60439f79d154a84
together with Valgrind. I get this message (among others):
==2739== Conditional jump or move depends on uninitialised value(s)
==2739== at 0x80689BB: perf_process_bundle::handle_trace_point(void*, int,
unsigned long long) (do_process.cpp:552)
==2739== by 0x806391A: perf_bundle::process() (perf_bundle.cpp:303)
==2739== by 0x8069A53: process_process_data() (do_process.cpp:1101)
==2739== by 0x804FA4E: one_measurement(int) (main.cpp:174)
==2739== by 0x8050399: main (main.cpp:390)
I checked the function perf_process_bundle::handle_trace_point() and it really
looks like that the val variable is used uninitialized when event->name is
"cpu_idle":
void perf_process_bundle::handle_trace_point(void *trace, int cpu, uint64_t
time)
{
// ...
unsigned long long val;
// ...
else if (strcmp(event->name, "cpu_idle") == 0) {
if (val == 4294967295) // ---> equals 0xFFFF_FFFF
consume_blame(cpu);
else
set_wakeup_pending(cpu);
}
// ...
}
I have even found the commit introduced this fragment (using "git blame")
but I'm not sure from where the value of the "val" variable should come from.
commit ed91c3e55760cd5d906821d87377a087f9681016
Author: John Mathew <[email protected]>
Date: Wed Apr 18 16:50:32 2012 -0700
From kernel version 2.6.41 the power_start, power_end
and power_frequency power traces will be replaced with
cpu_idle and cpu_frequency power traces. Refer kernel
documentation events-power.txt for details. This patch
enables the use of new power traces and will fall back
to old traces if new traces are not avaialable
Patch rebased by hand to HEAD
References:
[1] powertop git repo
git://github.com/fenrus75/powertop.git
[2] Valgrind
http://valgrind.org/
Regards,
Márton Németh
_______________________________________________
Power mailing list
[email protected]
https://bughost.org/mailman/listinfo/power