library: provided for cpu p-core/e-core identification

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>
This commit is contained in:
Jim Warner
2022-09-28 00:00:00 -05:00
committed by Craig Small
parent 3e5016c289
commit 6e51196589
2 changed files with 188 additions and 3 deletions

View File

@ -32,8 +32,10 @@ enum stat_item {
// returns origin, see proc(5)
// ------- -------------------
STAT_TIC_ID, // s_int /proc/stat, cpu or numa node id
STAT_TIC_ID_CORE, // s_int /proc/cpuinfo: 'core id', -1 = n/a
STAT_TIC_NUMA_NODE, // s_int [ CPU ID based, see: numa(3) ]
STAT_TIC_NUM_CONTRIBUTORS, // s_int [ total CPUs contributing to TIC counts ]
STAT_TIC_TYPE_CORE, // s_int [ 2 = P-core, 1 = E-core, 0 = n/a ]
STAT_TIC_USER, // ull_int /proc/stat
STAT_TIC_NICE, // ull_int "