[PATCH 3/9] perf hists: Free srcline when freeing hist_entry

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim We've been leaked srcline of hist_entry, it should be freed also. Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 46a0d35a05e1..e6c11ccf138c 100644 --- a/

[PATCH 1/9] perf sort: Fix a memory leak on srcline

2013-07-31 Thread Namhyung Kim
From: Namhyung Kim In the hist_entry__srcline_snprintf(), path and self->srcline are pointing the same memory region, but they are doubly allocated. Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/perf/u

Re: [PATCH 01/17] perf util: Save pid-cmdline mapping into tracing header

2013-08-05 Thread Namhyung Kim
Hi Arnaldo, On Wed, 31 Jul 2013 11:07:46 -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Jul 31, 2013 at 09:51:54AM +0900, Namhyung Kim escreveu: >> 2013-07-30 오후 10:28, Arnaldo Carvalho de Melo 쓴 글: >> >Em Tue, Jul 30, 2013 at 06:18:58PM +0900, Namhyung Kim escreveu: >&

Re: [PATCHSET 00/17] perf tools: Introduce new 'ftrace' command (v4)

2013-08-05 Thread Namhyung Kim
Hi Ingo and Jiri, On Fri, 2 Aug 2013 11:16:59 +0200, Ingo Molnar wrote: > * Jiri Olsa wrote: > >> On Tue, Jul 30, 2013 at 06:18:57PM +0900, Namhyung Kim wrote: >> > This patchset implements a front-end tool for kernel's ftrace. It >> > uses function_graph tr

Re: [PATCH 2/5] tools, perf: Add support to evsel for enabling counters

2013-08-05 Thread Namhyung Kim
Hi Andi, On Fri, 2 Aug 2013 17:41:10 -0700, Andi Kleen wrote: > From: Andi Kleen > > Add support for enabling already set up counters by using an > ioctl. I share some code with the filter setup. > > Signed-off-by: Andi Kleen > --- > tools/perf/util/evsel.c | 21 ++--- > tools/

Re: [PATCH 01/13] tracing/kprobes: Move fetch functions to trace_kprobe.c

2013-08-05 Thread Namhyung Kim
Hi Masami, On Mon, 05 Aug 2013 14:30:35 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Hyeoncheol Lee >> >> Move kprobes-specific fetch functions to the trace_kprobe.c file. >> Also define kprobes_fetch_type_table in the .c file. T

Re: [PATCH 09/13] tracing/uprobes: Fix a comment for uprobe registration syntax

2013-08-05 Thread Namhyung Kim
On Mon, 05 Aug 2013 14:59:59 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Namhyung Kim >> >> The uprobe syntax requires an offset after a file path not a symbol. > > Is this a bugfix? If so, IMHO, it should be applied earlier in

Re: [PATCH 04/13] tracing/kprobes: Factor out struct trace_probe

2013-08-05 Thread Namhyung Kim
On Mon, 05 Aug 2013 15:00:25 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Namhyung Kim >> >> There are functions that can be shared to both of kprobes and uprobes. >> Separate common data structure to struct trace_probe and use it f

Re: [PATCH 06/13] tracing/kprobes: Move common functions to trace_probe.c

2013-08-05 Thread Namhyung Kim
On Mon, 05 Aug 2013 15:03:48 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Namhyung Kim >> >> The __get_data_size() and store_trace_args() will be used by uprobes >> too. Move them to a common location. > > Hmm, could you mo

Re: [PATCH 13/13] tracing/probes: Fix basic print type functions

2013-08-05 Thread Namhyung Kim
On Mon, 05 Aug 2013 15:22:10 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Namhyung Kim >> >> The print format of s32 type was "ld" and it's casted to "long". So >> it turned out to print 4294967295 for &q

Re: [PATCH 13/13] tracing/probes: Fix basic print type functions

2013-08-05 Thread Namhyung Kim
Hi Joe, On Sun, 04 Aug 2013 23:31:57 -0700, Joe Perches wrote: > On Mon, 2013-08-05 at 15:22 +0900, Masami Hiramatsu wrote: >> (2013/07/31 18:03), Namhyung Kim wrote: >> > From: Namhyung Kim >> > >> > The print format of s32 type was "ld" and it

Re: [PATCH 02/13] tracing/kprobes: Add fetch{,_size} member into symbol and deref fetch method

2013-08-05 Thread Namhyung Kim
On Mon, 05 Aug 2013 17:19:50 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Hyeoncheol Lee >> >> Those symbol and deref fetch methods access a memory region but they >> assume it's a kernel memory since uprobes does not supp

Re: [PATCH] RFC: perf, tools: Move gtk browser into separate perfgtk executable

2013-08-05 Thread Namhyung Kim
Hi, On Mon, 5 Aug 2013 01:23:20 -0700, Christoph Hellwig wrote: > On Mon, Aug 05, 2013 at 10:16:41AM +0200, Ingo Molnar wrote: >> If you want fewer dependencies then build with 'make NO_GTK=1'. > > Doesn't help the distros. Installing perf and pulling all the graphics > libraries in is highly ann

[PATCH 1/4] perf ui/gtk: Fix segmentation fault on perf_hpp__for_each_format loop

2013-08-05 Thread Namhyung Kim
From: Namhyung Kim The commit 2b8bfa6bb8a7 ("perf tools: Centralize default columns init in perf_hpp__init") moves initialization of common overhead column to perf_hpp__init() but forgot about the gtk code. So the gtk code added the same column to the list twice causing infinite

[PATCH/RFC 0/4] perf ui/gtk: Separate out GTK code to a shared object (v2)

2013-08-05 Thread Namhyung Kim
git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks Namhyung Cc: Pekka Enberg Cc: Andi Kleen Namhyung Kim (4): perf ui/gtk: Fix segmentation fault on perf_hpp__for_each_format loop perf tools: Separate out GTK codes to libperf-gtk.so p

[PATCH 3/4] perf tools: Setup GTK browser dynamically

2013-08-05 Thread Namhyung Kim
Call setup/exit GTK browser function using libdl. Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/gtk.h | 3 +++ tools/perf/ui/setup.c | 51 +++-- tools/perf/ui/ui.h | 12 +--- 3 files changed, 53

[PATCH 2/4] perf tools: Separate out GTK codes to libperf-gtk.so

2013-08-05 Thread Namhyung Kim
Separate out GTK codes to a shared object called libperf-gtk.so. This time only GTK codes are built with -fPIC and libperf remains as is. Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Makefile| 39 --- tools/perf/config

[PATCH 4/4] perf tools: Run dynamic loaded GTK browser

2013-08-05 Thread Namhyung Kim
Run GTK hist and annotation browser using libdl. Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 26 +++--- tools/perf/builtin-report.c | 16 ++-- tools/perf/config/Makefile| 2 +- tools/perf/ui/gtk

Re: [PATCH v2 1/2] perf tools: Add support for pinned modifier

2013-08-06 Thread Namhyung Kim
> # 0.11 stalled cycles per insn [11.13%] > > As you can see although perf does a very good job of scaling the values > in the non-pinned case, there is some small discrepancy. > > The patch is fairly straight forward, the one detail is that we need to

Re: [PATCH v2 2/2] perf tests: Add tests of new pinned modifier

2013-08-06 Thread Namhyung Kim
On Tue, 6 Aug 2013 23:28:06 +1000, Michael Ellerman wrote: > Add a negative test to test__checkevent_pmu_events() to get lots of > coverage of the negative case, ie. when the modifier is not specified. > > Add a test of a single event, and of the group case. Acked-by: Namhyung

Re: [PATCH V9 01/14] perf tools: add debug prints

2013-08-06 Thread Namhyung Kim
Hi Adrian, On Mon, 5 Aug 2013 19:26:21 +0300, Adrian Hunter wrote: > It is useful to see the arguments to perf_event_open > and whether the perf events ring buffer was mmapped > per-cpu or per-thread. That information will now be > displayed when verbose is 2 i.e option -vv > [SNIP] > > +stati

Re: [PATCH V9 04/14] perf tools: change machine__findnew_thread() to set thread pid

2013-08-07 Thread Namhyung Kim
On Mon, 5 Aug 2013 19:26:24 +0300, Adrian Hunter wrote: > Add a new parameter for 'pid' to machine__findnew_thread(). > Change callers to pass 'pid' when it is known. > [SNIP] > @@ -198,7 +198,7 @@ static int perf_event__inject_buildid(struct perf_tool > *tool, > > cpumode = event->heade

Re: [PATCH V9 05/14] perf tools: tidy up sample parsing overflow checking

2013-08-07 Thread Namhyung Kim
On Mon, 5 Aug 2013 19:26:25 +0300, Adrian Hunter wrote: > The size of data retrieved from a sample event must be > validated to ensure it does not go past the end of the > event. That was being done sporadically and without > considering integer overflows. Wouldn't it be great if the macro (or s

Re: [PATCH V9 08/14] perf tools: move struct ip_event

2013-08-07 Thread Namhyung Kim
On Mon, 5 Aug 2013 19:26:28 +0300, Adrian Hunter wrote: > struct ip_event assumes fixed positions for ip, pid > and tid. That is no longer true with the addition of > PERF_SAMPLE_IDENTIFIER. > > struct ip_event is no longer used except by hists_link.c. > Move it there. I think you can just get r

Re: [PATCH V9 04/14] perf tools: change machine__findnew_thread() to set thread pid

2013-08-07 Thread Namhyung Kim
On Wed, 07 Aug 2013 11:34:23 +0300, Adrian Hunter wrote: > On 07/08/13 10:51, Namhyung Kim wrote: >> On Mon, 5 Aug 2013 19:26:24 +0300, Adrian Hunter wrote: >>> Add a new parameter for 'pid' to machine__findnew_thread(). >>> Change callers to pass

Re: [PATCH V9 01/14] perf tools: add debug prints

2013-08-07 Thread Namhyung Kim
On Wed, 07 Aug 2013 11:13:23 +0300, Adrian Hunter wrote: > On 07/08/13 09:44, Namhyung Kim wrote: >> Things like this likely being ended up with typo. How about this? (not >> tested) > > And yet there aren't any typos. Yes, but there's a possibility of adding o

Re: [PATCH V9 05/14] perf tools: tidy up sample parsing overflow checking

2013-08-07 Thread Namhyung Kim
On Wed, 07 Aug 2013 11:19:32 +0300, Adrian Hunter wrote: > On 07/08/13 11:09, Namhyung Kim wrote: >> On Mon, 5 Aug 2013 19:26:25 +0300, Adrian Hunter wrote: >>> The size of data retrieved from a sample event must be >>> validated to ensure it does not go past the end

[PATCH 1/3] perf tools: Separate out GTK codes to libperf-gtk.so

2013-08-07 Thread Namhyung Kim
Separate out GTK codes to a shared object called libperf-gtk.so. This time only GTK codes are built with -fPIC and libperf remains as is. Cc: Andi Kleen Reviewed-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Makefile| 39 --- tools

[PATCH/RFC 0/3] perf ui/gtk: Separate out GTK code to a shared object (v3)

2013-08-07 Thread Namhyung Kim
f previous series already merged You can find it on my 'perf/separate-v3' branch in my tree at: git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks Namhyung Cc: Pekka Enberg Cc: Andi Kleen Namhyung Kim (3): perf tools: Separ

[PATCH 3/3] perf tools: Run dynamic loaded GTK browser

2013-08-07 Thread Namhyung Kim
Run GTK hist and annotation browser using libdl. Cc: Andi Kleen Reviewed-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 26 +++--- tools/perf/builtin-report.c | 16 ++-- tools/perf/config/Makefile| 2 +- tools/perf/ui

[PATCH 2/3] perf tools: Setup GTK browser dynamically

2013-08-07 Thread Namhyung Kim
Call setup/exit GTK browser function using libdl. Cc: Andi Kleen Reviewed-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/gtk.h | 3 +++ tools/perf/ui/setup.c | 50 +++-- tools/perf/ui/ui.h | 12 +--- 3 files

Re: [PATCH 01/17] perf util: Save pid-cmdline mapping into tracing header

2013-08-08 Thread Namhyung Kim
Hi David, On Wed, 07 Aug 2013 09:44:24 -0400, David Ahern wrote: > On 8/5/13 3:17 AM, Namhyung Kim wrote: >>> I don't think this is a problem, its in line with Ingo's suggestion of a >>> new perf ioctl to ask the kernel to generate PERF_RECORD_MMAP events for

Re: [PATCH 1/3] perf tools: Separate out GTK codes to libperf-gtk.so

2013-08-08 Thread Namhyung Kim
Hi Arnaldo, On Thu, 8 Aug 2013 12:21:16 -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Aug 08, 2013 at 03:34:08PM +0900, Namhyung Kim escreveu: >> Separate out GTK codes to a shared object called libperf-gtk.so. This >> time only GTK codes are built with -fPIC and libper

[PATCH 3/3] perf tools: Run dynamic loaded GTK browser

2013-08-08 Thread Namhyung Kim
Run GTK hist and annotation browser using libdl. Cc: Andi Kleen Reviewed-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 26 +++--- tools/perf/builtin-report.c | 16 ++-- tools/perf/config/Makefile| 2 +- tools/perf/ui

[PATCH 0/3] perf ui/gtk: Separate out GTK code to a shared object (v4)

2013-08-08 Thread Namhyung Kim
t.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks Namhyung Cc: Pekka Enberg Cc: Andi Kleen Namhyung Kim (3): perf tools: Separate out GTK codes to libperf-gtk.so perf tools: Setup GTK browser dynamically perf tools: Run dynamic loaded GTK

[PATCH 1/3] perf tools: Separate out GTK codes to libperf-gtk.so

2013-08-08 Thread Namhyung Kim
Separate out GTK codes to a shared object called libperf-gtk.so. This time only GTK codes are built with -fPIC and libperf remains as is. Cc: Andi Kleen Reviewed-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Makefile| 42 ++ tools

[PATCH 2/3] perf tools: Setup GTK browser dynamically

2013-08-08 Thread Namhyung Kim
Call setup/exit GTK browser function using libdl. Cc: Andi Kleen Reviewed-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/gtk.h | 3 +++ tools/perf/ui/setup.c | 50 +++-- tools/perf/ui/ui.h | 12 +--- 3 files

Re: [PATCH 03/13] tracing/kprobes: Make stack and memory fetch functions static

2013-08-09 Thread Namhyung Kim
Hi Masami-san, On Mon, 05 Aug 2013 18:04:09 +0900, Masami Hiramatsu wrote: > (2013/07/31 18:03), Namhyung Kim wrote: >> From: Namhyung Kim >> >> Those fetch functions need to be implemented differently for kprobes >> and uprobes. Since the symbol and deref fetch fu

Re: [PATCH 10/23] perf tools: Introduce swap_header function

2013-07-19 Thread Namhyung Kim
On Wed, 17 Jul 2013 19:49:50 +0200, Jiri Olsa wrote: > Introducing swap_header function to make the swapping > code more clear and extensible. [SNIP] > > +static int swap_header(struct perf_file_header *header) > +{ > + mem_bswap_64(header, offsetof(struct perf_file_header, adds_features));

Re: [PATCH 13/23] perf tools: Introduce perf.data version 3 format

2013-07-19 Thread Namhyung Kim
On Wed, 17 Jul 2013 19:49:53 +0200, Jiri Olsa wrote: > Introducing perf.data version 3 format. No functional change, > just introducing doc, magic bytes and the struct. > [SNIP] > +perf-data-file-v3(1) s/(1)/(5)/ The same goes to v2 doc. > + > +Following text describes vers

Re: [PATCH 15/23] perf tools: Add perf data version 3 header read

2013-07-19 Thread Namhyung Kim
On Wed, 17 Jul 2013 19:49:55 +0200, Jiri Olsa wrote: > Adding perf data version 3 header read code to load > data for v3 format. > [SNIP] > + > + session = container_of(header, struct perf_session, header); > + if (session->evlist) > + return 0; I guess we need version check he

Re: [PATCH 18/23] perf tools: Move synthetizing into single function

2013-07-19 Thread Namhyung Kim
Cc: Ingo Molnar > Cc: Namhyung Kim > Cc: Paul Mackerras > Cc: Peter Zijlstra > Cc: Arnaldo Carvalho de Melo > Cc: Andi Kleen > Cc: David Ahern > --- > tools/perf/builtin-record.c | 155 > ++-- > 1 file changed, 91 inserti

Re: [PATCH 22/23] perf tools: Add multi file '-M' option for record command

2013-07-19 Thread Namhyung Kim
On Wed, 17 Jul 2013 19:50:02 +0200, Jiri Olsa wrote: > Adding multi file '-M' option for record command to store > split event data into multiple files based on the file > size specified as an argument to the option. It seems you need to update the doc too. :) Thanks, Namhyung -- To unsubscribe f

[PATCH 02/13] tracing/probes: Fix basic print type functions

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim The print format of s32 type was "ld" and it's casted to "long". So it turned out to print 4294967295 for "-1" on 64-bit systems. Not sure whether it worked well on 32-bit systems. Anyway, it'd be better if we have exact format an

[PATCH 11/13] tracing/kprobes: Add priv argument to fetch functions

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim This argument is for passing private data structure to each fetch function and will be used by uprobes. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace

[PATCH 08/13] tracing/kprobes: Move common functions to trace_probe.h

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim The __get_data_size() and store_trace_args() will be used by uprobes too. Move them to a common location. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace

[PATCH 13/13] tracing/uprobes: Add support for full argument access methods

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim Enable to fetch other types of argument for the uprobes. IOW, we can access stack, memory, deref, bitfield and retval from uprobes now. Original-patch-by: Hyeoncheol Lee Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho

[PATCH 12/13] tracing/uprobes: Add more fetch functions

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim Implement uprobe-specific stack and memory fetch functions and add them to the uprobes_fetch_type_table. Other fetch fucntions will be shared with kprobes. Original-patch-by: Hyeoncheol Lee Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi

[PATCH 09/13] tracing/kprobes: Integrate duplicate set_print_fmt()

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim The set_print_fmt() functions are implemented almost same for [ku]probes. Move it to a common place and get rid of the duplication. Acked-by: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung

[PATCH 07/13] tracing/uprobes: Convert to struct trace_probe

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim Convert struct trace_uprobe to make use of the common trace_probe structure. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_uprobe.c | 151

[PATCH 10/13] tracing/uprobes: Fetch args before reserving a ring buffer

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim Fetching from user space should be done in a non-atomic context. So use a temporary buffer and copy its content to the ring buffer atomically. While at it, use __get_data_size() and store_trace_args() to reduce code duplication. Cc: Masami Hiramatsu Cc: Srikar Dronamraju

[PATCHSET 00/13] tracing/uprobes: Add support for more fetch methods (v3)

2013-08-09 Thread Namhyung Kim
Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Hyeoncheol Lee (2): tracing/kprobes: Move fetch functions to trace_kprobe.c tracing/kprobes: Add fetch{,_size} member into deref fetch method Namhyung Kim (11): tracing/uprobes: Fix a comment for uprobe registration syntax tr

[PATCH 06/13] tracing/kprobes: Factor out struct trace_probe

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim There are functions that can be shared to both of kprobes and uprobes. Separate common data structure to struct trace_probe and use it from the shared functions. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo

[PATCH 05/13] tracing/kprobes: Staticize stack and memory fetch functions

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim Those fetch functions need to be implemented differently for kprobes and uprobes. Since the deref fetch functions don't call those directly anymore, we can make them static and implement them separately. Cc: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nestero

[PATCH 03/13] tracing/kprobes: Move fetch functions to trace_kprobe.c

2013-08-09 Thread Namhyung Kim
: Namhyung Kim --- kernel/trace/trace_kprobe.c | 169 + kernel/trace/trace_probe.c | 299 +--- kernel/trace/trace_probe.h | 132 +++ 3 files changed, 335 insertions(+), 265 deletions(-) diff --git a/kernel/trace

[PATCH 04/13] tracing/kprobes: Add fetch{,_size} member into deref fetch method

2013-08-09 Thread Namhyung Kim
Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Hyeoncheol Lee [namhy...@kernel.org: Split original patch into pieces as requested] Signed-off-by: Namhyung Kim --- kernel/trace/trace_probe.c | 22 -- 1 file changed, 20 inser

[PATCH 01/13] tracing/uprobes: Fix a comment for uprobe registration syntax

2013-08-09 Thread Namhyung Kim
From: Namhyung Kim The uprobe syntax requires an offset after a file path not a symbol. Reviewed-by: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace/trace_uprobe.c | 2 +- 1 file changed

Re: [PATCHSET 00/17] perf tools: Introduce new 'ftrace' command (v4)

2013-08-12 Thread Namhyung Kim
Hi Jiri and Jeremy, On Fri, 9 Aug 2013 12:23:06 +0200, Jiri Olsa wrote: > On Tue, Jul 30, 2013 at 06:18:57PM +0900, Namhyung Kim wrote: >> This patchset implements a front-end tool for kernel's ftrace. It >> uses function_graph tracer by default and normal function tracer

Re: [PATCH 0/3] perf: add a dummy software event to keep tracking

2013-08-12 Thread Namhyung Kim
Hi Adrian, On Wed, 7 Aug 2013 16:30:28 +0300, Adrian Hunter wrote: > Hi > > This is an alternative to the 'keep tracking' flag patch > which is here: > > http://marc.info/?l=linux-kernel&m=137242545521246&w=2 > > perf tools is updated and a test added to demonstrate the > new event. It loo

Re: [PATCH 3/3] perf tools: add 'keep tracking' test

2013-08-12 Thread Namhyung Kim
On Wed, 7 Aug 2013 16:30:31 +0300, Adrian Hunter wrote: > Add a test for the newly added PERF_COUNT_SW_DUMMY event. > The test checks that tracking events continue when an > event is disabled but a dummy software event is not > disabled. [SNIP] > +int test__keep_tracking(void) > +{ > + struc

Re: [PATCH V10 01/13] perf tools: add debug prints

2013-08-12 Thread Namhyung Kim
s below, but other than that it looks good, so Acked-by: Namhyung Kim [SNIP] > +#define __PRINT_ATTR(fmt, cast, field) \ > + fprintf(fp, " %-19s "fmt"\n", #field, cast attr->field) > + > +#define PRINT_ATTR_U32(field) __PRINT_ATTR("%u" , , f

Re: [PATCH V10 04/13] perf tools: change machine__findnew_thread() to set thread pid

2013-08-12 Thread Namhyung Kim
On Fri, 9 Aug 2013 13:51:50 +0300, Adrian Hunter wrote: > Add a new parameter for 'pid' to machine__findnew_thread(). > Change callers to pass 'pid' when it is known. I think the changelog should mention the subtlety of passing pid/tid to prevent possible future misusages. Thanks, Namhyung -- To

Re: [PATCH V10 06/13] perf tools: remove unnecessary callchain validation

2013-08-12 Thread Namhyung Kim
On Fri, 9 Aug 2013 13:51:52 +0300, Adrian Hunter wrote: > Now that the sample parsing correctly checks data sizes > there is no reason for it to be done again for callchains. Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCH V10 07/13] perf tools: remove references to struct ip_event

2013-08-12 Thread Namhyung Kim
On Fri, 9 Aug 2013 13:51:53 +0300, Adrian Hunter wrote: > struct ip_event assumes fixed positions for ip, pid > and tid. That is no longer true with the addition of > PERF_SAMPLE_IDENTIFIER. The information is anyway in > struct sample, so use that instead. Acked-by: Namhyung

Re: [PATCH V10 09/13] perf tools: move perf_evlist__config() to a new source file

2013-08-12 Thread Namhyung Kim
function for event recording. It is used by > tools to apply recording options to perf_evlist. It is > not used by the Python API. Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [PATCH] perf: add callgrind conversion tool

2013-03-03 Thread Namhyung Kim
Hi Roberto, On Wed, 27 Feb 2013 00:26:33 +0100, Roberto Vitillo wrote: > The proposed patch adds the convert tool to perf which allows to convert a > perf.data file to a callgrind data file which can subsequently be displayed > with kcachegrind. Callgraphs are not supported. I was thinking about

[PATCH 00/12] perf annotate: Add support for event group view (v2)

2013-03-04 Thread Namhyung Kim
00 :387dc0aa84: retq ... You can access it via perf/annotate-group-v2 branch on my tree git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks Namhyung Namhyung Kim (12): perf annotate: Pass evsel instead of evidx on annotation fu

[PATCH 09/12] perf annotate browser: Make browser_disasm_line->percent an array

2013-03-04 Thread Namhyung Kim
Make percent field of struct browser_disasm_line an array and move it to the last. This is a preparation of event group view feature. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/perf

[PATCH 11/12] perf annotate browser: Support event group view on TUI

2013-03-04 Thread Namhyung Kim
Dynamically allocate browser_disasm_line according to a number of group members and save nr_pcnt to the struct. This way we can handle multiple events in a general manner. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c | 67 +-- 1 file

[PATCH 05/12] perf annotate: Add basic support to event group view

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim Add --group option to enable event grouping. When enabled, all the group members information will be shown with the leader so skip non-leader events. It only supports --stdio output currently. Later patches will extend additional features. $ perf annotate --group --stdio

[PATCH 07/12] perf annotate: Factor out struct source_line_percent

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim The source_line_percent struct contains percentage value of the symbol histogram. This is a preparation of event group view change. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c | 2 +- tools/perf/util/annotate.c| 14 +++--- tools/perf

[PATCH 12/12] perf annotate/gtk: Support event group view on GTK

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim Add support for event group view to GTK annotation browser. Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/annotate.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/ui

[PATCH 10/12] perf annotate browser: Use disasm__calc_percent()

2013-03-04 Thread Namhyung Kim
The disasm_line__calc_percent() which was used by annotate browser code almost duplicates disasm__calc_percent. Let's get rid of the code duplication. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c | 50 +++ tools/perf/util/annot

[PATCH 08/12] perf annotate: Support event group view for --print-line

2013-03-04 Thread Namhyung Kim
0.00 /build/buildd/eglibc-2.11.1/elf/do-rel.h:105 0.00 75.00 /build/buildd/eglibc-2.11.1/elf/dynamic-link.h:137 0.00 25.00 /build/buildd/eglibc-2.11.1/elf/dynamic-link.h:187 ... Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 130

[PATCH 06/12] perf evsel: Introduce perf_evsel__is_group_event() helper

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim The perf_evsel__is_group_event function is for checking whether given evsel needs event group view support or not. Please note that it's different to the existing perf_evsel__is_group_leader() which checks only the given evsel is a leader or a standalone (i.e. non-

[PATCH 03/12] perf annotate: Factor out disasm__calc_percent()

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim Factor out calculation of histogram of a symbol into disasm__calc_percent. It'll be used for later changes. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 49 -- 1 file changed, 30 insertions(+), 19 dele

[PATCH 01/12] perf annotate: Pass evsel instead of evidx on annotation functions

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim Pass evsel instead of evidx. This is a preparation for supporting event group view in annotation and no functional change is intended. Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 16 +--- tools/perf/builtin-top.c | 2 +- tools

[PATCH 04/12] perf annotate: Cleanup disasm__calc_percent()

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim The loop end condition is calculated from next disasm_line or the symbol size if it's the last disasm_line. But it doesn't need to be calculated at every iteration. Moving it out of the function can simplify code a bit. Also the src_line doesn't need to be c

[PATCH 02/12] perf annotate: Add a comment on the symbol__parse_objdump_line()

2013-03-04 Thread Namhyung Kim
From: Namhyung Kim The symbol__parse_objdump_line() parses result of the objdump run but it's hard to follow if one doesn't know the output format of the objdump. Add a head comment on the function to help her. Signed-off-by: Namhyung Kim --- tools/perf/util/annot

[PATCH 1/2] perf top: Fix -E option behavior

2013-05-12 Thread Namhyung Kim
From: Namhyung Kim The -E/--entries option controls how many lines to be printed on stdio output but it doesn't work as it should be: If -E option is specified, print that many lines regardless of current window size, if not automatically adjust number of lines printed to fit into the w

[PATCH 2/2] perf top: Fix percent output when no samples collected

2013-05-12 Thread Namhyung Kim
From: Namhyung Kim If there's no sample, kernel and exact percent output at the header looked like "-nan%". Signed-off-by: Namhyung Kim --- tools/perf/util/top.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/top

[PATCH 2/3] perf hists: Move locking to its call-sites

2013-05-12 Thread Namhyung Kim
From: Namhyung Kim It's a preparation patch to eliminate unneeded locking in the perf report path. Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 26 ++ tools/perf/builtin-top.c| 3 +++ tools/perf/util/hist.c | 6 +- 3 files change

[PATCH 1/3] perf top: Get rid of *_threaded() functions

2013-05-12 Thread Namhyung Kim
From: Namhyung Kim Those _threaded() functions are needed to make hist tree handling thread-safe, but AFAICS the only thing it does is forcing it to use the intermediate 'collapsed' tree. It can be acheived by setting sort__need_collapse to 1 in cmd_top() so no need to keep those

[PATCH 3/3] perf report: Don't be bothered with locking when adding hist entries

2013-05-12 Thread Namhyung Kim
From: Namhyung Kim The perf report is single-threaded, so no need to grab a lock. Although the fast path of pthread_mutex_[un]lock() is very fast, there's ~3% gain by eliminating it when we have huge sample data. $ perf record -a -F 10 -o perf.data.bench -- perf bench sched all $

[PATCH 1/2] perf report: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim The --percent-limit option is for not showing small overheaded entries in the output. Maybe we want to set a certain default value like 0.1. Cc: Andi Kleen Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-report.txt | 4 ++ tools/perf/builtin-diff.c

[PATCH 2/2] perf top: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim The --percent-limit option is for not showing small overheaded entries in the output. Cc: Andi Kleen Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-top.txt | 4 tools/perf/builtin-top.c | 17 +++-- tools/perf/ui/browsers

Re: [PATCH 12/14] perf ftrace: Use pager for displaying result

2013-05-13 Thread Namhyung Kim
Hi Jiri, On Fri, 10 May 2013 11:04:05 +0200, Jiri Olsa wrote: > On Wed, May 08, 2013 at 02:49:10PM +0900, Namhyung Kim wrote: > yep, that did it.. seems I'm getting the ftrace output > all the time, with: Hmm.. this was just a debug patch. So can you get the ftrace output without

Re: [PATCH 1/2] perf report: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
Hi Pekka, On Mon, 13 May 2013 11:58:22 +0300, Pekka Enberg wrote: > On Mon, May 13, 2013 at 11:41 AM, Namhyung Kim wrote: >> From: Namhyung Kim >> >> The --percent-limit option is for not showing small overheaded entries >> in the output. Maybe we want to set a cer

Re: [PATCH 1/2] perf report: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
Hi Jiri, On Mon, 13 May 2013 15:20:29 +0200, Jiri Olsa wrote: > On Mon, May 13, 2013 at 05:41:42PM +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> The --percent-limit option is for not showing small overheaded entries >> in the output. Maybe we want to set a

Re: [PATCH 1/2] perf report: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
Hi Andi, On Mon, 13 May 2013 16:11:17 +0200, Andi Kleen wrote: > On Mon, May 13, 2013 at 05:41:42PM +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> The --percent-limit option is for not showing small overheaded entries >> in the output. Maybe we want to set a

Re: [PATCH 12/14] perf ftrace: Use pager for displaying result

2013-05-13 Thread Namhyung Kim
On Mon, 13 May 2013 15:42:28 +0200, Jiri Olsa wrote: > On Mon, May 13, 2013 at 05:53:22PM +0900, Namhyung Kim wrote: >> Hi Jiri, >> >> On Fri, 10 May 2013 11:04:05 +0200, Jiri Olsa wrote: >> > On Wed, May 08, 2013 at 02:49:10PM +0900, Namhyung Kim wrote: >> &g

[PATCH 7/9] perf top: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim The --percent-limit option is for not showing small overheaded entries in the output. Cc: Andi Kleen Acked-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-top.txt | 4 tools/perf/builtin-top.c | 17 +++-- tools

[PATCH 6/9] perf report: Add --percent-limit option

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim The --percent-limit option is for not showing small overheaded entries in the output. Maybe we want to set a certain default value like 0.1. Cc: Andi Kleen Acked-by: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-report.txt | 4 ++ tools/perf

[PATCH 3/9] perf top: Get rid of *_threaded() functions

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim Those _threaded() functions are needed to make hist tree handling thread-safe, but AFAICS the only thing it does is forcing it to use the intermediate 'collapsed' tree. It can be acheived by setting sort__need_collapse to 1 in cmd_top() so no need to keep those

[PATCH 4/9] perf hists: Move locking to its call-sites

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim It's a preparation patch to eliminate unneeded locking in the perf report path. Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 26 ++ tools/perf/builtin-top.c| 3 +++ tools/perf/util/hist.c | 6 +- 3 files change

[PATCH 9/9] perf top: Reuse report.percent-limit config variable

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim Make the config variable also works for perf top. Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/builtin-top.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index

[PATCH 8/9] perf report: Add report.percent-limit config variable

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim Now an user can set a default value of --percent-limit option into the perfconfig file. $ cat ~/.perfconfig [report] percent-limit = 0.1 Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 7 ++- 1 file changed, 6

[PATCH 5/9] perf report: Don't be bothered with locking when adding hist entries

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim The perf report is single-threaded, so no need to grab a lock. Although the fast path of pthread_mutex_[un]lock() is very fast, there's ~3% gain by eliminating it when we have huge sample data. $ perf record -a -F 10 -o perf.data.bench -- perf bench sched all $

[PATCHSET 0/9] perf tools: Assorted fixes and changes on perf top/report

2013-05-13 Thread Namhyung Kim
it from 'perf/top-v1' branch on my tree at: git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Any comments are welcome, thanks. Namhyung Namhyung Kim (9): perf top: Fix -E option behavior perf top: Fix percent output when no samples collected perf top:

[PATCH 2/9] perf top: Fix percent output when no samples collected

2013-05-13 Thread Namhyung Kim
From: Namhyung Kim If there's no sample, kernel and exact percent output at the header looked like "-nan%". Signed-off-by: Namhyung Kim --- tools/perf/util/top.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/top

<    5   6   7   8   9   10   11   12   13   14   >