Re: [GIT PULL 0/6] perf/core improvements and fixes

From: Arnaldo Carvalho de Melo
Date: Fri Jun 05 2015 - 10:07:45 EST


Em Fri, Jun 05, 2015 at 02:05:50PM +0200, Ingo Molnar escreveu:
> * Wangnan (F) <wangnan0@xxxxxxxxxx> wrote:
<SNIP>
> > 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.

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/