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: <20211124171212.537b43c3@gandalf.local.home>
Date:   Wed, 24 Nov 2021 17:12:12 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Daniel Bristot de Oliveira <bristot@...nel.org>
Cc:     Tao Zhou <tao.zhou@...ux.dev>, Ingo Molnar <mingo@...hat.com>,
        Tom Zanussi <zanussi@...nel.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Juri Lelli <juri.lelli@...hat.com>,
        Clark Williams <williams@...hat.com>,
        John Kacur <jkacur@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        linux-rt-users@...r.kernel.org, linux-trace-devel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V7 05/14] rtla/osnoise: Add the hist mode

On Fri, 29 Oct 2021 21:26:08 +0200
Daniel Bristot de Oliveira <bristot@...nel.org> wrote:


> +/*
> + * osnoise_init_trace_hist - enable events used to collect histogram
> + */
> +static int osnoise_init_trace_hist(struct osnoise_tool *tool)
> +{
> +	struct osnoise_hist_params *params = tool->params;
> +	struct osnoise_hist_data *data = tool->data;
> +	int bucket_size;
> +	char buff[128];
> +	int retval = 0;
> +
> +	/*
> +	 * Set the size of the bucket.
> +	 */
> +	bucket_size = params->output_divisor * params->bucket_size;
> +	snprintf(buff, sizeof(buff), "duration.buckets=%d", bucket_size);
> +
> +	data->trace_hist = tracefs_hist_alloc(tool->trace.tep, "osnoise", "sample_threshold",
> +			buff, TRACEFS_HIST_KEY_NORMAL);

FYI, we changed the API (haven't tagged it yet, so we can do that :-) and
the above needs to be:

	data->trace_hist = tracefs_hist1d_alloc(tool->trace.tep, "osnoise", "sample_threshold",

-- Steve

> +	if (!data->trace_hist)
> +		return 1;
> +
> +	retval = tracefs_hist_add_key(data->trace_hist, "cpu", 0);
> +	if (retval)
> +		goto out_err;
> +
> +	retval = tracefs_hist_start(tool->trace.inst, data->trace_hist);
> +	if (retval)
> +		goto out_err;
> +
> +	return 0;
> +
> +out_err:
> +	osnoise_destroy_trace_hist(tool);
> +	return 1;
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ