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: <871uathezw.fsf@sejong.aot.lge.com>
Date:	Tue, 02 Apr 2013 10:56:35 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <andi@...stfloor.org>,
	David Ahern <dsahern@...il.com>
Subject: Re: [PATCH 5/9] perf sort: Separate out memory-specific sort keys

On Mon, 1 Apr 2013 22:29:37 +0200, Jiri Olsa wrote:
> On Mon, Apr 01, 2013 at 08:35:21PM +0900, Namhyung Kim wrote:
>
> SNIP
>
>> +
>>  int sort_dimension__add(const char *tok)
>>  {
>>  	unsigned int i;
>> @@ -964,6 +971,33 @@ int sort_dimension__add(const char *tok)
>>  		return 0;
>>  	}
>>  
>> +	for (i = 0; i < ARRAY_SIZE(memory_sort_dimensions); i++) {
>> +		struct sort_dimension *sd = &memory_sort_dimensions[i];
>> +
>> +		if (strncasecmp(tok, sd->name, strlen(tok)))
>> +			continue;
>> +
>> +		if (sort__mode != SORT_MODE__MEMORY)
>> +			return -EINVAL;
>> +
>> +		if (sd->entry == &sort_mem_daddr_sym)
>> +			sort__has_sym = 1;
>> +
>> +		if (sd->taken)
>> +			return 0;
>> +
>> +		if (sd->entry->se_collapse)
>> +			sort__need_collapse = 1;
>> +
>> +		if (list_empty(&hist_entry__sort_list))
>> +			sort__first_dimension = i + __SORT_MEMORY_MODE;
>> +
>> +		list_add_tail(&sd->entry->list, &hist_entry__sort_list);
>> +		sd->taken = 1;
>> +
>> +		return 0;
>
> nice idea, I wonder some of the above code be put into function
> and used also in previous loop, no big deal though

Hmm.. okay.  I'll try. :)

Thanks,
Namhyung
--
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