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:   Mon, 25 Feb 2019 13:56:15 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, jolsa@...nel.org,
        namhyung@...nel.org, eranian@...gle.com,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 11/11] perf tools report: Implement browsing of
 individual samples

On Sun, Feb 24, 2019 at 07:37:22AM -0800, Andi Kleen wrote:

SNIP

> +static void hists__res_sample(struct hist_entry *he, struct perf_sample *sample)
> +{
> +	struct res_sample *r;
> +	int j;
> +
> +	if (!he->res_samples) {
> +		he->res_samples = calloc(sizeof(struct res_sample),
> +					symbol_conf.res_sample);
> +		if (!he->res_samples)
> +			return;
> +	}
> +	if (he->num_res < symbol_conf.res_sample) {
> +		j = he->num_res++;
> +	} else {
> +		j = random_max(++he->num_res + 1);

will he->num_res keep raising all the time?

jirka

> +		if (he->num_res > symbol_conf.res_sample)
> +			return;
> +	}
> +	r = &he->res_samples[j];
> +	r->time = sample->time;
> +	r->cpu = sample->cpu;
> +	r->tid = sample->tid;
> +}
> +


SNIP

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ