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  linux-cve-announce  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]
Message-ID: <87oawaiamb.fsf@sejong.aot.lge.com>
Date:	Mon, 28 Jul 2014 09:35:08 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/7] perf tools: Add name field into perf_hpp_fmt

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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ