[erlang-patches] Fix spec for cpu_sup:util/1

Andrew Caruth <>
Wed Dec 4 15:38:13 CET 2013

Hi OTP devs,

I recently noticed dialyzer was flagging an issue in one of our own modules that was making a call to cpu_sup:util([detailed]). An 'is_list()' guard test was performed on the second element of the tuple returned which dialyzer was reporting as a test that could never succeed. Sample output from a call to cpu_sup:util([detailed]):


The spec implied {'all' | integer | list, tuple | float, tuple | float, []}, which excludes the above output, so I've updated the spec to allow the second and third elements as lists.

Also, the atoms 'soft_irq', 'hard_irq', and 'steal' were also not part of the spec, so I've also added those.

git fetch git://github.com/acaruth/otp.git cpu_sup_spec_fix

Andrew Caruth

More information about the erlang-patches mailing list