In the issue referenced below, it is now apparent that
not all architectures follow a logical/expected format
for the /proc/cpuinfo file. Specifically, the expected
empty line after each processor entry might be missing
under some architectures for the last processor shown.
[ and a belated review of kernel source confirms it. ]
So this commit makes our stat module a little bit more
tolerant of some potential missing newline characters.
[ along the way, it's also now tolerant of a missing ]
[ cpuinfo file plus more efficient whenever a cpu is ]
[ is not linked to a core or toggled offline/online. ]
Reference(s):
https://gitlab.com/procps-ng/procps/-/issues/272procps-ng/procps#272
Signed-off-by: Jim Warner <james.warner@comcast.net>
The copyrights of the source files were all out of date and were not
the same format. This has been corrected. The source of the authors
was examining the git log for each file.
Signed-off-by: Craig Small <csmall@dropbear.xyz>
Wow, after this we'll eliminate one 'jmp' instruction!
[ plus we can also save a single precious whitespace ]
Signed-off-by: Jim Warner <james.warner@comcast.net>
With Intel's 12th generation Alder Lake processors now
providing two distinct types of core, it would be nice
if the library offered some sort of clue to core type.
Well, with this patch it does. We'll have 2 additional
enumerators. One deals with the cpu's core association
and the other provides the type of that core (P or E).
[ now, all we need is for some program to exploit it ]
Signed-off-by: Jim Warner <james.warner@comcast.net>