Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-09 Thread Namhyung Kim
Hi Kan, On Thu, 6 Nov 2014 14:16:23 +, Kan Liang wrote: > The diff code doesn’t define event_op mmap2, so it fails to get the symbol. Looks like a bug in perf diff code. (It's too easy to miss... :-/ ) > You are right, it’s ip address. The meaning of symbol for diff and report > should >

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-09 Thread Namhyung Kim
Hi Kan, On Thu, 6 Nov 2014 14:16:23 +, Kan Liang wrote: The diff code doesn’t define event_op mmap2, so it fails to get the symbol. Looks like a bug in perf diff code. (It's too easy to miss... :-/ ) You are right, it’s ip address. The meaning of symbol for diff and report should be

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-06 Thread Liang, Kan
> Hi Kan, > > On Thu, Nov 6, 2014 at 2:28 AM, Liang, Kan wrote: > > > >> Hi Kan, > >> > >> On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: > >> >> What about setting the > >> >> sort_sym.se_collapse in data_process() so that hists__match() can > >> >> use symbol names? > >> > > >> > Yes, we

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-06 Thread Liang, Kan
Hi Kan, On Thu, Nov 6, 2014 at 2:28 AM, Liang, Kan kan.li...@intel.com wrote: Hi Kan, On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: What about setting the sort_sym.se_collapse in data_process() so that hists__match() can use symbol names? Yes, we can set it if we

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-05 Thread Namhyung Kim
Hi Kan, On Thu, Nov 6, 2014 at 2:28 AM, Liang, Kan wrote: > >> Hi Kan, >> >> On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: >> >> What about setting the >> >> sort_sym.se_collapse in data_process() so that hists__match() can use >> >> symbol names? >> > >> > Yes, we can set it if we only do

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-05 Thread Liang, Kan
> Hi Kan, > > On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: > > Hi Namhyung, > > > >> > tchain_edit[.] f1 > >> > 0.14%3.913444 tchain_edit[.] f2 > >> > 99.82%1.005478 tchain_edit[.] f3 > >> > >> Hmm.. I think it

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-05 Thread Liang, Kan
Hi Kan, On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: Hi Namhyung, tchain_edit[.] f1 0.14%3.913444 tchain_edit[.] f2 99.82%1.005478 tchain_edit[.] f3 Hmm.. I think it should be a default

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-05 Thread Namhyung Kim
Hi Kan, On Thu, Nov 6, 2014 at 2:28 AM, Liang, Kan kan.li...@intel.com wrote: Hi Kan, On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: What about setting the sort_sym.se_collapse in data_process() so that hists__match() can use symbol names? Yes, we can set it if we only do

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-04 Thread Namhyung Kim
Hi Kan, On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: > Hi Namhyung, > >> > tchain_edit[.] f1 >> > 0.14%3.913444 tchain_edit[.] f2 >> > 99.82%1.005478 tchain_edit[.] f3 >> >> Hmm.. I think it should be a default

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-04 Thread Liang, Kan
Hi Namhyung, > > tchain_edit[.] f1 > > 0.14%3.913444 tchain_edit[.] f2 > > 99.82%1.005478 tchain_edit[.] f3 > > Hmm.. I think it should be a default behavior for perf diff, otherwise -s > symbol is almost meaningless

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-04 Thread Liang, Kan
Hi Namhyung, tchain_edit[.] f1 0.14%3.913444 tchain_edit[.] f2 99.82%1.005478 tchain_edit[.] f3 Hmm.. I think it should be a default behavior for perf diff, otherwise -s symbol is almost meaningless IMHO. I

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-04 Thread Namhyung Kim
Hi Kan, On Tue, 4 Nov 2014 17:07:43 +, Kan Liang wrote: Hi Namhyung, tchain_edit[.] f1 0.14%3.913444 tchain_edit[.] f2 99.82%1.005478 tchain_edit[.] f3 Hmm.. I think it should be a default behavior for

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-03 Thread Namhyung Kim
Hi kan, On Fri, 31 Oct 2014 05:06:12 -0700, kan liang wrote: > From: Kan Liang > > perf diff can display the differential profile between two perf.data > files. However, the perf.data files have to come from same binaries. > > The patch introduced a key "symbol_name" for --sort option, so the

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-03 Thread Liang, Kan
> > @@ -1164,6 +1164,9 @@ int cmd_diff(int argc, const char **argv, const > char *prefix __maybe_unused) > > if (setup_sorting() < 0) > > usage_with_options(diff_usage, options); > > > > + if (sort__has_sym_name) > > + tool.mmap2 = perf_event__process_mmap2; > > why

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-03 Thread Jiri Olsa
On Fri, Oct 31, 2014 at 05:06:12AM -0700, kan.li...@intel.com wrote: SNIP > 99.82%1.005478 tchain_edit[.] f3 > > Signed-off-by: Kan Liang > --- > tools/perf/builtin-diff.c | 5 - > tools/perf/util/sort.c| 26 ++ > tools/perf/util/sort.h

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-03 Thread Jiri Olsa
On Fri, Oct 31, 2014 at 05:06:12AM -0700, kan.li...@intel.com wrote: SNIP 99.82%1.005478 tchain_edit[.] f3 Signed-off-by: Kan Liang kan.li...@intel.com --- tools/perf/builtin-diff.c | 5 - tools/perf/util/sort.c| 26 ++

RE: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-03 Thread Liang, Kan
@@ -1164,6 +1164,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused) if (setup_sorting() 0) usage_with_options(diff_usage, options); + if (sort__has_sym_name) + tool.mmap2 = perf_event__process_mmap2; why is the mmap2

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-11-03 Thread Namhyung Kim
Hi kan, On Fri, 31 Oct 2014 05:06:12 -0700, kan liang wrote: From: Kan Liang kan.li...@intel.com perf diff can display the differential profile between two perf.data files. However, the perf.data files have to come from same binaries. The patch introduced a key symbol_name for --sort

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-10-31 Thread Andi Kleen
> > If I run old perf diff with --sort dso,symbol, we cannot get any useful > information for the user space binary. Furthermore, it failed to compare > the kernel function. E.g. native_write_msr_safe. > > perf diff -s dso,symbol --compute ratio v1_1_6perf.data v2_1_7perf.data The new option

[PATCH 1/1] perf tools: perf diff for different binaries

2014-10-31 Thread kan . liang
From: Kan Liang perf diff can display the differential profile between two perf.data files. However, the perf.data files have to come from same binaries. The patch introduced a key "symbol_name" for --sort option, so the user can compare the perf.data files from different binaries, even

[PATCH 1/1] perf tools: perf diff for different binaries

2014-10-31 Thread kan . liang
From: Kan Liang kan.li...@intel.com perf diff can display the differential profile between two perf.data files. However, the perf.data files have to come from same binaries. The patch introduced a key symbol_name for --sort option, so the user can compare the perf.data files from different

Re: [PATCH 1/1] perf tools: perf diff for different binaries

2014-10-31 Thread Andi Kleen
If I run old perf diff with --sort dso,symbol, we cannot get any useful information for the user space binary. Furthermore, it failed to compare the kernel function. E.g. native_write_msr_safe. perf diff -s dso,symbol --compute ratio v1_1_6perf.data v2_1_7perf.data The new option needs to