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: <51D14CB6.206@intel.com>
Date:	Mon, 01 Jul 2013 12:32:38 +0300
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	David Ahern <dsahern@...il.com>
CC:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Namhyung Kim <namhyung@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH V2 12/15] perf tools: allow non-matching sample types

On 27/06/13 19:39, David Ahern wrote:
> On 6/27/13 1:55 AM, Adrian Hunter wrote:
>> Sample types need not be identical to determine
>> the sample id from the event.  Only the position
>> of the sample id needs to be the same.
>>
>> Compatible sample types are ones in which the bits
>> defined by PERF_COMPAT_MASK are the same.
>> 'perf_evlist__config()' forces sample types to be
>> compatible on that basis.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
>> ---
>>   tools/perf/builtin-report.c |   2 +-
>>   tools/perf/util/event.h     |  14 +++++
>>   tools/perf/util/evlist.c    | 135
>> ++++++++++++++++++++++++++++++++++++++++++--
>>   tools/perf/util/evlist.h    |   8 ++-
>>   tools/perf/util/evsel.c     |  64 ++++++++++++++++++++-
>>   tools/perf/util/evsel.h     |  10 ++++
>>   tools/perf/util/session.c   |   8 ++-
>>   7 files changed, 230 insertions(+), 11 deletions(-)
>>

Snip

> 
> While this works for a combined S/W and tracepoint events session, I do not
> like promoting sample types to the minimum compatible level for all events
> in the session. perf needs to allow each event to have its own sample_type
> and not force a minimal compatibility.

Why?  The impact is small. The kernel API is completely unchanged.

Consider the affected sample members:

	PERF_SAMPLE_IP
	PERF_SAMPLE_TID
	PERF_SAMPLE_TIME
	PERF_SAMPLE_ADDR
	PERF_SAMPLE_ID
	PERF_SAMPLE_CPU
	PERF_SAMPLE_STREAM_ID

Of those, perf_evlist__config() always selects PERF_SAMPLE_IP,
PERF_SAMPLE_TID and PERF_SAMPLE_ID, and never selects PERF_SAMPLE_STREAM_ID.
 That leaves just:

	PERF_SAMPLE_TIME
	PERF_SAMPLE_ADDR
	PERF_SAMPLE_CPU

PERF_SAMPLE_TIME is always selected when inheriting.

PERF_SAMPLE_TIME and PERF_SAMPLE_CPU are always selected for per-cpu recording.

Under what circumstances would you want 'time' and/or 'cpu' on some events
but not all of them?

Under what circumstances would you want 'addr' but those events are not the
vast majority of the events you record?

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