linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hitoshi Mitake <mitake.hitoshi@gmail.com>
To: Davidlohr Bueso <davidlohr@hp.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>,
	Aswin Chandramouleeswaran <aswin@hp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/7] perf lock: do not cut lock name
Date: Thu, 19 Sep 2013 02:38:01 +0900	[thread overview]
Message-ID: <8738p2hvye.wl%mitake.hitoshi@gmail.com> (raw)
In-Reply-To: <1378693159-8747-6-git-send-email-davidlohr@hp.com>


Hi Davidlohr, thanks for your enhancements and cleanings!

At Sun,  8 Sep 2013 19:19:17 -0700,
 Bueso wrote:
> 
> While this could be seen as personal taste, there really isn't any
> reason for being so stingy printing the lock name. Furthermore, some
> symbol names are really just too long, and cutting them at 16 characters
> doesn't help at all.

I agree with your opinion that 16 chars are too short for lock names,
but I think if we should print "..." for indicating the abbreviation.

Thanks,
Hitoshi

> 
> Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
> ---
>  tools/perf/builtin-lock.c | 18 ++----------------
>  1 file changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
> index 780484f..2674a42 100644
> --- a/tools/perf/builtin-lock.c
> +++ b/tools/perf/builtin-lock.c
> @@ -696,10 +696,9 @@ static void print_bad_events(int bad, int total)
>  static void print_result(void)
>  {
>  	struct lock_stat *st;
> -	char cut_name[20];
>  	int bad, total;
>  
> -	pr_info("%20s ", "Name");
> +	pr_info("%40s ", "Name");
>  	pr_info("%10s ", "acquired");
>  	pr_info("%10s ", "contended");
>  
> @@ -716,21 +715,8 @@ static void print_result(void)
>  			bad++;
>  			continue;
>  		}
> -		bzero(cut_name, 20);
> -
> -		if (strlen(st->name) < 16) {
> -			/* output raw name */
> -			pr_info("%20s ", st->name);
> -		} else {
> -			strncpy(cut_name, st->name, 16);
> -			cut_name[16] = '.';
> -			cut_name[17] = '.';
> -			cut_name[18] = '.';
> -			cut_name[19] = '\0';
> -			/* cut off name for saving output style */
> -			pr_info("%20s ", cut_name);
> -		}
>  
> +		pr_info("%40s ", st->name);
>  		pr_info("%10u ", st->nr_acquired);
>  		pr_info("%10u ", st->nr_contended);
>  
> -- 
> 1.7.11.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2013-09-18 17:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09  2:19 [PATCH 0/7] perf lock: misc fixes and enhancements Davidlohr Bueso
2013-09-09  2:19 ` [PATCH 1/7] perf lock: remove dead code Davidlohr Bueso
2013-10-15  5:24   ` [tip:perf/core] perf lock: Remove " tip-bot for Davidlohr Bueso
2013-09-09  2:19 ` [PATCH 2/7] perf lock: return proper code in report_lock_*_event Davidlohr Bueso
2013-10-15  5:24   ` [tip:perf/core] perf lock: Return " tip-bot for Davidlohr Bueso
2013-09-09  2:19 ` [PATCH 3/7] perf lock: plug some memleaks Davidlohr Bueso
2013-09-09  3:01   ` Ramkumar Ramachandra
2013-09-18 17:39     ` Hitoshi Mitake
2013-10-15  5:24   ` [tip:perf/core] perf lock: Plug " tip-bot for Davidlohr Bueso
2013-09-09  2:19 ` [PATCH 4/7] perf lock: redo __cmd_report Davidlohr Bueso
2013-10-15  5:24   ` [tip:perf/core] perf lock: Redo __cmd_report tip-bot for Davidlohr Bueso
2013-09-09  2:19 ` [PATCH 5/7] perf lock: do not cut lock name Davidlohr Bueso
2013-09-18 17:38   ` Hitoshi Mitake [this message]
2013-09-09  2:19 ` [PATCH 6/7] perf lock: limit bad rate precision Davidlohr Bueso
2013-10-15  5:24   ` [tip:perf/core] perf lock: Limit " tip-bot for Davidlohr Bueso
2013-09-09  2:19 ` [PATCH 7/7] perf lock: account for lock average wait time Davidlohr Bueso
2013-10-15  5:24   ` [tip:perf/core] perf lock: Account " tip-bot for Davidlohr Bueso
2013-09-19 19:00 ` [PATCH 0/7] perf lock: misc fixes and enhancements Arnaldo Carvalho de Melo
2013-09-20  3:24   ` Davidlohr Bueso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738p2hvye.wl%mitake.hitoshi@gmail.com \
    --to=mitake.hitoshi@gmail.com \
    --cc=acme@redhat.com \
    --cc=aswin@hp.com \
    --cc=davidlohr@hp.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mitake@dcl.info.waseda.ac.jp \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).