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: <20171002115836.GC16128@krava>
Date:   Mon, 2 Oct 2017 13:58:36 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     Jin Yao <yao.jin@...ux.intel.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v3 6/6] perf script: support time percent and multiple
 time ranges

On Thu, Sep 28, 2017 at 08:45:21PM +0800, Jin Yao wrote:

SNIP

> diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> index 9092de0..7fd3063 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -1357,6 +1357,8 @@ static void print_sample_synth(struct perf_sample *sample,
>  	}
>  }
>  
> +#define PTIME_RANGE_MAX	10
> +
>  struct perf_script {
>  	struct perf_tool	tool;
>  	struct perf_session	*session;
> @@ -1370,6 +1372,8 @@ struct perf_script {
>  	int			name_width;
>  	const char              *time_str;
>  	struct perf_time_interval ptime;
> +	struct perf_time_interval ptime_range[PTIME_RANGE_MAX];
> +	int			range_num;
>  };
>  
>  static int perf_evlist__max_name_len(struct perf_evlist *evlist)
> @@ -1565,8 +1569,11 @@ static int process_sample_event(struct perf_tool *tool,
>  	struct perf_script *scr = container_of(tool, struct perf_script, tool);
>  	struct addr_location al;
>  
> -	if (perf_time__skip_sample(&scr->ptime, sample->time))
> +	if (perf_time__skip_sample(&scr->ptime, sample->time) ||
> +	    perf_time__ranges_skip_sample(scr->ptime_range, scr->range_num,
> +					  sample->time)) {

any reason for why dont use ptime_range[1] with range_num = 1
and use just a single call here?

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ