mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Namhyung Kim <namhyung.kim@lge.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/7] perf tools: Add name field into perf_hpp_fmt
Date: Mon, 28 Jul 2014 09:35:08 +0900	[thread overview]
Message-ID: <87oawaiamb.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20140725111230.GA1214@krava.brq.redhat.com> (Jiri Olsa's message of "Fri, 25 Jul 2014 13:12:30 +0200")

Hi Jiri,

On Fri, 25 Jul 2014 13:12:30 +0200, Jiri Olsa wrote:
> On Fri, Jul 25, 2014 at 10:18:57AM +0900, Namhyung Kim wrote:
>
> SNIP
>
>>  }
>>  
>> -#define __HPP_WIDTH_FN(_type, _str)					\
>> +#define __HPP_WIDTH_FN(_type)						\
>>  static int hpp__width_##_type(struct perf_hpp_fmt *fmt,			\
>>  			      struct perf_hpp *hpp __maybe_unused,	\
>>  			      struct perf_evsel *evsel)			\
>> @@ -219,19 +219,19 @@ static int hpp__width_##_type(struct perf_hpp_fmt *fmt,			\
>>  	if (symbol_conf.event_group)					\
>>  		len = max(len, evsel->nr_members * fmt->len);		\
>>  									\
>> -	if (len < (int)strlen(_str))					\
>> -		len = strlen(_str);					\
>> +	if (len < (int)strlen(fmt->name))				\
>> +		len = strlen(fmt->name);				\
>
> hum, so with the '_str' string argument missing we dont need this
> function to be generated by macro, right? could be one single function
> called hpp__width_entry or something like that

You're right.  Will change both!

Thanks,
Namhyung


>
>>  									\
>>  	return len;							\
>>  }
>>  
>> -#define __HPP_HEADER_FN(_type, _str) 					\
>> +#define __HPP_HEADER_FN(_type) 						\
>>  static int hpp__header_##_type(struct perf_hpp_fmt *fmt,		\
>>  			       struct perf_hpp *hpp,			\
>>  			       struct perf_evsel *evsel)		\
>>  {									\
>>  	int len = hpp__width_##_type(fmt, hpp, evsel);			\
>> -	return scnprintf(hpp->buf, hpp->size, "%*s", len, _str);	\
>> +	return scnprintf(hpp->buf, hpp->size, "%*s", len, fmt->name);	\
>>  }
>>  
>
> same here ^^^ for hpp__header_##_type
>
>
> jirka

  reply	other threads:[~2014-07-28  0:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  1:18 [PATCHSET 0/7] perf tools: Honor column width setting (v2) Namhyung Kim
2014-07-25  1:18 ` [PATCH 1/7] perf tools: Left-align output contents Namhyung Kim
2014-07-25  1:18 ` [PATCH 2/7] perf tools: Make __hpp__fmt() receive an additional len argument Namhyung Kim
2014-07-25  1:18 ` [PATCH 3/7] perf tools: Save column length in perf_hpp_fmt Namhyung Kim
2014-07-25  1:18 ` [PATCH 4/7] perf report: Honor column width setting Namhyung Kim
2014-07-25 11:13   ` Jiri Olsa
2014-07-28  0:43     ` Namhyung Kim
2014-07-28 11:17       ` Jiri Olsa
2014-07-25  1:18 ` [PATCH 5/7] perf top: Add -w option for setting column width Namhyung Kim
2014-07-25  1:18 ` [PATCH 6/7] perf tools: Add name field into perf_hpp_fmt Namhyung Kim
2014-07-25 11:12   ` Jiri Olsa
2014-07-28  0:35     ` Namhyung Kim [this message]
2014-07-25  1:18 ` [PATCH 7/7] perf tools: Fix column alignment when headers aren't shown on TUI Namhyung Kim

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=87oawaiamb.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung.kim@lge.com \
    --cc=paulus@samba.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

Powered by JetHome