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]
Date:	Thu, 08 Aug 2013 22:49:24 -0400
From:	David Ahern <dsahern@...il.com>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 07/19] perf top: Use new idle_sym check

On 8/8/13 11:06 AM, Arnaldo Carvalho de Melo wrote:
> Em Wed, Aug 07, 2013 at 10:50:49PM -0400, David Ahern escreveu:
>> Avoids strcmp processing each sample.
>
> How so? This is done just when loading a DSO, when then each symbol is
> checked against this list.

hmmm.... see that now, yes. The timehist command wants to know idle 
times, not just filter them out like perf-top does.

David

>
> Tangentially, Frédéric, wasn't there a patchset from you that marks the
> context of idle samples, in perf_event_header->misc, additiotally to
> PERF_RECORD_MISC_KERNEL, etc? I think there were some for IRQ context as
> well, right?
>
> - Arnaldo
>
>> Signed-off-by: David Ahern <dsahern@...il.com>
>> Cc: Ingo Molnar <mingo@...nel.org>
>> Cc: Jiri Olsa <jolsa@...hat.com>
>> Cc: Namhyung Kim <namhyung@...nel.org>
>> Cc: Frederic Weisbecker <fweisbec@...il.com>
>> Cc: Peter Zijlstra <peterz@...radead.org>
>> Cc: Stephane Eranian <eranian@...gle.com>
>> ---
>>   tools/perf/builtin-top.c |   25 ++-----------------------
>>   1 file changed, 2 insertions(+), 23 deletions(-)
>>
>> diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
>> index 440c3b3..8eb0e3a 100644
>> --- a/tools/perf/builtin-top.c
>> +++ b/tools/perf/builtin-top.c
>> @@ -634,26 +634,9 @@ repeat:
>>   	return NULL;
>>   }
>>
>> -/* Tag samples to be skipped. */
>> -static const char *skip_symbols[] = {
>> -	"intel_idle",
>> -	"default_idle",
>> -	"native_safe_halt",
>> -	"cpu_idle",
>> -	"enter_idle",
>> -	"exit_idle",
>> -	"mwait_idle",
>> -	"mwait_idle_with_hints",
>> -	"poll_idle",
>> -	"ppc64_runlatch_off",
>> -	"pseries_dedicated_idle_sleep",
>> -	NULL
>> -};
>> -
>>   static int symbol_filter(struct map *map __maybe_unused, struct symbol *sym)
>>   {
>>   	const char *name = sym->name;
>> -	int i;
>>
>>   	/*
>>   	 * ppc64 uses function descriptors and appends a '.' to the
>> @@ -671,12 +654,8 @@ static int symbol_filter(struct map *map __maybe_unused, struct symbol *sym)
>>   	    strstr(name, "_text_end"))
>>   		return 1;
>>
>> -	for (i = 0; skip_symbols[i]; i++) {
>> -		if (!strcmp(skip_symbols[i], name)) {
>> -			sym->ignore = true;
>> -			break;
>> -		}
>> -	}
>> +	if (symbol__is_idle(sym))
>> +		sym->ignore = true;
>>
>>   	return 0;
>>   }
>> --
>> 1.7.10.1

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