Re: perf: header: Regression

2012-10-22 Thread Namhyung Kim
Hi Andrew, On Mon, 22 Oct 2012 15:11:42 +0200, Andrew Jones wrote: > The patch series that contains 7e94cfcc9d20 regresses the > header output. Below is a diff of info from before and > after the series > > 58,64c58,59 > < # node1 meminfo : total = 16777216 kB, free = 15712440 kB > < # node1 cpu

Re: [PATCH] perf diff: Removing displacement output option

2012-12-06 Thread Namhyung Kim
2012-12-06 (목), 14:22 +0100, Jiri Olsa: > On Wed, Dec 05, 2012 at 04:12:09PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Wed, Dec 05, 2012 at 08:06:46PM +0100, Jiri Olsa escreveu: > > > However, I wonder if anyone is actualy using displacement info..? > > > > IIRC that was used long ago in the f

[PATCH 0/5] perf hists: Changes on hists__{match,link} (v3)

2012-12-06 Thread Namhyung Kim
g/pub/scm/linux/kernel/git/namhyung/linux-perf.git perf/link-v3 Please take a look and give comments. Any comments are welcome. Thanks, Namhyung Jiri Olsa (1): perf diff: Removing displacement output option Namhyung Kim (4): perf hists: Exchange order of comparing items when collapsing his

[PATCH 1/5] perf diff: Removing displacement output option

2012-12-06 Thread Namhyung Kim
it complicates hist code factoring ;) Ditching out PERF_HPP__DISPL column with related output functions. Signed-off-by: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Corey Ashford Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter

[PATCH 3/5] perf hists: Link hist entries before inserting to an output tree

2012-12-06 Thread Namhyung Kim
From: Namhyung Kim For matching and/or linking hist entries, they need to be sorted by given sort keys. However current hists__match/link did this on the output trees, so that the entries in the output tree need to be resort before doing it. This looks not so good since we have trees for

[PATCH 4/5] perf diff: Use internal rb tree for compute resort

2012-12-06 Thread Namhyung Kim
From: Namhyung Kim There's no reason to run hists_compute_resort() using output tree. Convert it to use internal tree so that it can remove unnecessary _output_resort. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/builtin-diff.c |

[PATCH 5/5] perf test: Add a test case for hists__{match,link}

2012-12-06 Thread Namhyung Kim
From: Namhyung Kim As they are used from diff and event group report, add a test case to verify their behaviors. In this test I made a fake machine and two evsel. Each evsel got 10 samples (so hist entries) - 5 are common and the rests are not. So after hists__match() both of them will have 5

[PATCH 2/5] perf hists: Exchange order of comparing items when collapsing hists

2012-12-06 Thread Namhyung Kim
From: Namhyung Kim When comparing entries for collapsing put the given entry first, and then the iterated entry. This is not the case of hist_entry__cmp() when called if given sort keys don't require collapsing. So change the order for the sake of consistency. It will be required for mat

Re: [PATCH 2/5] perf hists: Exchange order of comparing items when collapsing hists

2012-12-07 Thread Namhyung Kim
Hi Arnaldo, On Thu, 6 Dec 2012 16:09:20 -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Dec 06, 2012 at 05:53:25PM +0100, Jiri Olsa escreveu: >> On Fri, Dec 07, 2012 at 12:09:38AM +0900, Namhyung Kim wrote: >> > From: Namhyung Kim >> > >> > When comparing

Re: [PATCH 3/5] perf hists: Link hist entries before inserting to an output tree

2012-12-07 Thread Namhyung Kim
Hi, On Thu, 6 Dec 2012 17:25:43 +0100, Jiri Olsa wrote: > On Fri, Dec 07, 2012 at 12:09:39AM +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> For matching and/or linking hist entries, they need to be sorted by >> given sort keys. However current hists_

Re: [PATCH 4/5] perf diff: Use internal rb tree for compute resort

2012-12-07 Thread Namhyung Kim
On Thu, 6 Dec 2012 17:51:36 +0100, Jiri Olsa wrote: > On Fri, Dec 07, 2012 at 12:09:40AM +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> There's no reason to run hists_compute_resort() using output tree. >> Convert it to use internal tree s

[PATCH 0/4] perf hists: Changes on hists__{match,link} (v4)

2012-12-10 Thread Namhyung Kim
n't miss any of remaining issues on this. I also pushed it on 'perf/link-v4' branch at: git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Please have a look, thanks. Namhyung Namhyung Kim (4): perf hists: Exchange order of comparing items when collapsing

[PATCH 3/4] perf diff: Use internal rb tree for compute resort

2012-12-10 Thread Namhyung Kim
From: Namhyung Kim There's no reason to run hists_compute_resort() using output tree. Convert it to use internal tree so that it can remove unnecessary _output_resort. Cc: Stephane Eranian Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim --- tools/perf/builtin-diff.c

[PATCH 4/4] perf test: Add a test case for hists__{match,link}

2012-12-10 Thread Namhyung Kim
From: Namhyung Kim As they are used from diff and event group report, add a test case to verify their behaviors. In this test I made a fake machine and two evsel. Each evsel got 10 samples (so hist entries) - 5 are common and the rests are not. So after hists__match() both of them will have 5

[PATCH 2/4] perf hists: Link hist entries before inserting to an output tree

2012-12-10 Thread Namhyung Kim
From: Namhyung Kim For matching and/or linking hist entries, they need to be sorted by given sort keys. However current hists__match/link did this on the output trees, so that the entries in the output tree need to be resort before doing it. This looks not so good since we have trees for

[PATCH 1/4] perf hists: Exchange order of comparing items when collapsing hists

2012-12-10 Thread Namhyung Kim
From: Namhyung Kim When comparing entries for collapsing put the given entry first, and then the iterated entry. This is not the case of hist_entry__cmp() when called if given sort keys don't require collapsing. So change the order for the sake of consistency. It will be required for mat

Re: [GIT PULL 00/21] perf/core improvements and fixes

2012-11-11 Thread Namhyung Kim
Hi Arnaldo, On Fri, 9 Nov 2012 18:42:49 -0300, Arnaldo Carvalho de Melo wrote: > Hi Ingo, > > Please consider pulling. > > - Arnaldo > > The following changes since commit 8dfec403e39b7c37fd6e8813bacc01da1e1210ab: > > perf tests: Removing 'optional' field (2012-11-05 14:03:59 -0300) > > a

Re: [PATCH 10/21] perf hists: Introduce hists__link

2012-11-11 Thread Namhyung Kim
On Fri, 9 Nov 2012 18:42:59 -0300, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > That given two hists will find the hist_entries (buckets) in the second > hists that are for the same bucket in the first and link them, then it > will look for all buckets in the second that d

[PATCH] perf tools: Add gtk. config option for launching GTK browser

2012-11-11 Thread Namhyung Kim
From: Namhyung Kim Add config option for launching GTK browser for the specified command by default. Currently only 'report' command is supported. Adding following line to the perfconfig file will have a same effect of specifying --gtk option on command line (unless other related o

[PATCH] perf tools: Fix compile error on NO_NEWT=1 build

2012-11-11 Thread Namhyung Kim
From: Namhyung Kim CC builtin-annotate.o In file included from util/evsel.h:10:0, from util/evlist.h:8, from builtin-annotate.c:20: util/hist.h: In function ‘script_browse’: util/hist.h:198:45: error: unused parameter ‘script_opt’ [-Werror=unused-parameter

Re: [GIT PULL 00/21] perf/core improvements and fixes

2012-11-12 Thread Namhyung Kim
On Mon, 12 Nov 2012 13:01:39 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Nov 12, 2012 at 02:55:46PM +0100, Jiri Olsa escreveu: >> On Mon, Nov 12, 2012 at 11:10:52AM +0900, Namhyung Kim wrote: >> > On Fri, 9 Nov 2012 18:42:49 -0300, Arnaldo Carvalho de Melo wrote: >> &

Re: [PATCH 01/12] perf tools: Keep group information

2012-11-12 Thread Namhyung Kim
On Mon, 12 Nov 2012 14:08:33 -0300, Arnaldo Carvalho de Melo wrote: > Em Sat, Nov 10, 2012 at 01:43:23AM +0900, Namhyung Kim escreveu: >> From: Namhyung Kim >> >> Add a few of group-related field in struct perf_{evlist,evsel} so that >> the group information in a evli

Re: [PATCH 02/12] perf header: Add HEADER_GROUP_DESC feature

2012-11-12 Thread Namhyung Kim
On Mon, 12 Nov 2012 14:45:34 -0300, Arnaldo Carvalho de Melo wrote: > Em Sat, Nov 10, 2012 at 01:43:24AM +0900, Namhyung Kim escreveu: >> From: Namhyung Kim >> >> Save group relationship information so that it can be restored when >> perf report is running. >>

Re: [PATCH 5/5] perf tool: Add basic event modifier sanity check

2012-11-12 Thread Namhyung Kim
Hi Jiri, On Mon, 12 Nov 2012 18:34:04 +0100, Jiri Olsa wrote: > Updating event parser to allow any non zero string containing > [ukhpGH] characters for event modifier. > > The modifier sanity is checked later in parse-event object logic. > The check validates modifier to contain only one instance

Re: [PATCH 0/5] perf tool: Fix enable/disable events logic for record command

2012-11-12 Thread Namhyung Kim
heck > > Also available in: > git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git > perf/enable5 > > thanks, > jirka > > Cc: Corey Ashford > Cc: Frederic Weisbecker > Cc: Ingo Molnar > Cc: Namhyung Kim > Cc: Paul Mackerras > Cc: Peter Zijl

[PATCH 1/6] perf ui/tui: Move progress.c under ui/tui directory

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim Current ui_progress functions are implemented for TUI only. So move the file under the tui directory. This is needed for providing an UI- agnostic wrapper. Signed-off-by: Namhyung Kim --- tools/perf/Makefile |2 +- tools/perf/ui/progress.c | 32

[PATCH 5/6] perf ui: Always compile browser setup code

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim We now have proper fallback logic, so always build it regardless of TUI or GTK setting. Signed-off-by: Namhyung Kim --- tools/perf/Makefile |3 +-- tools/perf/ui/ui.h | 28 tools/perf/util/cache.h | 39

[PATCH 2/6] perf ui: Introduce generic ui_progress helper

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim Make ui_progress functions generic so that UI frontend code will add its callbacks. Signed-off-by: Namhyung Kim --- tools/perf/Makefile |1 + tools/perf/ui/gtk/util.c | 11 --- tools/perf/ui/progress.c | 20 tools/perf

[PATCH 3/6] perf ui/gtk: Implement ui_progress functions

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim Implement progress update function for GTK2 front end. Note that since it will be called before gtk main loop so that we should call gtk event loop handler directly. Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Makefile |1 + tools/perf/ui/gtk

[PATCH 6/6] perf ui: Always compile error printing code

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim It is used everywhere so always build it regardless of ui engine. Signed-off-by: Namhyung Kim --- tools/perf/Makefile | 14 +- tools/perf/ui/util.c| 10 ++ tools/perf/util/debug.c | 22 -- tools/perf/util/debug.h | 33

[PATCH 4/6] perf ui: Add ui_progress__finish()

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim Sometimes we need to know when the progress bar should disappear. Checking curr >= total wasn't enough since there're cases not met that condition for the last call. So add a new ->finish callback to identify this explicitly. Currently only GTK frontend need

[PATCH] perf tools: Don't check configuration on make clean

2012-11-13 Thread Namhyung Kim
From: Namhyung Kim Current perf build process checks various system configuration on invocation to make. But this is not needed just for cleaning. To do that, move some of python related variables out of conditional since 'clean' target needs them. Normal path should not be affect

[PATCH 1/5] perf ui: Always compile error printing code

2012-11-14 Thread Namhyung Kim
From: Namhyung Kim It is used everywhere so always build it regardless of ui engine. Signed-off-by: Namhyung Kim --- tools/perf/Makefile | 14 +- tools/perf/ui/util.c| 10 ++ tools/perf/util/debug.c | 22 -- tools/perf/util/debug.h | 33

[PATCH 2/5] perf ui/helpline: Introduce ui_helpline__vshow()

2012-11-14 Thread Namhyung Kim
From: Namhyung Kim The ui_helpline__vshow() will be used for pr_* functions. Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/helpline.c | 23 --- tools/perf/ui/helpline.c | 12 tools/perf/ui/helpline.h | 22 ++ tools/perf/ui

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

2012-11-14 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 5/5] perf report: Run dynamic loaded GTK browser

2012-11-14 Thread Namhyung Kim
Run GTK hist browser using libdl. Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Makefile |3 ++- tools/perf/builtin-report.c | 16 +--- tools/perf/ui/gtk/gtk.h |5 + tools/perf/util/hist.h | 13 - 4 files

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

2012-11-14 Thread Namhyung Kim
Separate out GTK codes to a shared object called libperf-gtk.so. In order to do that all objects are compiled as PIC like libtraceevent. For now whole libperf and libtraceevent are built into it. Cc: Andi Kleen Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Makefile | 36

[RFC 0/5] perf ui/gtk: Separate out GTK codes to a shared object

2012-11-14 Thread Namhyung Kim
LIBRARY_PATH will lead to a fallback TUI or stdio (for NO_NEWT=1 build) report browser. Patch 0001 is a resend version of my previous series, and Patch 0002 is a preparation for smooth transition to libperf-gtk.so. Patch 0003-0005 separate out the libperf-gtk.so and use it with libdl. You c

Re: [PATCH 3/6] perf ui/gtk: Implement ui_progress functions

2012-11-15 Thread Namhyung Kim
Hi Pekka, On Thu, 15 Nov 2012 09:47:23 +0200 (EET), Pekka Enberg wrote: > On Tue, 13 Nov 2012, Namhyung Kim wrote: >> From: Namhyung Kim >> >> Implement progress update function for GTK2 front end. >> >> Note that since it will be called before gtk main loop so

Re: [RFC 0/5] perf ui/gtk: Separate out GTK codes to a shared object

2012-11-15 Thread Namhyung Kim
On Thu, 15 Nov 2012 09:43:07 +0200 (EET), Pekka Enberg wrote: > On Thu, 15 Nov 2012, Namhyung Kim wrote: >> This is an RFC patchset to separate GTK GUI codes to a shared object, >> called libperf-gtk.so and use it with libdl. It's in an early-stage >> so probably has

[PATCH] perf tools: Don't try to lookup objdump for live mode

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim Arnaldo reported that annotation during perf top resulted in a segfault. It was because the env->arch was NULL and we don't set it for a live session. In fact, no need to look up objdump in this case since we can use system's default (native) objdump. Reporte

[RFC/PATCH 0/6] perf tools: Additional works for memory access sampling

2012-11-06 Thread Namhyung Kim
er app, it worked well for my toy application at least sometimes. ;-) I'll continue to chasing it down but before doing it I'd like to share what I have now. Thanks, Namhyung [1] https://lkml.org/lkml/2012/11/5/485 Namhyung Kim (6): perf tools: Synthesize data mmap events for threa

[PATCH 1/6] perf tools: Synthesize data mmap events for threads

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim Current perf_event__synthesize_mmap_events() only deals with executable mappings. With upcoming memory access sampling, non-executable data mappings are needed also. While at it, convert parsing code to use sscanf which makes the code cleaner IMHO. Cc: Stephane Eranian

[PATCH 5/6] perf tools: Fix output of symbol_daddr offset

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim The symbol addresses in a dso have relative offsets from the start of a mapping. So in order to ouput correct offset value from @ip, one of them should be converted. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 2 +- 1 file changed, 1

[PATCH 3/6] perf tools: Fix detection of stack area

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim Output of /proc//maps contains helpful information to anonymous mappings like stack, heap, ... For the case of stack, it can show multiple stack area for each thread in the process: $ cat /proc/$(pidof gnome-shell)/maps | grep stack 7fe019946000-7fe01a146000 rw-p

[PATCH 6/6] perf tools: Free {branch,mem}_info when freeing hist_entry

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim Those data should be free along with the associated hist_entry, otherwise they'll be leaked. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/util/hist.c b/tools/perf/util/h

[PATCH 4/6] perf tools: Ignore ABS symbols when loading data maps

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim When loading symbols in a data mapping, ABS symbols (which has a value of SHN_ABS in its st_shndx) failed at elf_getscn(). And it marks the loading as a failure so already loaded symbols cannot be fixed up. I'm not sure what should be done. Just ignore them for now. :

[PATCH 2/6] perf tools: Set kernel data mapping length

2012-11-06 Thread Namhyung Kim
From: Namhyung Kim Currently only text (function) mapping was set, so that the kernel data addresses couldn't parsed correctly. Fix it. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/machine.c | 22 +- 1 file changed, 13 insertions(+), 9 dele

Re: [PATCH v2 00/16] perf: add memory access sampling support

2012-11-06 Thread Namhyung Kim
Hi Arnaldo, On Tue, 6 Nov 2012 17:52:21 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Nov 05, 2012 at 02:50:47PM +0100, Stephane Eranian escreveu: > [root@sandy acme]# perf mem -t load rep --stdio > --sort=symbol,symbol_daddr,cost > # Samples: 30 of event 'cpu/mem-loads/pp' > # Total cost : 6

Re: [PATCH] [perf] convert_variable_type does not correctly check type of arrays

2012-11-06 Thread Namhyung Kim
Hi Hannes, On Mon, 5 Nov 2012 23:49:16 +0100, Hannes Frederic Sowa wrote: > While casting an array of (unsigned) chars to a string, perf does not > check the containing type but only the opaque type and is bailing out: > > $ perf probe -v -a 'neigh_destroy:22 dev->name:string' > probe-definiti

Re: tools, perf: Fix up for x86 UAPI disintegration

2012-11-07 Thread Namhyung Kim
Hi David, On Mon, 05 Nov 2012 23:18:27 +, David Howells wrote: > David Howells wrote: > >> David Howells wrote: >> >> > I've posted a revised version of my perf patches to my UAPI disintegration >> > GIT tree. >> >> Hmmm... It seems to break some things according to Fengguang's kbuild tes

[PATCH 1/3] perf annotate: Parse --asm-raw output properly

2012-11-08 Thread Namhyung Kim
From: Namhyung Kim If --asm-raw option was given, objdump output will contain hex numbers of the instruction before the symbolic name. However current parser code doesn't handle it properly. Fix it. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c | 2 ++ tools/perf

[PATCH 3/3] perf annotate: Don't try to follow jump target on PLT symbols

2012-11-08 Thread Namhyung Kim
From: Namhyung Kim The perf annotate browser on TUI can identify a jump target for a selected instruction. It assumes that the jump target is within the function but it's not the case of PLT symbols which have offset out of the function as a target. Since it caused a segmentation fault, d

[PATCH 2/3] perf annotate: Merge same lines in summary view

2012-11-08 Thread Namhyung Kim
From: Namhyung Kim The --print-line option of perf annotate command shows summary for each source line. But it didn't merge same lines so that it can appear multiple times. * before: Sorted summary for file /home/namhyung/bin/mcol -- 24.40

[PATCH v2 2/3] perf annotate: Merge same lines in summary view

2012-11-08 Thread Namhyung Kim
From: Namhyung Kim The --print-line option of perf annotate command shows summary for each source line. But it didn't merge same lines so that it can appear multiple times. * before: Sorted summary for file /home/namhyung/bin/mcol -- 24.40

[PATCH v3 2/3] perf annotate: Merge same lines in summary view

2012-11-08 Thread Namhyung Kim
From: Namhyung Kim The --print-line option of perf annotate command shows summary for each source line. But it didn't merge same lines so that it can appear multiple times. * before: Sorted summary for file /home/namhyung/bin/mcol -- 21.71

[PATCH 01/12] perf tools: Keep group information

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Add a few of group-related field in struct perf_{evlist,evsel} so that the group information in a evlist can be known easily. It only counts groups which have more than 1 members since leader-only groups are treated as non-group events. Cc: Jiri Olsa Cc: Stephane Eranian

[PATCH 03/12] perf hists: Collapse group hist_entries to a leader

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim To support viewing an event group together, collapse all of members in the group to the leader's tree. The entries in the leaders' tree will have group_stats to store those information. This patch introduced an additional field 'event_group' in symbol

[PATCH 07/12] perf ui/browser: Add support for event group view

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Show group members' overhead also when showing the leader's if event group is enabled. At this time, only implemented overhead part in order to ease review and other parts can be added later once this patch settled down. Cc: Jiri Olsa Cc: Stephane Eranian Acke

[PATCH 11/12] perf report: Add --group option

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Add --group option to enable event grouping. When enabled, all the group members information will be shown together with the leader. Cc: Jiri Olsa Cc: Stephane Eranian Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c |2 ++ 1 file

[PATCH 12/12] perf report: Add report.group config option

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Add report.group config option for setting default value of event group view. It affects the report output only if perf.data contains event group info. A user can write .perfconfig file like below to enable group view by default: $ cat ~/.perfconfig [report] group

[PATCH 10/12] perf report: Show group description when event group is enabled

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim When using event group viewer, it's better to show the group description rather than the leader information alone. If a leader did not contain any member, it's a non-group event. Cc: Jiri Olsa Cc: Stephane Eranian Cc: Pekka Enberg Acked-by: Jiri Olsa Sig

[PATCH 09/12] perf report: Bypass non-leader events when event group is enabled

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Since we have all necessary information in the leader events and other members don't, bypass members. Member events will be shown along with the leaders if event group is enabled. Cc: Jiri Olsa Cc: Stephane Eranian Cc: Pekka Enberg Acked-by: Jiri Olsa Signed-o

[PATCH 05/12] perf report: Make another loop for output resorting

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Now the event grouping viewing requires collapsing all members in a group to the leader. Thus hists__output_resort should be called after collapsing all entries in evlist. Cc: Jiri Olsa Cc: Stephane Eranian Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim --- tools/perf

[PATCH 08/12] perf ui/gtk: Add support for event group view

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Show group members' overhead also when showing the leader's if event group is enabled. At this time, only implemented overhead part in order to ease review and other parts can be added later once this patch settled down. Cc: Jiri Olsa Cc: Stephane Eranian Cc: Pe

[PATCH 06/12] perf ui/hist: Add support for event group view

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Show group members' overhead also when showing the leader's if event group is enabled. At this time, only implemented overhead part in order to ease review and other parts can be added later once this patch settled down. Cc: Jiri Olsa Cc: Stephane Eranian Acke

[PATCH 04/12] perf hists: Maintain total periods of group members in the leader

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Like group_stats in hist_entry, total periods information also need to be known to the leader. Cc: Jiri Olsa Cc: Stephane Eranian Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 25 + tools/perf/util/hist.h |1

[PATCH 02/12] perf header: Add HEADER_GROUP_DESC feature

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Save group relationship information so that it can be restored when perf report is running. Cc: Jiri Olsa Cc: Stephane Eranian Acked-by: Jiri Olsa Signed-off-by: Namhyung Kim --- tools/perf/builtin-record.c |3 + tools/perf/util/header.c| 152

[PATCHSET 00/12] perf report: Add support for event group view (v5)

2012-11-09 Thread Namhyung Kim
[1] https://lkml.org/lkml/2012/7/24/81 Cc: Jiri Olsa Cc: Stephane Eranian Cc: Namhyung Kim Namhyung Kim (12): perf tools: Keep group information perf header: Add HEADER_GROUP_DESC feature perf hists: Collapse group hist_entries to a leader perf hists: Maintain total periods of group m

[PATCHSET 00/13] perf annotate: Add support for event group view (v1)

2012-11-09 Thread Namhyung Kim
t/namhyung/linux-perf.git perf/annotate-group-v1 As always, any comments are welcome, thanks. Namhyung [1] http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg337706.html Namhyung Kim (13): perf annotate: Parse --asm-raw output properly perf annotate: Whitespace fixups perf annotate:

[PATCH 01/13] perf annotate: Parse --asm-raw output properly

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim If --asm-raw option was given, objdump output will contain hex numbers of the instruction before the symbolic name. However current parser code doesn't handle it properly. Fix it. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c |2 ++ tools/perf

[PATCH 02/13] perf annotate: Whitespace fixups

2012-11-09 Thread Namhyung Kim
Some lines are indented by whitespace characters rather than tabs. Fix them. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 0565558b6184

[PATCH 04/13] perf annotate: Don't try to follow jump target on PLT symbols

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim The perf annotate browser on TUI can identify a jump target for a selected instruction. It assumes that the jump target is within the function but it's not the case of PLT symbols which have offset out of the function as a target. Since it caused a segmentation fault, d

[PATCH 06/13] perf annotate: Factor out disasm__calc_percent()

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Factor out calculation of histogram of a symbol into disasm__calc_percent. It'll be used for event group view. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 52 +--- 1 file changed, 35 insertions(+), 17 dele

[PATCH 08/13] perf annotate: Factor out struct source_line_percent

2012-11-09 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

[PATCH 10/13] perf annotate browser: Make browser_disasm_line->percent an array

2012-11-09 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

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

2012-11-09 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 | 69 ++--- 1 file

[PATCH 13/13] perf annotate: Add --group option

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Add --group option to enable event grouping. When enabled, all the group members information will be shown together with the leader so skip non-leader events. Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c |6 ++ 1 file changed, 6 insertions(+) diff

[PATCH 11/13] perf annotate browser: Use disasm__calc_percent()

2012-11-09 Thread Namhyung Kim
The disasm_line__calc_percent() which was used by annotate browser code almost duplicates disasm__calc_percent. Since the latter can handle multiple events properly, use it and get rid of the code duplication. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/annotate.c | 50

[PATCH 09/13] perf annotate: Support event group view for --print-line

2012-11-09 Thread Namhyung Kim
its size. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 123 +--- tools/perf/util/annotate.h |1 + 2 files changed, 95 insertions(+), 29 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index

[PATCH 05/13] perf annotate: Pass evsel instead of evidx on annotation functions

2012-11-09 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 | 14 -- tools/perf/builtin-top.c |2

[PATCH 07/13] perf annotate: Basic support for event group view

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim Add support for event group view when symbol_conf.event_group enabled. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 86 +++- 1 file changed, 69 insertions(+), 17 deletions(-) diff --git a/tools/perf/util/annotate.c

[PATCH 03/13] perf annotate: Merge same lines in summary view

2012-11-09 Thread Namhyung Kim
From: Namhyung Kim The --print-line option of perf annotate command shows summary for each source line. But it didn't merge same lines so that it can appear multiple times. * before: Sorted summary for file /home/namhyung/bin/mcol -- 21.71

[PATCH 1/2] perf tools: Cleanup synthesizing mmap events

2012-11-11 Thread Namhyung Kim
Use sscanf for parsing /proc/pic/maps file. It makes the code shorter and cleaner IMHO. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/event.c | 74 --- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/tools

[PATCH 2/2] perf tools: Synthesize data mmap events for threads

2012-11-11 Thread Namhyung Kim
Current perf_event__synthesize_mmap_events() only deals with executable mappings. With recently added memory access sampling, non-executable data mappings are needed also. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/event.c | 10 +++--- 1 file changed, 7

Re: [PATCH] tools lib traceevent: test correct variable after allocation

2012-12-25 Thread Namhyung Kim
Hi Sasha, On Fri, 21 Dec 2012 15:00:58 -0500, Sasha Levin wrote: > we've tested the wrong variable for allocation failure, fix it to > test the right one. > > Signed-off-by: Sasha Levin Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line &

Re: Segfault in perf tool

2012-12-25 Thread Namhyung Kim
Hi Stefan, On Sun, 23 Dec 2012 22:18:32 +0100, Stefan Beller wrote: > Hi, > > I get segmentation faults when running one of these commands: > perf report -g --sort symbol_to > perf report -g --sort symbol_from > perf report -g --sort dso_from > perf report -g --sort dso_to Those sort keys are onl

Re: [PATCH 20/24] nohz: Full dynticks mode

2012-12-25 Thread Namhyung Kim
Hi Frederic, On Thu, 20 Dec 2012 19:33:07 +0100, Frederic Weisbecker wrote: > When a CPU is in full dynticks mode, try to switch > it to nohz mode from the interrupt exit path if it is > running a single non-idle task. > > Then restart the tick if necessary if we are enqueuing a > second task whil

Re: [PATCH 20/24] nohz: Full dynticks mode

2012-12-25 Thread Namhyung Kim
On Wed, 26 Dec 2012 15:12:22 +0900, Namhyung Kim wrote: > Hi Frederic, > > On Thu, 20 Dec 2012 19:33:07 +0100, Frederic Weisbecker wrote: >> When a CPU is in full dynticks mode, try to switch >> it to nohz mode from the interrupt exit path if it is >> running a singl

[PATCH 1/2] watchdog: Use local_clock for get_timestamp()

2012-12-26 Thread Namhyung Kim
From: Namhyung Kim The get_timestamp() function is always called with current cpu, thus using local_clock() would be more appropriate and it makes the code shorter and cleaner IMHO. Cc: Don Zickus Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Namhyung Kim --- kernel/watchdog.c | 10

[PATCH 2/2] tracing: Use sched_clock_cpu for trace_clock_global

2012-12-26 Thread Namhyung Kim
From: Namhyung Kim For systems have unstable sched_clock, all cpu_clock() does is enable/ disable local irq during call to sched_clock(). And for stable systems they are same. As in trace_clock_global(), we already does it for local irq, calling sched_clock_cpu() directly would be appropriate

[PATCH 01/10] perf sort: Move misplaced sort entry functions

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim Some functions are misplaced along with other entries. Move them to a right place so that it can be found together with related functions. No functional change intended. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 119

[PATCH 08/10] perf sort: Clean up sort__first_dimension setting

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim It doesn't need to compare to every sort key names since the index already has the required information. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 26 ++ 1 file changed, 2 insertions(+), 24 deletions(-)

[PATCH 09/10] perf sort: Separate out branch stack specific sort keys

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim Current perf report gets segmentation fault when a branch stack specific sort key is provided by --sort option to a perf.data file which contains no branch infomation. It's because those sort keys reference branch info of a hist entry unconditionally. Maybe we can chan

[PATCH 02/10] perf sort: Get rid of unnecessary __maybe_unused

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim Some functions have set __maybe_unused on its arguments that are used actually. Remove them. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/sort.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/sort.c

[PATCH 07/10] perf sort: Check return value of strdup()

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim When setup_sorting() is called, 'str' is passed to strtok_r() but it's not checked to have a valid pointer. As strtok_r() accepts NULL pointer on a first argument and use the third argument in that case, it can cause a trouble since our third argument, tmp, is

[PATCH 10/10] perf report: Update documentation for sort keys

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim Add description of sort keys to the perf-report document and also add missing cpu and srcline keys to the command line help string. Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-report.txt | 38 +--- tools

[PATCH 06/10] perf sort: Drop ip_[lr] arguments from _sort__sym_cmp()

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim Current _sort__sym_cmp() function is used for comparing symbols between two hist entries on symbol, symbol_from and symbol_to sort keys. Those functions pass addresses of symbols but it's meaningless since it gets over-written inside of the _sort__sym_cmp function to a

[PATCHSET 00/10] perf tools: Cleanups and bug fixes on sort keys

2012-12-27 Thread Namhyung Kim
hanks, Namhyung Cc: Stephane Eranian Cc: Namhyung Kim Namhyung Kim (10): perf sort: Move misplaced sort entry functions perf sort: Get rid of unnecessary __maybe_unused perf sort: Fix --sort pid output perf sort: Align cpu column to right perf sort: Calculate parent column width too pe

[PATCH 05/10] perf sort: Calculate parent column width too

2012-12-27 Thread Namhyung Kim
From: Namhyung Kim When hists__calc_col_len() called, most of column length are refreshed but it missed parent column. So if the parent sort key was used along with other keys rests will be misalinged since parent has no proper column width. Cc: Stephane Eranian Signed-off-by: Namhyung Kim

<    2   3   4   5   6   7   8   9   10   11   >