From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754527AbbJSR5N (ORCPT ); Mon, 19 Oct 2015 13:57:13 -0400 Received: from mail.kernel.org ([198.145.29.136]:32947 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594AbbJSR5M (ORCPT ); Mon, 19 Oct 2015 13:57:12 -0400 Date: Mon, 19 Oct 2015 14:57:06 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Wang Nan Subject: Re: [PATCH 1/2] perf test: Silence tracepoint event failures Message-ID: <20151019175706.GA3215@kernel.org> References: <1445268229-1601-1-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445268229-1601-1-git-send-email-namhyung@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Oct 20, 2015 at 12:23:48AM +0900, Namhyung Kim escreveu: > Currently, when perf test is run by a normal user, it'll fail to access > tracepoint events. However the output is somewhat messy since it tries > to be nice with long error messages and hints. IMHO it's not needed > for 'perf test' by default and AFAIK the perf test uses pr_debug() > rather than pr_err() for such messages so that one can use -v option to > see further details on failed testcases if needed. > > Before: > $ perf test > 1: vmlinux symtab matches kallsyms : FAILED! > 2: detect openat syscall event :Error: > No permissions to read > /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat > Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing' > FAILED! > 3: detect openat syscall event on all cpus :Error: > No permissions to read > /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat > Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing' > FAILED! > ... > > After: > $ perf test > 1: vmlinux symtab matches kallsyms : FAILED! > 2: detect openat syscall event : FAILED! > 3: detect openat syscall event on all cpus : FAILED! > ... > > $ perf test -v 2 > 2: detect openat syscall event : > --- start --- > test child forked, pid 30575 > Error: No permissions to read > /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat > Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing' > > test child finished with -1 > ---- end ---- > detect openat syscall event: FAILED! Here I get useless informational messages about registering plugins, guess those should move to pr_debug2, no? Anyway, applying the patch, the common case is to run 'perf test'. [acme@zoo linux]$ perf test -v 2 2: detect openat syscall event : --- start --- test child forked, pid 22866 registering plugin: /home/acme/.traceevent/plugins/plugin_function.so registering plugin: /home/acme/.traceevent/plugins/plugin_mac80211.so registering plugin: /home/acme/.traceevent/plugins/plugin_scsi.so registering plugin: /home/acme/.traceevent/plugins/plugin_hrtimer.so registering plugin: /home/acme/.traceevent/plugins/plugin_sched_switch.so registering plugin: /home/acme/.traceevent/plugins/plugin_cfg80211.so registering plugin: /home/acme/.traceevent/plugins/plugin_kmem.so registering plugin: /home/acme/.traceevent/plugins/plugin_kvm.so registering plugin: /home/acme/.traceevent/plugins/plugin_xen.so registering plugin: /home/acme/.traceevent/plugins/plugin_jbd2.so Error: No permissions to read /sys/kernel/debug/tracing/events/syscalls/sys_enter_openat Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing' test child finished with -1 ---- end ---- detect openat syscall event: FAILED! [acme@zoo linux]$