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:	Wed, 29 Jul 2015 13:48:55 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Kan Liang <kan.liang@...el.com>
Cc:	acme@...nel.org, jolsa@...nel.org, namhyung@...nel.org,
	ak@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC V6 5/6] perf,tool: per-event callgraph support

On Mon, Jul 27, 2015 at 08:21:38AM -0400, Kan Liang wrote:

SNIP

>  
> -static void apply_config_terms(struct perf_evsel *evsel)
> +static void apply_config_terms(struct perf_evsel *evsel,
> +			       struct record_opts *opts)
>  {
>  	struct perf_evsel_config_term *term;
>  	struct list_head *config_terms = &evsel->config_terms;
>  	struct perf_event_attr *attr = &evsel->attr;
> +	struct callchain_param param;
> +	bool callgraph_set = false;
> +
> +	/* callgraph default */
> +	param.record_mode = callchain_param.record_mode;
> +	param.dump_size = 8192;
>  
>  	list_for_each_entry(term, config_terms, list) {
>  		switch (term->type) {
> @@ -604,10 +612,49 @@ static void apply_config_terms(struct perf_evsel *evsel)
>  			else
>  				perf_evsel__reset_sample_bit(evsel, TIME);
>  			break;
> +		case PERF_EVSEL__CONFIG_TERM_CALLGRAPH:
> +			if (!strcmp(term->val.callgraph, "fp")) {
> +				param.enabled = true;
> +				param.record_mode = CALLCHAIN_FP;
> +			} else if (!strcmp(term->val.callgraph, "dwarf")) {
> +				param.enabled = true;
> +				param.record_mode = CALLCHAIN_DWARF;
> +			} else if (!strcmp(term->val.callgraph, "lbr")) {
> +				param.enabled = true;
> +				param.record_mode = CALLCHAIN_LBR;
> +			} else if (!strcmp(term->val.callgraph, "no")) {
> +				param.enabled = false;
> +			} else {
> +				pr_warning("%s is no valid callchain type.\n", term->val.callgraph);
> +			}
> +			callgraph_set = true;
> +			break;
> +		case PERF_EVSEL__CONFIG_TERM_STACK_USER:
> +			param.dump_size = term->val.stack_user;
> +			callgraph_set = true;
> +			break;

could this get somehow unified with parse_callchain_record_opt?
it'd be nice to have this setup on single place..

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists