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: <20160708144814.GB31763@krava>
Date:	Fri, 8 Jul 2016 16:48:14 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	acme@...nel.org, lizefan@...wei.com, linux-kernel@...r.kernel.org,
	pi3orama@....com, He Kuang <hekuang@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Nilay Vaish <nilayvaish@...il.com>
Subject: Re: [PATCH v14 4/8] perf record: Introduce rec->overwrite_evlist for
 overwritable events

On Thu, Jul 07, 2016 at 05:34:45AM +0000, Wang Nan wrote:

SNIP

> +	if (err)
> +		return err;
> +
> +	err = record__mmap_evlist(rec, rec->evlist, false);
> +	if (err)
> +		return err;
> +
> +	if (!rec->overwrite_evlist)
> +		return 0;
> +
> +	err = record__mmap_evlist(rec, rec->overwrite_evlist, true);
> +	if (err)
> +		return err;
> +	return 0;
>  }
>  
>  static int record__open(struct record *rec)
> @@ -698,9 +743,14 @@ static const struct perf_event_mmap_page *record__pick_pc(struct record *rec)
>  {
>  	const struct perf_event_mmap_page *pc;
>  
> +	/* Change it to a loop if a new aux evlist is added */
>  	pc = perf_evlist__pick_pc(rec->evlist);
>  	if (pc)
>  		return pc;
> +	pc = perf_evlist__pick_pc(rec->overwrite_evlist);
> +	if (pc)
> +		return pc;
> +
>  	return NULL;

above 4 lines could be just:

	return perf_evlist__pick_pc(rec->overwrite_evlist);


jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ