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:	Thu, 30 Jul 2015 14:15:24 +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 V7 6/7] perf,tools: per-event callgraph support

On Wed, Jul 29, 2015 at 05:42:15AM -0400, Kan Liang wrote:

SNIP

> +
> +	/* User explicitly set per-event callgraph, clear the old setting and reset. */
> +	if ((callgraph_buf != NULL) || (dump_size > 0)) {
> +
> +		/* parse callgraph parameters */
> +		if (callgraph_buf != NULL) {
> +			if (!strcmp(callgraph_buf, "no")) {
> +				param.enabled = false;
> +				param.record_mode = CALLCHAIN_NONE;
> +			} else {
> +				param.enabled = true;
> +				if (parse_callchain_record_opt(callgraph_buf, &param)) {
> +					pr_err("per-event callgraph setting for %s failed. "
> +					       "Apply callgraph global setting for it\n",
> +					       evsel->name);
> +					return;
> +				}
> +			}
> +		}
> +		if (dump_size > 0)
> +			param.dump_size = dump_size;
> +
> +		/* If global callgraph set, clear it */
> +		if (callchain_param.enabled) {
> +			perf_evsel__reset_sample_bit(evsel, CALLCHAIN);
> +			if (callchain_param.record_mode == CALLCHAIN_LBR) {
> +				perf_evsel__reset_sample_bit(evsel, BRANCH_STACK);
> +				attr->branch_sample_type &= ~(PERF_SAMPLE_BRANCH_USER |
> +							      PERF_SAMPLE_BRANCH_CALL_STACK);
> +			}
> +			if (callchain_param.record_mode == CALLCHAIN_DWARF) {
> +				perf_evsel__reset_sample_bit(evsel, REGS_USER);
> +				perf_evsel__reset_sample_bit(evsel, STACK_USER);
> +			}
> +		}

please put code above into perf_evsel__reset_callgraph
ans place it close to perf_evsel__config_callgraph ;-)

other than that the change looks ok to me now

thanks,
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ