[PATCH 00/18] perf report: Add support for event group view (v6)

2012-11-28 Thread Namhyung Kim
anges * add missing bswap_32 on reading nr_groups (Jiri) * remove perf_evlist__recalc_nr_groups() in favor of list_is_last (Jiri) v1 -> v2: * save group relation to header (Jiri) [1] https://lkml.org/lkml/2012/7/24/81 Namhyung Kim (18): perf evsel: Set leader evsel's ->leader to i

[PATCH 00/18] perf report: Add support for event group view (v6)

2012-11-28 Thread Namhyung Kim
anges * add missing bswap_32 on reading nr_groups (Jiri) * remove perf_evlist__recalc_nr_groups() in favor of list_is_last (Jiri) v1 -> v2: * save group relation to header (Jiri) [1] https://lkml.org/lkml/2012/7/24/81 Namhyung Kim (18): perf evsel: Set leader evsel's ->leader to i

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

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Show group members' overhead also when showing the leader's if event group is enabled. Use macro for defining hpp functions which looks almost identical. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/ui/hist.c

[PATCH 13/18] perf hist browser: Add support for event group view

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Show group members' overhead also when showing the leader's if event group is enabled. Use macro for defining hpp functions which looks almost identical. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/his

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

2012-11-28 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 14/18] perf gtk/browser: Add support for event group view

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Show group members' overhead also when showing the leader's if event group is enabled. Use macro for defining hpp functions which looks almost identical. Cc: Jiri Olsa Cc: Stephane Eranian Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/brow

[PATCH 16/18] perf report: Show group description when event group is enabled

2012-11-28 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 01/18] perf evsel: Set leader evsel's ->leader to itself

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Currently only non-leader members are set ->leader to the leader evsel of the group and the leader has set NULL. Thus it requires special casing for leader evsels. Set ->leader to itself will remove this. Suggested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: St

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

2012-11-28 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 17/18] perf report: Add --group option

2012-11-28 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/Documentation/perf-report.txt | 3

[PATCH 02/18] perf evsel: Convert to _is_group_leader method

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Convert perf_evsel__is_group_member to perf_evsel__is_group_leader. This is because the most usecases are using negative form to check whether the given evsel is a leader or not and it's IMHO somewhat ambiguous - leader also *is* a member of the group. Signed-off-by: Nam

[PATCH 03/18] perf tools: Keep group information

2012-11-28 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 11/18] perf hists: Resort hist entries using group members for output

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim When event group is enabled, sorting hist entries on periods for output should consider groups members' period also. To do that, build period table using link/pair information and compare the table. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim ---

[PATCH 10/18] perf report: Make another loop for linking group hists

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Now the event grouping viewing requires linking all member hists in a group to the leader's. Thus hists__output_resort should be called after linking all events in evlist. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c

[PATCH 09/18] perf symbol: Introduce symbol_conf.event_group

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim The event_group field is for enabling event group view on perf report and other commands. It requires collapsing hist entries since every member in a group needs to be linked before final output resorting. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim

[PATCH 08/18] perf hists: Add hists__{match,link}_collapsed

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim The current hists__match/link functions are worked on the output tree (hists->entries). However for event group view it needs to be matched/linked before the final resort. Thus add new helpers for doing it on the collapsed tree. Cc: Jiri Olsa Cc: Stephane Eranian Sig

[PATCH 00/18] perf report: Add support for event group view (v6)

2012-11-28 Thread Namhyung Kim
anges * add missing bswap_32 on reading nr_groups (Jiri) * remove perf_evlist__recalc_nr_groups() in favor of list_is_last (Jiri) v1 -> v2: * save group relation to header (Jiri) [1] https://lkml.org/lkml/2012/7/24/81 Namhyung Kim (18): perf evsel: Set leader evsel's ->leader to i

[PATCH 07/18] perf hists: Exchange order of comparing items when collapsing hists

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim When comparing entries for collapsing put the given entry first, and then the iterated entry. This is for the sake of consistency and will be required by the event group report. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 2

[PATCH 06/18] perf hists: Link hist entry pairs to leader

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Current hists__match/link() link a leader to its pair, so if multiple pairs were linked, the leader will lose pointer to previous pairs since it was overwritten. Fix it by making leader the list head. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim

[PATCH 04/18] perf header: Add HEADER_GROUP_DESC feature

2012-11-28 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| 153

[PATCH 05/18] perf tools: Fix typo on hist__entry_add_pair

2012-11-28 Thread Namhyung Kim
From: Namhyung Kim Fix a misplaced underscore. In this case, 'hist_entry' is the name of data structure and we usually put double underscores between data structure and actual function name. Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 4 ++-- tools/perf/util/sort.h

Re: [PATCH 01/14] perf tool: Introduce perf_hpp__list for period related columns

2012-11-28 Thread Namhyung Kim
Hi Jiri, On Wed, 28 Nov 2012 14:52:36 +0100, Jiri Olsa wrote: > Adding perf_hpp__list list to register and contain all period > related columns the command is interested in. > > This way we get rid of static array holding all possible > columns and enable commands to register their own columns. B

Re: [PATCH 03/14] perf tool: Fix period symbol_conf.field_sep display

2012-11-28 Thread Namhyung Kim
a > Cc: Ingo Molnar > Cc: Paul Mackerras > Cc: Corey Ashford > Cc: Frederic Weisbecker > Cc: Namhyung Kim > --- > tools/perf/ui/hist.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c >

Re: [PATCH 04/14] perf diff: Remove displacement from struct hist_entry_diff

2012-11-29 Thread Namhyung Kim
e Melo > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Paul Mackerras > Cc: Corey Ashford > Cc: Frederic Weisbecker Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to m

Re: [PATCH 01/14] perf tool: Introduce perf_hpp__list for period related columns

2012-11-29 Thread Namhyung Kim
Hi, On Thu, 29 Nov 2012 16:44:59 +0900, Namhyung Kim wrote: > Hi Jiri, > > On Wed, 28 Nov 2012 14:52:36 +0100, Jiri Olsa wrote: >> Adding perf_hpp__list list to register and contain all period >> related columns the command is interested in. >> >> This way we ge

Re: [PATCH 05/14] perf diff: Change compute methods to work with pair directly

2012-11-29 Thread Namhyung Kim
o Carvalho de Melo > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Paul Mackerras > Cc: Corey Ashford > Cc: Frederic Weisbecker Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to ma

Re: [PATCH 06/14] perf diff: Change formula methods to work with pair directly

2012-11-29 Thread Namhyung Kim
o Carvalho de Melo > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Paul Mackerras > Cc: Corey Ashford > Cc: Frederic Weisbecker Acked-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to ma

Re: [PATCH 08/14] perf diff: Change diff command to work over multiple data files

2012-11-29 Thread Namhyung Kim
On Wed, 28 Nov 2012 14:52:43 +0100, Jiri Olsa wrote: > Adding diff command the flexibility to specify multiple data > files on input. If not input file is given the standard behaviour > stands and diff inspects 'perf.data' and 'perf.data.old' files. > > Also changing the processing and output displ

Re: [PATCH 09/14] perf diff: Update perf diff documentation for multiple data comparison

2012-11-29 Thread Namhyung Kim
On Wed, 28 Nov 2012 14:52:44 +0100, Jiri Olsa wrote: > +COMPARISON > +-- > +The comparison is governed by the baseline file. The baseline perf.data > +file is iterated for samples. All other perf.data files specified on > +the command line are searched for the baseline sample pair. If the p

Re: [PATCH 10/14] perf tool: Centralize default columns init in perf_hpp__init

2012-11-29 Thread Namhyung Kim
On Wed, 28 Nov 2012 14:52:45 +0100, Jiri Olsa wrote: > Now when diff command is separated from other standard outputs, > we can use perf_hpp__init to initialize all standard columns. > > Moving PERF_HPP__OVERHEAD column init back to perf_hpp__init, > and removing extra enable calls. Why was this n

Re: [PATCH 14/14] perf diff: Add generic order option for compute sorting

2012-11-29 Thread Namhyung Kim
On Wed, 28 Nov 2012 14:52:49 +0100, Jiri Olsa wrote: > Adding option 'o' to allow sorting based on the > input file number. [snip] > hist_entry__cmp_compute(struct hist_entry *left, struct hist_entry *right, > int c) > { > - int i; > + struct hist_entry **pairs_left

Re: [PATCH 03/18] perf tools: Keep group information

2012-11-29 Thread Namhyung Kim
2012-11-29 (목), 15:33 +0100, Jiri Olsa: > On Thu, Nov 29, 2012 at 03:38:31PM +0900, Namhyung Kim wrote: > > From: Namhyung Kim > > SNIP > > > --- a/tools/perf/util/evlist.h > > +++ b/tools/perf/util/evlist.h > > @@ -21,6 +21,7 @@ struct perf_evlis

Re: [PATCH 03/18] perf tools: Keep group information

2012-11-29 Thread Namhyung Kim
2012-11-29 (목), 16:02 +0100, Jiri Olsa: > On Thu, Nov 29, 2012 at 11:58:54PM +0900, Namhyung Kim wrote: > > 2012-11-29 (목), 15:33 +0100, Jiri Olsa: > > > On Thu, Nov 29, 2012 at 03:38:31PM +0900, Namhyung Kim wrote: > > > > From: Namhyung Kim > > > > >

Re: [PATCH 10/14] perf tool: Centralize default columns init in perf_hpp__init

2012-11-29 Thread Namhyung Kim
Hi Jiri, On Thu, 29 Nov 2012 13:13:19 +0100, Jiri Olsa wrote: > On Thu, Nov 29, 2012 at 08:55:47PM +0900, Namhyung Kim wrote: >> On Wed, 28 Nov 2012 14:52:45 +0100, Jiri Olsa wrote: >> > Now when diff command is separated from other standard outputs, >> > we can use p

[PATCH 1/2] perf: Reset hwc->last_period on sw clock events

2013-03-17 Thread Namhyung Kim
From: Namhyung Kim When cpu/task clock events are initialized, their sampling frequencies are converted to have a fixed value. However it missed to update the hwc->last_period which was set to 1 for initial sampling frequency calibration. Because this hwc->last_period value is used as a

[PATCH 2/2] perf tests: Add a test case for checking sw clock event frequency

2013-03-17 Thread Namhyung Kim
From: Namhyung Kim This test case checks frequency conversion of hrtimer-based software clock events (cpu-clock, task-clock) have valid (non-1) periods. Cc: Jiri Olsa Signed-off-by: Namhyung Kim --- tools/perf/Makefile | 1 + tools/perf/tests/builtin-test.c | 4 ++ tools/perf

[PATCH] perf cgroup: Add __percpu annotation to perf_cgroup->info

2013-03-17 Thread Namhyung Kim
From: Namhyung Kim It's a per-cpu data structure but missed the __percpu annotation. Cc: Tejun Heo Signed-off-by: Namhyung Kim --- include/linux/perf_event.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h

Re: [for-next][PATCH 9/9] tracing: Update debugfs README file

2013-03-18 Thread Namhyung Kim
Hi Steve, On Fri, 15 Mar 2013 23:24:21 -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > Update the README file in debugfs/tracing to something more useful. > What's currently in the file is very old and what it shows doesn't > have much use. Heck, it tells you how to mount debu

Re: [RFC PATCH 0/3] Perf persistent events

2013-03-18 Thread Namhyung Kim
Hi Borislav, On Fri, 15 Mar 2013 14:06:26 +0100, Borislav Petkov wrote: > From: Borislav Petkov > > Yeah, > > here's a refresh of the persistent events deal, accessing those is much > cleaner now. Here's how: > > So kernel code initializes and enables the event at its convenience > (during boot,

Re: [RFC PATCH 2/3] perf: Add persistent event facilities

2013-03-18 Thread Namhyung Kim
On Fri, 15 Mar 2013 14:06:28 +0100, Borislav Petkov wrote: > Add a barebones implementation for registering persistent events with > perf. For that, we don't destroy the buffers when they're unmapped; > also, we map them read-only so that multiple agents can access them. > > Also, we allocate the e

[PATCH v2] perf cgroup: Add __percpu annotation to perf_cgroup->info

2013-03-18 Thread Namhyung Kim
From: Namhyung Kim It's a per-cpu data structure but missed the __percpu annotation. Cc: Tejun Heo Cc: Li Zefan Signed-off-by: Namhyung Kim --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c

Re: [PATCH 2/2] perf tests: Add a test case for checking sw clock event frequency

2013-03-18 Thread Namhyung Kim
Hi Arnaldo, On Mon, 18 Mar 2013 11:42:43 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Mar 18, 2013 at 11:41:47AM +0900, Namhyung Kim escreveu: >> +static int __test__sw_clock_freq(enum perf_sw_ids clock_id) >> +{ >> +int i, err = -1; >> +volatile int tmp = 0

[PATCH 9/9] perf util: Cleanup calc_data_size logic

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim It's for calculating whole trace data size during reading. However relation functions are called only in this file, no need to conditionalize it with tricky +1 offset and rename the variable to more meaningful name like trace_data_size. Cc: Steven Rostedt Cc: Fre

[PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Check return value of write and fail if error. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 169 + tools/perf/util/trace-event.h | 2 +- 2 files changed, 116

[PATCH 8/9] perf util: Get rid of die() calls in trace-data-read.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Convert them to pr_debug() and propagate error code. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 44 +- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a

[PATCH 2/9] perf util: Get rid of malloc_or_die() in trace-event-info.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Check return value of malloc and fail if NULL. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 48 -- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/tools

[PATCH 7/9] perf util: Get rid of read_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Rename it to do_read and original do_read to __do_read, and check their return value. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 80 +++--- 1 file changed, 57 insertions

[PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Check return value of malloc() and fail if error. Now read_string() can return NULL also check its return value and bail out. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 90

[PATCH 1/9] perf util: Let get_tracing_file() can return NULL

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim So that it can be used by other places. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/trace-event

[PATCH 4/9] perf util: Get rid of die() calls from trace-event-info.c

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim Now remove all remaining die() calls and convert them to check return value and propagate it. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 114 +++-- 1 file changed, 72

[PATCH 5/9] perf util: Handle failure case in trace_report()

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim If pevent allocation in read_trace_init() fails, trace_report() will return -1 and *ppevent is set to NULL. Its callers should check this case and handle it properly. This is also a preparation for the removal of *die() calls. Cc: Steven Rostedt Cc: Frederic Weisbecker

[PATCHSET 0/9] perf util: Cleanup die() and its friends

2013-03-19 Thread Namhyung Kim
sting more! Thanks, Namhyung Namhyung Kim (9): perf util: Let get_tracing_file() can return NULL perf util: Get rid of malloc_or_die() in trace-event-info.c perf util: Get rid of write_or_die() from trace-event-info.c perf util: Get rid of die() calls from trace-event-info.c perf util: Hand

[PATCH] perf tools: Get rid of redundant _FILE_OFFSET_BITS definition

2013-03-19 Thread Namhyung Kim
From: Namhyung Kim We define it in the Makefile so no need to duplicate it. Signed-off-by: Namhyung Kim --- tools/perf/builtin-record.c| 2 -- tools/perf/util/header.c | 2 -- tools/perf/util/session.c | 2 -- tools/perf/util/trace-event-read.c | 2 -- tools/perf

Re: [PATCH 1/9] perf util: Let get_tracing_file() can return NULL

2013-03-19 Thread Namhyung Kim
Hi Steve, On Tue, 19 Mar 2013 09:54:21 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> So that it can be used by other places. >> >> Cc: Steven Rostedt >> Cc: Frederic Wei

Re: [PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 16:04:03 +0100, Peter Zijlstra wrote: > On Tue, 2013-03-19 at 10:59 -0400, Steven Rostedt wrote: >> On Tue, 2013-03-19 at 15:49 +0100, Peter Zijlstra wrote: >> > On Tue, 2013-03-19 at 10:35 -0400, Steven Rostedt wrote: >> > > What about: >> > > int err = 0; >> > > >> >

Re: [PATCH 5/9] perf util: Handle failure case in trace_report()

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 10:47:53 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: > >> @@ -3100,7 +3105,7 @@ int perf_event__process_tracing_data(union perf_event >> *event, >> } >> } >> >> -if

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> free(version); >> @@ -331,11 +354,12 @@ ssize_t trace_report(int fd, struct pevent **ppevent, >> bool __repipe) >> >&

Re: [PATCH 7/9] perf util: Get rid of read_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 10:54:27 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> Rename it to do_read and original do_read to __do_read, and check >> their return value. >> >> Cc: Steven Rostedt

Re: [PATCH 8/9] perf util: Get rid of die() calls in trace-data-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 10:55:28 -0400, Steven Rostedt wrote: > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> Convert them to pr_debug() and propagate error code. > > Shouldn't they be pr_err(). I mean, if the old code would kill

Re: [PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-19 Thread Namhyung Kim
On Tue, 19 Mar 2013 21:55:02 -0400, Steven Rostedt wrote: > On Wed, 2013-03-20 at 10:14 +0900, Namhyung Kim wrote: >> On Tue, 19 Mar 2013 10:50:02 -0400, Steven Rostedt wrote: >> > On Tue, 2013-03-19 at 17:53 +0900, Namhyung Kim wrote: >> >> free(version); >&

[PATCH 1/9] perf util: Let get_tracing_file() can return NULL

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim So that it can be used by other places. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/trace-event

[PATCH 6/9] perf util: Get rid of malloc_or_die() in trace-event-read.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Check return value of malloc() and fail if error. Now read_string() can return NULL also check its return value and bail out. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 100

[PATCH 4/9] perf util: Get rid of die() calls from trace-event-info.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Now remove all remaining die() calls and convert them to check return value and propagate it. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 114 +++-- 1 file changed, 72

[PATCH 3/9] perf util: Get rid of write_or_die() from trace-event-info.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Check return value of write and fail if error. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 180 ++--- tools/perf/util/trace-event.h | 2 +- 2 files changed, 127

[PATCH 5/9] perf util: Handle failure case in trace_report()

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim If pevent allocation in read_trace_init() fails, trace_report() will return -1 and *ppevent is set to NULL. Its callers should check this case and handle it properly. This is also a preparation for the removal of *die() calls. Cc: Steven Rostedt Cc: Frederic Weisbecker

[PATCH 9/9] perf util: Cleanup calc_data_size logic

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim It's for calculating whole trace data size during reading. However relation functions are called only in this file, no need to conditionalize it with tricky +1 offset and rename the variable to more meaningful name like trace_data_size. Cc: Steven Rostedt Cc: Fre

[PATCH 7/9] perf util: Get rid of read_or_die() in trace-event-read.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Rename it to do_read and original do_read to __do_read, and check their return value. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 80 +++--- 1 file changed, 57 insertions

[PATCH 8/9] perf util: Get rid of die() calls in trace-data-read.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Convert them to pr_debug() and propagate error code. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-read.c | 44 +- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a

[PATCHSET 0/9] perf util: Cleanup die() and its friends (v2)

2013-03-21 Thread Namhyung Kim
Hi, I updated this series with previous feedbacks from Steven, Peter and Arnaldo. Thanks for all your comments. * v2 changes - fix a grammar in an error message - change some pr_err() -> pr_debug() - use kernel error checking style consistently Namhyung Kim (9): perf util:

[PATCH 2/9] perf util: Get rid of malloc_or_die() in trace-event-info.c

2013-03-21 Thread Namhyung Kim
From: Namhyung Kim Check return value of malloc and fail if NULL. Cc: Steven Rostedt Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/trace-event-info.c | 48 -- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/tools

Re: [PATCH 01/11] perf ui/hist: Add support to display whole group data for raw columns

2013-02-05 Thread Namhyung Kim
Hi Jiri, On Mon, 4 Feb 2013 13:32:55 +0100, Jiri Olsa wrote: > Currently we don't display group members' values for raw > columns like 'Samples' and 'Period' when in group report > mode. Oops, it was lost during the rework. Thanks for fixing this. Thanks, Namhyung -- To unsubscribe from this l

Re: [PATCH 00/11] perf tool: Add PERF_SAMPLE_READ sample read support

2013-02-05 Thread Namhyung Kim
fix: > http://lkml.org/lkml/2013/2/4/122 > > and is available also at: > git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git > perf/group6 For the whole series: 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...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH RESEND 1/3] perf sort: Drop ip_[lr] arguments from _sort__sym_cmp()

2013-02-05 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

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

2013-02-05 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 2/3] perf sort: Make setup_sorting returns an error code

2013-02-05 Thread Namhyung Kim
From: Namhyung Kim Currently the setup_sorting() is called for parsing sort keys and exits if it failed to add the sort key. As it's included in libperf it'd be better returning an error code rather than exiting application inside of the library. Suggested-by: Arnaldo Carvalho d

Re: [PATCH 2/3] stop_machine: dequeue work before signal completion

2013-02-06 Thread Namhyung Kim
Hi Tejun and Hillf, On Wed, 6 Feb 2013 10:47:49 -0800, Tejun Heo wrote: > On Wed, Feb 06, 2013 at 08:38:43PM +0800, Hillf Danton wrote: >> As handled by the kernel thread, work is dequeued first for further actions. > > Ditto as the previous patch. > >> Signed-off-by: Hillf Danton >> --- >> >> -

Re: [PATCH 0/2] perf stat: add per processor socket count aggregation

2013-02-06 Thread Namhyung Kim
Hi Stephane, On Wed, 6 Feb 2013 15:46:00 +0100, Stephane Eranian wrote: > This patch adds per-processor socket count aggregation > for system-wide mode measurements. This is a useful > mode to detect imbalance between sockets for uniform > workloads. > > To enable this mode, use --aggr-socket in

Re: [PATCH 0/1] (Was uprobes/perf: pre-filtering)

2013-02-06 Thread Namhyung Kim
Hi Oleg, On Wed, 6 Feb 2013 20:42:18 +0100, Oleg Nesterov wrote: > OK, builtin-record.c:record sets .target->uses_mmap == T, this is correct, > we are going to use perf_mmap(). > > But why do we need it? It is for perf_evlist__create_maps() to ensure we > do not use cpu_map__dummy_new(). > > But.

Re: [PATCH 11/11] liblockdep: preload helper

2013-02-06 Thread Namhyung Kim
Hi Sasha, On Wed, 6 Feb 2013 17:11:34 -0500, Sasha Levin wrote: > This is a simple wrapper to make using liblockdep on existing applications > much easier. > > After running 'make && make install', it becomes quite simple to test things > with liblockdep. For example, to try it on perf: > >

Re: [PATCH 11/11] liblockdep: preload helper

2013-02-06 Thread Namhyung Kim
On Wed, 6 Feb 2013 17:11:34 -0500, Sasha Levin wrote: > diff --git a/tools/lib/lockdep/lockdep b/tools/lib/lockdep/lockdep > new file mode 100755 > index 000..616bf9a > --- /dev/null > +++ b/tools/lib/lockdep/lockdep > @@ -0,0 +1,3 @@ > +#! /bin/bash > + > +LD_PRELOAD=liblockdep.so "$@" Just

[PATCH 0/7] perf annotate: Add support for GTK+ annotation browser (v2)

2013-02-07 Thread Namhyung Kim
* squash the last (add --gtk option) patch into the patch 1 (Arnaldo) * make --gtk option does not fallback to stdio for a piped stdout (Borislav) Namhyung Kim (7): perf ui/gtk: Implement basic GTK2 annotation browser perf gtk/annotate: Support multiple event annotation perf gtk/annotate: Show

[PATCH 3/7] perf gtk/annotate: Show source lines with gray color

2013-02-07 Thread Namhyung Kim
From: Namhyung Kim In order to differentiate source lines from asm line, print them with gray color. To do this, it needs to be escaped since sometimes it contains "<" and/or ">" characters so that it should not be considered as a markup tags. Use glib's g_mar

[PATCH 6/7] perf gtk/annotate: Fail early if it can't annotate

2013-02-07 Thread Namhyung Kim
From: Namhyung Kim Don't need to setup a browser window if annotate cannot work. Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/ui/gtk/annotate.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/perf/ui/gtk/annotate.c b/tools/perf/u

[PATCH 7/7] perf annotate: Make it to be able to skip unannotatable symbols

2013-02-07 Thread Namhyung Kim
From: Namhyung Kim Add --skip-missing option for skipping symbols that cannot be used for annotation. It's the case of kernel symbols that user doesn't have a vmlinux image file. Signed-off-by: Namhyung Kim --- tools/perf/builtin-annotate.c | 17 +++-- 1 file c

[PATCH 2/7] perf gtk/annotate: Support multiple event annotation

2013-02-07 Thread Namhyung Kim
From: Namhyung Kim Show multiple annotation result for each evsel. Each result represents the most frquently sampled symbol/function for the evsel and it will be shown in a tab window. For this add a reference to main container (notebook) to the pgctx. At the first call to annotate browser

[PATCH 5/7] perf annotate: Fix warning message on a missing vmlinux

2013-02-07 Thread Namhyung Kim
From: Namhyung Kim When perf annotate runs with no vmlinux file it cannot annotate kernel symbols because the kallsyms only provides symbol addresses. So it recommends to run perf buildid-cache to install proper vmlinux image. But running perf buildid-cache -av vmlinux as the message gives me

[PATCH 1/7] perf ui/gtk: Implement basic GTK2 annotation browser

2013-02-07 Thread Namhyung Kim
Basic implementation of perf annotate on GTK2. Currently only shows first symbol. Add a new --gtk option to use it. Cc: Borislav Petkov Cc: Pekka Enberg Signed-off-by: Namhyung Kim --- tools/perf/Documentation/perf-annotate.txt | 4 +- tools/perf/Makefile| 1

[PATCH 4/7] perf buildid-cache: Add --update option

2013-02-07 Thread Namhyung Kim
From: Namhyung Kim When adding vmlinux file to build-id cache, it'd be fail since kallsyms dso with a same build-id was already added by perf record. So one needs to remove the kallsyms first to add vmlinux into the cache. Add --update option for doing it at once. Signed-off-by: Namhyun

Re: [PATCH 7/7] perf annotate: Make it to be able to skip unannotatable symbols

2013-02-07 Thread Namhyung Kim
Hi Arnaldo, On Mon, 4 Feb 2013 22:12:47 -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Feb 07, 2013 at 06:02:14PM +0900, Namhyung Kim escreveu: >> From: Namhyung Kim >> >> Add --skip-missing option for skipping symbols that cannot be used for >> annotation. It&#

Re: [PATCH 1/2] stop_machine: check work->done while handling enqueued works

2013-02-08 Thread Namhyung Kim
; valid when updating work result. The only user of stop_one_cpu_nowait() is the scheduler active balancer and active_load_balance_cpu_stop() always returns 0. But I think this change makes its sense and the code evolves, so: Reviewed-by: Namhyung Kim Thanks, Namhyung > > Signed-of

Re: [PATCH 2/2] stop_machine: dequeue work before signal completion

2013-02-08 Thread Namhyung Kim
On Fri, 8 Feb 2013 11:42:43 +0800, Hillf Danton wrote: > As checked with BUG_ON in the case of CPU_UP_PREPARE, we have to dequeue > work first for further actions, then stopper reaches sane and clear state. Reviewed-by: Namhyung Kim Thanks, Namhyung -- To unsubscribe from this list: se

Re: [PATCH 0/3] scheduler include file reorganization

2013-02-12 Thread Namhyung Kim
Hi, On Mon, 11 Feb 2013 10:54:58 +0100, Ingo Molnar wrote: > * Clark Williams wrote: > >> I figured that was coming. :) > > ;-) > >> I'll look at it again and see about pulling the >> autogroup/cgroup stuff into it's own header. After that it's >> probably going to require some serious changes.

Re: [patch v6 10/21] sched: get rq potential maximum utilization

2013-04-02 Thread Namhyung Kim
Hi Alex, On Sat, 30 Mar 2013 22:34:57 +0800, Alex Shi wrote: > Since the rt task priority is higher than fair tasks, cfs_rq utilization > is just the left of rt utilization. > > When there are some cfs tasks in queue, the potential utilization may > be yielded, so mulitiplying cfs task number to g

Re: [patch v6 13/21] sched: using avg_idle to detect bursty wakeup

2013-04-02 Thread Namhyung Kim
Hi Alex, On Sat, 30 Mar 2013 22:35:00 +0800, Alex Shi wrote: > Sleeping task has no utiliation, when they were bursty waked up, the > zero utilization make scheduler out of balance, like aim7 benchmark. > > rq->avg_idle is 'to used to accommodate bursty loads in a dirt simple > dirt cheap manner'

Re: [PATCH 6/9] perf sort: Add 'addr' sort key

2013-04-03 Thread Namhyung Kim
Hi Jiri, On Tue, 2 Apr 2013 10:40:14 +0200, Jiri Olsa wrote: > On Tue, Apr 02, 2013 at 11:15:23AM +0900, Namhyung Kim wrote: >> On Mon, 1 Apr 2013 22:40:23 +0200, Jiri Olsa wrote: >> > On Mon, Apr 01, 2013 at 08:35:22PM +0900, Namhyung Kim wrote: >> >> From: Namhy

[PATCHSET 00/10] perf tools: Cleanup for sort keys (v2)

2013-04-03 Thread Namhyung Kim
okay to do it though. I also cleaned up sort__has_sym and sort key eliding code in this version. You can get it from 'perf/sort-v4' branch on my tree at: git://git.kernel.org/pub/scm/linux/kernel/namhyung/linux-perf.git Any comments are welcome, thanks. Namhyung Namhyung Kim (10):

[PATCH 10/10] perf sort: Consolidate sort_entry__setup_elide()

2013-04-03 Thread Namhyung Kim
From: Namhyung Kim The same code was duplicate to places, factor them out to common sort__setup_elide(). Signed-off-by: Namhyung Kim --- tools/perf/builtin-diff.c | 4 +--- tools/perf/builtin-report.c | 20 +--- tools/perf/builtin-top.c| 4 +--- tools/perf/util/sort.c

[PATCH 03/10] perf sort: Add 'addr' sort key

2013-04-03 Thread Namhyung Kim
From: Namhyung Kim New addr sort key provides a way to sort the entries by the symbol addresses. It can be helpful to figure out symbol resolution problem when a dso cannot do it properly as well as finding hotpath in a dso and/or a function. Suggested-by: Arnaldo Carvalho de Melo Buglink

[PATCH 09/10] perf hist browser: Use sort__has_sym

2013-04-03 Thread Namhyung Kim
From: Namhyung Kim The TUI hist browser had a similar variable has_symbols for the same purpose. Let's get rid of the duplication. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/hists.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/pe

[PATCH 08/10] perf top: Use sort__has_sym

2013-04-03 Thread Namhyung Kim
From: Namhyung Kim perf top had a similar variable sort_has_symbols for the same purpose. Signed-off-by: Namhyung Kim --- tools/perf/builtin-top.c | 12 +++- tools/perf/util/top.h| 1 - 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tools/perf/builtin-top.c b

  1   2   3   4   5   6   7   8   9   10   >