@@ -711,6 +711,7 @@ void start_gather_func(int argc, char *argv[])
/* print out parameters about cpu frequency */
static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq)
{
+ bool hwp = strcmp(p_cpufreq->scaling_driver, XEN_HWP_DRIVER_NAME) == 0;
int i;
printf("cpu id : %d\n", cpuid);
@@ -720,49 +721,57 @@ static void print_cpufreq_para(int cpuid, struct xc_get_cpufreq_para *p_cpufreq)
printf(" %d", p_cpufreq->affected_cpus[i]);
printf("\n");
- printf("cpuinfo frequency : max [%u] min [%u] cur [%u]\n",
- p_cpufreq->cpuinfo_max_freq,
- p_cpufreq->cpuinfo_min_freq,
- p_cpufreq->cpuinfo_cur_freq);
+ if ( hwp )
+ printf("cpuinfo frequency : base [%"PRIu32"] max [%"PRIu32"]\n",
+ p_cpufreq->cpuinfo_min_freq,
+ p_cpufreq->cpuinfo_max_freq);
+ else
+ printf("cpuinfo frequency : max [%u] min [%u] cur [%u]\n",
+ p_cpufreq->cpuinfo_max_freq,
+ p_cpufreq->cpuinfo_min_freq,
+ p_cpufreq->cpuinfo_cur_freq);
printf("scaling_driver : %s\n", p_cpufreq->scaling_driver);
- printf("scaling_avail_gov : %s\n",
- p_cpufreq->scaling_available_governors);
-
- printf("current_governor : %s\n", p_cpufreq->u.s.scaling_governor);
- if ( !strncmp(p_cpufreq->u.s.scaling_governor,
- "userspace", CPUFREQ_NAME_LEN) )
- {
- printf(" userspace specific :\n");
- printf(" scaling_setspeed : %u\n",
- p_cpufreq->u.s.u.userspace.scaling_setspeed);
- }
- else if ( !strncmp(p_cpufreq->u.s.scaling_governor,
- "ondemand", CPUFREQ_NAME_LEN) )
+ if ( !hwp )
{
- printf(" ondemand specific :\n");
- printf(" sampling_rate : max [%u] min [%u] cur [%u]\n",
- p_cpufreq->u.s.u.ondemand.sampling_rate_max,
- p_cpufreq->u.s.u.ondemand.sampling_rate_min,
- p_cpufreq->u.s.u.ondemand.sampling_rate);
- printf(" up_threshold : %u\n",
- p_cpufreq->u.s.u.ondemand.up_threshold);
- }
+ printf("scaling_avail_gov : %s\n",
+ p_cpufreq->scaling_available_governors);
- printf("scaling_avail_freq :");
- for ( i = 0; i < p_cpufreq->freq_num; i++ )
- if ( p_cpufreq->scaling_available_frequencies[i] ==
- p_cpufreq->u.s.scaling_cur_freq )
- printf(" *%d", p_cpufreq->scaling_available_frequencies[i]);
- else
- printf(" %d", p_cpufreq->scaling_available_frequencies[i]);
- printf("\n");
+ printf("current_governor : %s\n", p_cpufreq->u.s.scaling_governor);
+ if ( !strncmp(p_cpufreq->u.s.scaling_governor,
+ "userspace", CPUFREQ_NAME_LEN) )
+ {
+ printf(" userspace specific :\n");
+ printf(" scaling_setspeed : %u\n",
+ p_cpufreq->u.s.u.userspace.scaling_setspeed);
+ }
+ else if ( !strncmp(p_cpufreq->u.s.scaling_governor,
+ "ondemand", CPUFREQ_NAME_LEN) )
+ {
+ printf(" ondemand specific :\n");
+ printf(" sampling_rate : max [%u] min [%u] cur [%u]\n",
+ p_cpufreq->u.s.u.ondemand.sampling_rate_max,
+ p_cpufreq->u.s.u.ondemand.sampling_rate_min,
+ p_cpufreq->u.s.u.ondemand.sampling_rate);
+ printf(" up_threshold : %u\n",
+ p_cpufreq->u.s.u.ondemand.up_threshold);
+ }
+
+ printf("scaling_avail_freq :");
+ for ( i = 0; i < p_cpufreq->freq_num; i++ )
+ if ( p_cpufreq->scaling_available_frequencies[i] ==
+ p_cpufreq->u.s.scaling_cur_freq )
+ printf(" *%d", p_cpufreq->scaling_available_frequencies[i]);
+ else
+ printf(" %d", p_cpufreq->scaling_available_frequencies[i]);
+ printf("\n");
- printf("scaling frequency : max [%u] min [%u] cur [%u]\n",
- p_cpufreq->u.s.scaling_max_freq,
- p_cpufreq->u.s.scaling_min_freq,
- p_cpufreq->u.s.scaling_cur_freq);
+ printf("scaling frequency : max [%u] min [%u] cur [%u]\n",
+ p_cpufreq->u.s.scaling_max_freq,
+ p_cpufreq->u.s.scaling_min_freq,
+ p_cpufreq->u.s.scaling_cur_freq);
+ }
printf("turbo mode : %s\n",
p_cpufreq->turbo_enabled ? "enabled" : "disabled or n/a");