Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-09 Thread He Kuang
hi, Tom On 2015/3/3 3:55, Tom Zanussi wrote: BTW, I've actually tried to play around with the BPF samples/, but it seems they're not actually hooked into the system i.e. the samples Makefile doesn't build them, and it even looks for tools/llvm that's not there. I got as far as getting the late

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-03 Thread Tom Zanussi
On Tue, 2015-03-03 at 18:22 -0800, Alexei Starovoitov wrote: > On 3/3/15 7:47 AM, Tom Zanussi wrote: > > On Mon, 2015-03-02 at 18:31 -0800, Alexei Starovoitov wrote: > >> On Mon, Mar 2, 2015 at 5:18 PM, Tom Zanussi > >> wrote: > > >> I'm not proposing to use asm or C for this 'hist->bpf' tool. >

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-03 Thread Alexei Starovoitov
On 3/3/15 7:47 AM, Tom Zanussi wrote: On Mon, 2015-03-02 at 18:31 -0800, Alexei Starovoitov wrote: On Mon, Mar 2, 2015 at 5:18 PM, Tom Zanussi wrote: I'm not proposing to use asm or C for this 'hist->bpf' tool. Keep proposed 'hist:keys=...:vals=...' syntax and generate bpf program on the fly

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-03 Thread Tom Zanussi
On Mon, 2015-03-02 at 18:31 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 5:18 PM, Tom Zanussi > wrote: > >> > >> I'm saying keep the command line version of hist, but let > >> user space process it. > >> I don't buy the argument that you must run it in busybox > >> without any extra

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-03 Thread Tom Zanussi
On Tue, 2015-03-03 at 11:25 +0900, Masami Hiramatsu wrote: > (2015/03/03 1:00), Tom Zanussi wrote: > > This is v2 of my previously posted 'hashtriggers' patchset [1], but > > renamed to 'hist triggers' following feedback from v1. > > This is what I need :) The trigger interface gives us better fle

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 5:18 PM, Tom Zanussi wrote: >> >> I'm saying keep the command line version of hist, but let >> user space process it. >> I don't buy the argument that you must run it in busybox >> without any extra tools. >> If you're in busybox, the system is likely idle, so nothing >> to

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Masami Hiramatsu
(2015/03/03 1:00), Tom Zanussi wrote: > This is v2 of my previously posted 'hashtriggers' patchset [1], but > renamed to 'hist triggers' following feedback from v1. This is what I need :) The trigger interface gives us better flexibility for environment. With this series I believe the 80% use of "

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Tom Zanussi
On Mon, 2015-03-02 at 16:01 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 11:55 AM, Tom Zanussi > wrote: > > > > I disagree that it would be rarely used. In fact, it would probably > > cover about 80% of the use cases that people initially use things like > > systemtap or dtrace for,

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 11:55 AM, Tom Zanussi wrote: > > I disagree that it would be rarely used. In fact, it would probably > cover about 80% of the use cases that people initially use things like > systemtap or dtrace for, which I guess is what ebpf is shooting for. 'hist' style won't solve any

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Karim Yaghmour
On 15-03-02 03:48 PM, Alexei Starovoitov wrote: > good. thanks for explaining. > all makes sense now. > > btw, that fancy systrace seems to be parsing text from trace_pipe > https://android.googlesource.com/platform/external/chromium-trace/+/jb-dev/src/tracing/linux_perf_importer.js > with a bunc

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Karim Yaghmour
On 15-03-02 03:48 PM, Alexei Starovoitov wrote: > good. thanks for explaining. > all makes sense now. > > btw, that fancy systrace seems to be parsing text from trace_pipe > https://android.googlesource.com/platform/external/chromium-trace/+/jb-dev/src/tracing/linux_perf_importer.js > with a bunc

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 12:43 PM, Steven Rostedt wrote: > On Mon, 2 Mar 2015 15:39:48 -0500 > Steven Rostedt wrote: > >> On Mon, 2 Mar 2015 12:33:34 -0800 >> Alexei Starovoitov wrote: >> >> > On Mon, Mar 2, 2015 at 11:49 AM, Karim Yaghmour >> > wrote: >> > > >> > > On 15-03-02 02:45 PM, Steven R

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 15:39:48 -0500 Steven Rostedt wrote: > On Mon, 2 Mar 2015 12:33:34 -0800 > Alexei Starovoitov wrote: > > > On Mon, Mar 2, 2015 at 11:49 AM, Karim Yaghmour > > wrote: > > > > > > On 15-03-02 02:45 PM, Steven Rostedt wrote: > > >> Interesting. The Android devices I have still

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 12:33:34 -0800 Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 11:49 AM, Karim Yaghmour > wrote: > > > > On 15-03-02 02:45 PM, Steven Rostedt wrote: > >> Interesting. The Android devices I have still have it enabled (rooted, > >> but still running the stock system). > > > >

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Karim Yaghmour
On 15-03-02 03:33 PM, Alexei Starovoitov wrote: > that's interesting. thanks for the link. > > I don't see tracing being explicitly enabled in defconfig: > https://source.android.com/devices/tech/kernel.html > or here: > https://android.googlesource.com/kernel/common/+/android-3.10/android/config

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 11:49 AM, Karim Yaghmour wrote: > > On 15-03-02 02:45 PM, Steven Rostedt wrote: >> Interesting. The Android devices I have still have it enabled (rooted, >> but still running the stock system). > > I don't know that there's any policy to disable tracing on Android. The > And

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Tom Zanussi
Hi Alexei, On Mon, 2015-03-02 at 11:14 -0800, Alexei Starovoitov wrote: > On Mon, Mar 2, 2015 at 8:00 AM, Tom Zanussi > wrote: > > > > # echo 'hist:keys=common_pid.execname,id.syscall:vals=hitcount' > \ > > /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger > > > > # cat

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Karim Yaghmour
On 15-03-02 02:45 PM, Steven Rostedt wrote: > Interesting. The Android devices I have still have it enabled (rooted, > but still running the stock system). I don't know that there's any policy to disable tracing on Android. The Android framework in fact has generally been instrumented by Google i

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 11:36:36 -0800 Alexei Starovoitov wrote: > > Make sure it also works on android. > > the sad part is that tracing is off on android... > so all of tracefs is actually compiled out there... > and probably will be if we keep adding rarely used code to it. Interesting. The Andro

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 11:31 AM, Steven Rostedt wrote: > On Mon, 2 Mar 2015 11:14:54 -0800 > Alexei Starovoitov wrote: > >> I think we both want to see in-kernel aggregation. >> This 'hist' stuff is trying to do counting and even map sorting >> in the kernel, whereas with bpf programs I'm moving

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Steven Rostedt
On Mon, 2 Mar 2015 11:14:54 -0800 Alexei Starovoitov wrote: > I think we both want to see in-kernel aggregation. > This 'hist' stuff is trying to do counting and even map sorting > in the kernel, whereas with bpf programs I'm moving > all of these decisions to user space. > I understand your des

Re: [PATCH v2 00/15] tracing: 'hist' triggers

2015-03-02 Thread Alexei Starovoitov
On Mon, Mar 2, 2015 at 8:00 AM, Tom Zanussi wrote: > > # echo 'hist:keys=common_pid.execname,id.syscall:vals=hitcount' > \ > /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger > > # cat /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/hist > > key: common_pid:bash