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, 8 Mar 2019 15:39:44 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Stephane Eranian <eranian@...gle.com>,
        Alexey Budankov <alexey.budankov@...ux.intel.com>
Subject: Re: [PATCH 07/11] perf session: Add
 __perf_session__process_dir_events function

Em Fri, Mar 08, 2019 at 03:38:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Mar 08, 2019 at 02:47:41PM +0100, Jiri Olsa escreveu:
> > +static int __perf_session__process_dir_events(struct perf_session *session)
> > +{
> > +	struct perf_data *data = session->data;
> > +	struct perf_tool *tool = session->tool;
> > +	struct reader rd = {
> > +		.fd		= perf_data__fd(session->data),
> > +		.data_size	= session->header.data_size,
> > +		.data_offset	= session->header.data_offset,
> > +		.process	= process_simple,
> > +	};
> > +	int i, ret = 0;
> > +	struct ui_progress prog;
> > +	u64 total_size = perf_data__size(session->data);
> > +
> > +	perf_tool__fill_defaults(tool);
> > +
> > +	ui_progress__init_size(&prog, total_size, "Processing events...");
> > +
> > +	/* Read data from the header file.. */
> > +	ret = reader__process_events(&rd, session, &prog);
> > +	if (ret)
> > +		goto out_err;
> > +
> > +	/* ... and continue with data files. */
> > +	for (i = 0; i < data->dir.nr ; i++) {
> > +		struct perf_data_file *file = &data->dir.files[i];
> > +
> > +		if (file->size == 0)
> > +			continue;
> > +
> > +		rd = (struct reader) {
> > +			.fd		= file->fd,
> > +			.data_size	= file->size,
> > +			.data_offset	= 0,
> > +			.process	= process_index,
> > +		};
> > +
> > +		ret = reader__process_events(&rd, session, &prog);
> > +		if (ret)
> > +			goto out_err;
 
> Don't we have to have some handling of PERF_RECORD_FINISHED_ROUND here?
> I.e. what happens if we fill th ordered events with just the contents
> of, say, the first CPU and then have those events flushed and processed
> before we start even looking at the events in the other CPUs?
 
> I think some detailed explanation of what happens here is in need, no?

Ah, I've pushed what I have merged so far to acme/perf/core on
git.kernel.org, please continue from there.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ