diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2020-01-30 21:45:18 -0800 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-02-10 17:47:38 +0200 |
commit | 3b0fe3bab31fa7b320667e3d001eaa3f23590c05 (patch) | |
tree | 733e1b08450e7a45d0204506ab20216f197100f9 /tools/power | |
parent | 14a8aa4964e01aafcd684499315d3d4ea1de428f (diff) | |
download | linux-3b0fe3bab31fa7b320667e3d001eaa3f23590c05.tar.bz2 |
tools/power/x86/intel-speed-select: Avoid duplicate names for json parsing
For the command
"intel-speed-select perf-profile info":
There are two instances of “speed-select-turbo-freq” underneath
“perf-profile-level-0” for each package. When we load the output into
python with json.load(), the second instance overwrites the first.
Result is that we can only access:
"speed-select-turbo-freq": {
"bucket-0": {
"high-priority-cores-count": "2",
"high-priority-max-frequency(MHz)": "3000",
"high-priority-max-avx2-frequency(MHz)": "2800",
"high-priority-max-avx512-frequency(MHz)": "2600"
},
Because it is a duplicate of "speed-select-turbo-freq": "disabled"
Same is true for "speed-select-base-freq".
To avoid this add "-properties" suffix for the second instance to
differentiate.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-display.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-display.c b/tools/power/x86/intel-speed-select/isst-display.c index 4fb0c1d49d64..3d70be2a9f61 100644 --- a/tools/power/x86/intel-speed-select/isst-display.c +++ b/tools/power/x86/intel-speed-select/isst-display.c @@ -178,7 +178,7 @@ static void _isst_pbf_display_information(int cpu, FILE *outf, int level, char header[256]; char value[256]; - snprintf(header, sizeof(header), "speed-select-base-freq"); + snprintf(header, sizeof(header), "speed-select-base-freq-properties"); format_and_print(outf, disp_level, header, NULL); snprintf(header, sizeof(header), "high-priority-base-frequency(MHz)"); @@ -224,7 +224,7 @@ static void _isst_fact_display_information(int cpu, FILE *outf, int level, char value[256]; int j; - snprintf(header, sizeof(header), "speed-select-turbo-freq"); + snprintf(header, sizeof(header), "speed-select-turbo-freq-properties"); format_and_print(outf, base_level, header, NULL); for (j = 0; j < ISST_FACT_MAX_BUCKETS; ++j) { if (fact_bucket != 0xff && fact_bucket != j) |