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:	Fri, 06 Sep 2013 07:59:22 -0600
From:	David Ahern <dsahern@...il.com>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	Adrian Hunter <adrian.hunter@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	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>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf kvm: fix sample_type manipulation

On 9/6/13 6:53 AM, Arnaldo Carvalho de Melo wrote:
> Em Fri, Sep 06, 2013 at 09:48:54AM +0300, Adrian Hunter escreveu:
>> Manipulating the sample_type of an evsel requires
>> the use of:
>> 	perf_evsel__set_sample_bit()
>> and	perf_evsel__reset_sample_bit()
>
> Fine, but...

hmmm... this is a relatively new API (7be5ebe8). The kvm-live command 
and my scheduling daemon pre-date its introduction.

>
>> Manipulating the sample type of an evlist requires
>> the id position to be recalculated.

And this is hot of the presses ... 75562573.

>
> ... can't we hide this detail? I.e. we could do it like we do with the
> alloc_{mmap,poll}() evlist methods in perf_evlist__mmap(), checking if it was
> already done, etc.
>
> This we reduce the contact surface for tools using evlists and evsels.
>
> I.e., this sequence:
>
>
> +	perf_evlist__set_id_pos(evlist);
> +
>   	err = perf_evlist__open(evlist);
>
> Could remain just:
>
> 	err = perf_evlist__open(evlist);

perf code has been around a while now and I know there are a number of 
local analysis commands built around it. API changes like this -- 
required ones at that -- need to be simple and some error checking built 
in where possible.

... and documentation for the API on what commands should be doing and 
in what order.

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