Re: [PATCH 2/3] rt-tests: cyclicdeadline: Print the histogram regardless of quiet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 22 Jan 2024, Crystal Wood wrote:

> The histogram printing code should not have been gated by !quiet,
> even though other summary printing code is.
> 
> The non-histogram output also should not have been gated based on
> the presence of the histogram.
> 
> Signed-off-by: Crystal Wood <crwood@xxxxxxxxxx>
> ---
>  src/sched_deadline/cyclicdeadline.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
> index b3155547b9bb..3cb8f714b788 100644
> --- a/src/sched_deadline/cyclicdeadline.c
> +++ b/src/sched_deadline/cyclicdeadline.c
> @@ -1117,15 +1117,15 @@ static void loop(struct sched_data *sched_data, int nr_threads)
>  	usleep(10000);
>  	if (!quiet) {
>  		printf("\033[%dB", nr_threads + 2);
> -	} else {
> -		if (histogram) {
> -			FILE *out = histfile ? histfile : stdout;
> +	} else if (!histogram) {
> +		for (i = 0; i < nr_threads; ++i)
> +			print_stat(stdout, &sched_data[i], i, 0, 0);
> +	}
>  
> -			print_hist(out, sched_data, nr_threads);
> -		} else {
> -			for (i = 0; i < nr_threads; ++i)
> -				print_stat(stdout, &sched_data[i], i, 0, 0);
> -		}
> +	if (histogram) {
> +		FILE *out = histfile ? histfile : stdout;
> +
> +		print_hist(out, sched_data, nr_threads);
>  	}
>  }
>  
> -- 

Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux