lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 07 Oct 2014 14:26:19 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Taeung Song <treeze.taeung@...il.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	linux-kernel@...r.kernel.org, jolsa@...hat.com,
	linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf top: Add a visual cue for toggle zeroing of samples

Hi Taeung,

On Sun,  5 Oct 2014 15:49:34 +0900, Taeung Song wrote:
> When 'perf top' is run, one can't easily find a difference
> between -z option and normal output.
> So I added a visual cue to know whether it is the zeroing or not.


[SNIP]
> +static int hists__browser_title(struct hists *hists,
> +				struct hist_browser_timer *hbt,
> +				char *bf,
> +				size_t size)

You don't need to align arguments like this.


>  {
>  	char unit;
>  	int printed;
> @@ -1256,6 +1268,14 @@ static int hists__browser_title(struct hists *hists, char *bf, size_t size)
>  	if (dso)
>  		printed += scnprintf(bf + printed, size - printed,
>  				    ", DSO: %s", dso->short_name);
> +	if (!is_report_browser(hbt)) {
> +		struct perf_top *top = hbt->arg;
> +
> +		if (top->zero)
> +			printed += scnprintf(bf + printed, size - printed,
> +					     ", [z]", "");

It seems the final empty string can go away.  And personally I'd like to
get rid of "," before "[z]" also.

Otherwise looks good to me.  Could you please take a look at the stdio
output too?

Thanks,
Namhyung


> +	}
> +
>  	return printed;
>  }
>  
> @@ -1267,12 +1287,6 @@ static inline void free_popup_options(char **options, int n)
>  		zfree(&options[i]);
>  }
>  
> -/* Check whether the browser is for 'top' or 'report' */
> -static inline bool is_report_browser(void *timer)
> -{
> -	return timer == NULL;
> -}
> -
>  /*
>   * Only runtime switching of perf data file will make "input_name" point
>   * to a malloced buffer. So add "is_input_name_malloced" flag to decide
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists