Commit 866d2d36 authored by Len Brown's avatar Len Brown
Browse files

tools/power turbostat: version 2024.07.26



Release 2024.07.26:

Enable turbostat extensions to add both perf and PMT
(Intel Platform Monitoring Technology) counters from the cmdline.

Demonstrate PMT access with built-in support for Meteor Lake's Die%c6 counter.

This commit:

Clean up white-space nits introduced since version 2024.05.10

Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 19d07690
Loading
Loading
Loading
Loading
+52 −53
Original line number Diff line number Diff line
@@ -1057,8 +1057,7 @@ void probe_platform_features(unsigned int family, unsigned int model)
		return;

	for (i = 0; turbostat_pdata[i].features; i++) {
		if (VFM_FAMILY(turbostat_pdata[i].vfm) == family &&
		    VFM_MODEL(turbostat_pdata[i].vfm) == model) {
		if (VFM_FAMILY(turbostat_pdata[i].vfm) == family && VFM_MODEL(turbostat_pdata[i].vfm) == model) {
			platform = turbostat_pdata[i].features;
			return;
		}
@@ -2969,7 +2968,8 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
		outp += sprintf(outp, "%s%.2f", (printed++ ? delim : ""), 100.0 * p->pc10 / tsc);

	if (DO_BIC(BIC_Diec6))
		outp += sprintf(outp, "%s%.2f", (printed++ ? delim : ""), 100.0 * p->die_c6 / crystal_hz / interval_float);
		outp +=
		    sprintf(outp, "%s%.2f", (printed++ ? delim : ""), 100.0 * p->die_c6 / crystal_hz / interval_float);

	if (DO_BIC(BIC_CPU_LPI)) {
		if (p->cpu_lpi >= 0)
@@ -9071,7 +9071,7 @@ int get_and_dump_counters(void)

void print_version()
{
	fprintf(outf, "turbostat version 2024.05.10 - Len Brown <lenb@kernel.org>\n");
	fprintf(outf, "turbostat version 2024.07.26 - Len Brown <lenb@kernel.org>\n");
}

#define COMMAND_LINE_SIZE 2048
@@ -9536,8 +9536,7 @@ void parse_add_command_pmt(char *add_command)
	}

	if (strlen(name) >= PMT_COUNTER_NAME_SIZE_BYTES) {
		printf("%s: name has to be at most %d characters long\n",
			__func__, PMT_COUNTER_NAME_SIZE_BYTES);
		printf("%s: name has to be at most %d characters long\n", __func__, PMT_COUNTER_NAME_SIZE_BYTES);
		exit(1);
	}