diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
| -rw-r--r-- | tools/perf/builtin-report.c | 19 | 
1 files changed, 11 insertions, 8 deletions
| diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 8167ebfe776a..1dd92d8c9279 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -410,7 +410,7 @@ static int report__setup_sample_type(struct report *rep)  		}  	} -	callchain_param_setup(sample_type); +	callchain_param_setup(sample_type, perf_env__arch(&rep->session->header.env));  	if (rep->stitch_lbr && (callchain_param.record_mode != CALLCHAIN_LBR)) {  		ui__warning("Can't find LBR callchain. Switch off --stitch-lbr.\n" @@ -619,14 +619,17 @@ static int report__browse_hists(struct report *rep)  	int ret;  	struct perf_session *session = rep->session;  	struct evlist *evlist = session->evlist; -	const char *help = perf_tip(system_path(TIPDIR)); +	char *help = NULL, *path = NULL; -	if (help == NULL) { +	path = system_path(TIPDIR); +	if (perf_tip(&help, path) || help == NULL) {  		/* fallback for people who don't install perf ;-) */ -		help = perf_tip(DOCDIR); -		if (help == NULL) -			help = "Cannot load tips.txt file, please install perf!"; +		free(path); +		path = system_path(DOCDIR); +		if (perf_tip(&help, path) || help == NULL) +			help = strdup("Cannot load tips.txt file, please install perf!");  	} +	free(path);  	switch (use_browser) {  	case 1: @@ -651,7 +654,7 @@ static int report__browse_hists(struct report *rep)  		ret = evlist__tty_browse_hists(evlist, rep, help);  		break;  	} - +	free(help);  	return ret;  } @@ -1124,7 +1127,7 @@ static int process_attr(struct perf_tool *tool __maybe_unused,  	 * on events sample_type.  	 */  	sample_type = evlist__combined_sample_type(*pevlist); -	callchain_param_setup(sample_type); +	callchain_param_setup(sample_type, perf_env__arch((*pevlist)->env));  	return 0;  } |