Re: [PATCH 21/48] perf record: Extract synthesize code to record__synthesize()

From: Jiri Olsa
Date: Wed Feb 24 2016 - 09:29:31 EST


On Mon, Feb 22, 2016 at 09:10:48AM +0000, Wang Nan wrote:

SNIP

> + err = perf_event__synthesize_auxtrace_info(rec->itr, tool,
> + session, process_synthesized_event);
> + if (err)
> + goto out;
> + }
> +
> + err = perf_event__synthesize_kernel_mmap(tool, process_synthesized_event,
> + machine);
> + if (err < 0 && !warned_kmaps) {
> + warned_kmaps = true;
> + pr_err("Couldn't record kernel reference relocation symbol\n"
> + "Symbol resolution may be skewed if relocation was used (e.g. kexec).\n"
> + "Check /proc/kallsyms permission or run as root.\n");
> + }
> +
> + err = perf_event__synthesize_modules(tool, process_synthesized_event,
> + machine);
> + if (err < 0 && !warned_modules) {
> + warned_modules = true;

could you please add logic for warning just once
into separate patch, so this is just pure move?

also we have WARN_ONCE macro in perf

thanks,
jirka