Skip to content

Commit 4133be3

Browse files
zhang-ruilenb
authored andcommitted
tools/power turbostat: Exit on unsupported Intel models
Turbostat requires per-platform enabling for Intel CPU models due to platform-specific features. When running on unsupported Intel CPU models, turbostat currently operates with limited default features, which can lead to users unknowingly using an outdated version of the tool. Enhance turbostat to exit by default when run on unsupported Intel CPU models, with a clear message to users, informing them that their CPU model is not supported and advising them to update to the latest version of turbostat for full functionality. [lenb: updated error message wording] Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent 9e47f8a commit 4133be3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,10 @@ void probe_platform_features(unsigned int family, unsigned int model)
10791079
return;
10801080
}
10811081
}
1082+
1083+
fprintf(stderr, "Unsupported platform detected.\n"
1084+
"\tSee RUN THE LATEST VERSION on turbostat(8)\n");
1085+
exit(1);
10821086
}
10831087

10841088
/* Model specific support End */

0 commit comments

Comments
 (0)