Commit 646aaea6 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf tools: Make sure kptr_restrict warnings fit 80 col terms



Suggested-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Link: http://lkml.kernel.org/n/tip-i1p8vrhq7xveyui6t1sc914e@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d6a72fe4
Loading
Loading
Loading
Loading
+8 −11
Original line number Original line Diff line number Diff line
@@ -824,17 +824,14 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
	symbol__init();
	symbol__init();


	if (symbol_conf.kptr_restrict)
	if (symbol_conf.kptr_restrict)
		pr_warning("WARNING: Kernel address maps "
		pr_warning(
			   "(/proc/{kallsyms,modules}) are restricted, "
"WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted,\n"
"check /proc/sys/kernel/kptr_restrict.\n\n"
"check /proc/sys/kernel/kptr_restrict.\n\n"
			   "Samples in kernel functions may not be resolved "
"Samples in kernel functions may not be resolved if a suitable vmlinux\n"
			   "if a suitable vmlinux file is not found in the "
"file is not found in the buildid cache or in the vmlinux path.\n\n"
			   "buildid cache or in the vmlinux path.\n\n"
"Samples in kernel modules won't be resolved at all.\n\n"
			   "Samples in kernel modules won't be resolved "
"If some relocation was applied (e.g. kexec) symbols may be misresolved\n"
			   "at all.\n\n"
"even with a suitable vmlinux or kallsyms file.\n\n");
			   "If some relocation was applied (e.g. kexec) "
			   "symbols may be misresolved even with a suitable "
			   "vmlinux or kallsyms file.\n\n");


	if (no_buildid_cache || no_buildid)
	if (no_buildid_cache || no_buildid)
		disable_buildid_cache();
		disable_buildid_cache();
+7 −10
Original line number Original line Diff line number Diff line
@@ -281,17 +281,14 @@ static int __cmd_report(void)
	      kernel_kmap->ref_reloc_sym->addr == 0))) {
	      kernel_kmap->ref_reloc_sym->addr == 0))) {
		const struct dso *kdso = kernel_map->dso;
		const struct dso *kdso = kernel_map->dso;


		ui__warning("Kernel address maps "
		ui__warning(
			    "(/proc/{kallsyms,modules}) were restricted, "
"Kernel address maps (/proc/{kallsyms,modules}) were restricted.\n\n"
			    "check /proc/sys/kernel/kptr_restrict before "
"Check /proc/sys/kernel/kptr_restrict before running 'perf record'.\n\n%s\n\n"
			    "running 'perf record'.\n\n%s\n\n"
"Samples in kernel modules can't be resolved as well.\n\n",
			    "Samples in kernel modules can't be resolved "
			    "as well.\n\n",
			    RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION]) ?
			    RB_EMPTY_ROOT(&kdso->symbols[MAP__FUNCTION]) ?
			    "As no suitable kallsyms nor vmlinux was found, "
"As no suitable kallsyms nor vmlinux was found, kernel samples\n"
			    "kernel samples can't be resolved." :
"can't be resolved." :
			    "If some relocation was applied (e.g. kexec) "
"If some relocation was applied (e.g. kexec) symbols may be misresolved.");
			    "symbols may be misresolved.");
	}
	}


	if (dump_trace) {
	if (dump_trace) {