From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753124AbbFGNLR (ORCPT ); Sun, 7 Jun 2015 09:11:17 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:36192 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbbFGNLJ (ORCPT ); Sun, 7 Jun 2015 09:11:09 -0400 Date: Sun, 7 Jun 2015 15:11:04 +0200 From: Ingo Molnar To: Arnaldo Carvalho de Melo Cc: "Wangnan (F)" , Alexei Starovoitov , pi3orama , "linux-kernel@vger.kernel.org" , Adrian Hunter , Brendan Gregg , Daniel Borkmann , David Ahern , He Kuang , Jiri Olsa , Kaixu Xia , Madhavan Srinivasan , Masami Hiramatsu , Michael Ellerman , Namhyung Kim , Peter Zijlstra , Sukadev Bhattiprolu , Zefan Li , Alexei Starovoitov Subject: Re: [GIT PULL 0/6] perf/core improvements and fixes Message-ID: <20150607131104.GA24442@gmail.com> References: <20150604072153.GA18983@gmail.com> <557021D3.7070900@huawei.com> <20150604124033.GA10580@gmail.com> <0108CD89-BFFA-4A68-90AE-A34597777641@163.com> <20150604140412.GB14445@gmail.com> <55707B3F.2070704@plumgrid.com> <20150605064114.GA18341@gmail.com> <5571636F.1020403@huawei.com> <20150605120550.GA14097@gmail.com> <20150605140648.GJ32707@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150605140648.GJ32707@kernel.org> 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 * Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 05, 2015 at 02:05:50PM +0200, Ingo Molnar escreveu: > > * Wangnan (F) wrote: > > > > One problem I can find is that, the wrapper will make perf depend on llvm. I > > > don't think the compiler will be deployed in production environments... And > > > also, the embedded case... > > > What dependencies are there? > > > On the usage side there should be very few outright dependencies: if the llvm > > binary is not available, or doesn't support what you need, or there's no runtime > > environment you can use to build the bytecode, you should display an informative > > error message so that the user knows what is missing and how to install it. > > Right, something like: > > [acme@zoo ~]$ perf trace -e nanosleep usleep 1 > Error: No permissions to read /sys/kernel/debug/tracing/events/raw_syscalls/sys_(enter|exit) > Hint: Try 'sudo mount -o remount,mode=755 /sys/kernel/debug' > [acme@zoo ~]$ sudo mount -o remount,mode=755 /sys/kernel/debug > [sudo] password for acme: > [acme@zoo ~]$ perf trace -e nanosleep usleep 1 > 0.565 ( 0.060 ms): usleep/17648 nanosleep(rqtp: 0x7fff22baebf0) = 0 > [acme@zoo ~]$ perf trace --all-cpus > Error: Operation not permitted. > Hint: Check /proc/sys/kernel/perf_event_paranoid setting. > Hint: For system wide tracing it needs to be set to -1. > Hint: Try: 'sudo sh -c "echo -1 > /proc/sys/kernel/perf_event_paranoid"' > Hint: The current value is 1. > [acme@zoo ~]$ > [acme@zoo ~]$ trace -a -e poll usleep 1 > [acme@zoo ~]$ trace -a -e poll usleep 1 > 0.041 ( 0.000 ms): firefox/1458 ... [continued]: poll()) = 1 > 0.267 ( 0.003 ms): firefox/1458 poll(ufds: 0x7f43d6ea1340, nfds: 5) = 0 Timeout > 0.275 ( 0.001 ms): firefox/1458 poll(ufds: 0x7f43d6ea1340, nfds: 5) = 0 Timeout > 0.283 ( 0.001 ms): firefox/1458 poll(ufds: 0x7f43d6ea1340, nfds: 5) = 0 Timeout > 0.979 ( 0.000 ms): gnome-terminal/2572 ... [continued]: poll()) = 1 > 1.056 ( 0.768 ms): firefox/1458 poll(ufds: 0x7f43d6ea1340, nfds: 5, timeout_msecs: 4294967295) ... > 1.065 ( 0.009 ms): gnome-terminal/2572 poll(ufds: 0x1934250, nfds: 23, timeout_msecs: 10) = 1 > 1.087 ( 0.007 ms): gnome-terminal/2572 poll(ufds: 0x1934250, nfds: 23, timeout_msecs: 10) = 2 > 1.132 ( 0.007 ms): gnome-terminal/2572 poll(ufds: 0x1934250, nfds: 23, timeout_msecs: 10) = 1 > 1.161 ( 0.013 ms): gnome-terminal/2572 poll(ufds: 0x1934250, nfds: 23, timeout_msecs: 10) = 1 > [acme@zoo ~]$ > > I.e. Explain the mistake and provide a hint to solve it, as close to the actual > commands needed to perform such corrective/enabling action as possible. Yeah, I absolutely love such tooling hints. Thanks, Ingo