[PATCH 3/5] perf tools: Convert invocation of MAKE into SUBDIR

2012-10-26 Thread Namhyung Kim
From: Namhyung Kim This will show directory change info in a consistent form. Also it can be converted again into David Howell's descend command. Cc: Borislav Petkov Cc: David Howells Signed-off-by: Namhyung Kim --- tools/perf/Makefile | 6 +++--- 1 file changed, 3 insertions(

Re: why is perf-report asking for objdump path?

2012-11-01 Thread Namhyung Kim
e was created on an i686 target, but I should be able to > use the x86_64 host objdump if I were doing an annotate. Could you test the below patch? It'd great if you can do it in a reverse situation - using x86_64 target on i686 host. >From f0a9d6303f83452c8b6f81081abae8fdf9c81778 M

Re: [PATCH 00/25] perf test: Add perf_event_attr tests

2012-11-01 Thread Namhyung Kim
Hi, On Fri, 2 Nov 2012 00:20:56 +0100, Jiri Olsa wrote: > On Thu, Nov 01, 2012 at 05:38:01PM -0300, Arnaldo Carvalho de Melo wrote: >> Ah, I just pushed perf/core with this patchset, thanks! > > thanks, > jirka When using current acme/perf/core, I got this: namhyung@sejong:perf$ ./perf test -v p

Re: [PATCH 02/25] perf tests: Move test objects into 'tests' directory

2012-11-01 Thread Namhyung Kim
Hi Jiri, Despite its way to acme's tree, I'd like to leave a few comments. :) On Tue, 30 Oct 2012 23:01:43 +0100, Jiri Olsa wrote: > Separating test objects into 'tests' directory. > > Signed-off-by: Jiri Olsa > Cc: Arnaldo Carvalho de Melo > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Paul M

Re: [PATCHv2 03/25] perf tests: Add framework for automated perf_event_attr tests

2012-11-01 Thread Namhyung Kim
On Wed, 31 Oct 2012 15:52:47 +0100, Jiri Olsa wrote: > Adding automated test to check event's perf_event_attr values. > > The idea is run perf session with kidnapping sys_perf_event_open > function. For each sys_perf_event_open call we store the > perf_event_attr data to the file to be checked late

Re: [PATCH 00/25] perf test: Add perf_event_attr tests

2012-11-01 Thread Namhyung Kim
On Fri, 02 Nov 2012 10:25:18 +0900, Namhyung Kim wrote: > namhyung@sejong:perf$ cat tests/attr/test-stat-group1 > [config] > command = stat > args= -e '{cycles,instructions}' kill >/dev/null 2>&1 > ret = 1 > > [event-1:base-stat] > fd=1

Re: [PATCH 3/3] perf report: Enable the runtime switching of perf data file

2012-11-01 Thread Namhyung Kim
Hi Feng, On Thu, 1 Nov 2012 00:00:57 +0800, Feng Tang wrote: > This is for tui browser only. This patch will check the returned > key of tui hists browser, if it's K_SWITH_INPUT_DATA, then recreate > a session for the new selected data file. You may want to add my previous patch [1] to your patc

[PATCH RESEND 1/3] perf tools: Use normalized arch name for searching objdump path

2012-11-01 Thread Namhyung Kim
From: Namhyung Kim David reported that perf report for i686 target data on x86_64 host failed to work because it tried to find out cross-compiled objdump. However objdump for x86_64 is compatible to i686 so that it doesn't need to do it at all. To prevent similar artifacts, normalize arch

[PATCH 3/3] perf report: Postpone objdump check until annotation requested

2012-11-01 Thread Namhyung Kim
From: Namhyung Kim David reported that current perf report refused to run on a data file captured from a different machine because of objdump. Since the objdump tools won't be used unless annotation was requested, checking its presence at init time doens't make sense. Reported-by: D

[PATCH 2/3] perf tools: Introduce struct hist_browser_timer

2012-11-01 Thread Namhyung Kim
From: Namhyung Kim Currently various hist browser functions receive 3 arguments for refreshing histogram but only used from a few places. Also it's only for perf top command so that it can be NULL for other (and probably most) cases. Pack them into a struct in order to reduce number of

Re: [PATCH V2] perf: Fix parallel build

2012-09-20 Thread Namhyung Kim
Hi again, On Thu, 20 Sep 2012 20:12:50 -0500, Eric Sandeen wrote: > -$(OUTPUT)util/parse-events-flex.c: util/parse-events.l > +$(OUTPUT)util/parse-events-flex.c: util/parse-events.l > util/parse-events-bison.c I realized that the generated *-bison.c files should have $(OUTPUT) prefix since they

Re: [PATCH V3] perf: Fix parallel build

2012-09-20 Thread Namhyung Kim
mu-bison.c > > Adding the following dependencies fixes it for me. > > Signed-off-by: Eric Sandeen Reviewed-by: Namhyung Kim Thanks for fixing this! Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vg

[PATCH 2/4] perf header: Add ->process callbacks to most of features

2012-09-20 Thread Namhyung Kim
>From now on each feature information is processed and saved in perf header so that it can be used wherever needed. The BRANCH_STACK feature is an exception since it needs nothing to be done. Cc: Stephane Eranian Cc: Robert Richter Signed-off-by: Namhyung Kim --- tools/perf/util/heade

[PATCH 0/4] perf header: Save and reuse feature information in header (v4)

2012-09-20 Thread Namhyung Kim
n v2 merged into tip * rebased on current acme/perf/core v1 -> v2: * not touch EVENT_DESC feature handling * split out struct perf_header_info * simplify multi-string handling * add some cleanup patches Namhyung Kim (4): perf header: Add struct perf_session_env perf header: Add ->pro

[PATCH 4/4] perf header: Remove unused @feat arg from ->process callback

2012-09-20 Thread Namhyung Kim
From: Namhyung Kim As the @feat arg is not used anywhere, get rid of it from the signature. Cc: Stephane Eranian Cc: Robert Richter Signed-off-by: Namhyung Kim --- tools/perf/util/header.c | 70 1 file changed, 35 insertions(+), 35 deletions

[PATCH 3/4] perf header: Use pre-processed session env when printing

2012-09-20 Thread Namhyung Kim
>From now on each feature information is processed and saved in perf header so that it can be used for printing. The event desc and branch stack features are not touched since they're not saved. Cc: Stephane Eranian Cc: Robert Richter Signed-off-by: Namhyung Kim --- tools/perf/util/

[PATCH 1/4] perf header: Add struct perf_session_env

2012-09-20 Thread Namhyung Kim
From: Namhyung Kim The struct perf_session_env will preserve environment information at the time of perf record. It can be accessed anytime after parsing a perf.data file if needed. Signed-off-by: Namhyung Kim --- tools/perf/util/header.h | 24 1 file changed, 24

[PATCH 0/6] perf header: Save and reuse feature information in header (v5)

2012-09-24 Thread Namhyung Kim
g handling * add some cleanup patches Namhyung Kim (6): perf header: Add struct perf_session_env perf header: Add ->process callbacks to most of features perf header: Use pre-processed session env when printing perf header: Remove unused @feat arg from ->process callback perf kvm: U

[PATCH 3/6] perf header: Use pre-processed session env when printing

2012-09-24 Thread Namhyung Kim
>From now on each feature information is processed and saved in perf header so that it can be used for printing. The event desc and branch stack features are not touched since they're not saved. Cc: Stephane Eranian Cc: Robert Richter Signed-off-by: Namhyung Kim --- tools/perf/util/

[PATCH 1/6] perf header: Add struct perf_session_env

2012-09-24 Thread Namhyung Kim
From: Namhyung Kim The struct perf_session_env will preserve environment information at the time of perf record. It can be accessed anytime after parsing a perf.data file if needed. Signed-off-by: Namhyung Kim --- tools/perf/util/header.h | 24 1 file changed, 24

[PATCH 4/6] perf header: Remove unused @feat arg from ->process callback

2012-09-24 Thread Namhyung Kim
From: Namhyung Kim As the @feat arg is not used anywhere, get rid of it from the signature. Cc: Stephane Eranian Cc: Robert Richter Signed-off-by: Namhyung Kim --- tools/perf/util/header.c | 70 1 file changed, 35 insertions(+), 35 deletions

[PATCH 2/6] perf header: Add ->process callbacks to most of features

2012-09-24 Thread Namhyung Kim
>From now on each feature information is processed and saved in perf header so that it can be used wherever needed. The BRANCH_STACK feature is an exception since it needs nothing to be done. Cc: Stephane Eranian Cc: Robert Richter Signed-off-by: Namhyung Kim --- tools/perf/util/heade

[PATCH 6/6] perf header: Remove perf_header__read_feature

2012-09-24 Thread Namhyung Kim
From: Namhyung Kim Because its only user builtin-kvm::get_cpu_isa() has gone, It can be removed safely. In general, we have the feature information in perf_session_env already, no need to read it again. Cc: David Ahern Cc: Xiao Guangrong Cc: Dong Hao Signed-off-by: Namhyung Kim --- tools

[PATCH 5/6] perf kvm: Use perf_session_env for reading cpuid

2012-09-24 Thread Namhyung Kim
From: Namhyung Kim We have processed and saved cpuid information to perf_session_env so reuse it for get_cpu_isa(). Cc: David Ahern Cc: Xiao Guangrong Cc: Dong Hao Signed-off-by: Namhyung Kim --- tools/perf/builtin-kvm.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff

Re: [PATCH] block: makes bio_split support bio without data

2012-09-24 Thread Namhyung Kim
Hi, On Mon, 24 Sep 2012 14:56:39 +1000, NeilBrown wrote: > Hi Jens, > this patch has been sitting in my -next tree for a little while and I was > hoping for it to go in for the next merge window. > It simply allows bio_split() to be used on bios without a payload, such as > 'discard'. > Are y

Re: [PATCH v3 1/9] perf hists: Move hists_init() from util/evsel.c to util/hist.c

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 13:02:39 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Sep 24, 2012 at 11:24:03PM +0800, Feng Tang escreveu: >> Which looks more natural > > It is there to avoid dragging the hist code into the python binding :-\ Hmm... it's so hairy. Can't we do better? Thanks, Namhyung -

Re: [PATCH v3 3/9] perf script: Add more filter to find_scripts()

2012-09-24 Thread Namhyung Kim
Hi Feng, On Mon, 24 Sep 2012 23:24:05 +0800, Feng Tang wrote: > As suggested by Arnaldo, many scripts have their own usages and need > capture specific events or tracepoints, so only those scripts whose > targe events match the events in current perf data file should be > listed in the script brow

Re: [PATCH v3 7/9] perf header: Add check_perf_magic() func

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 23:24:09 +0800, Feng Tang wrote: [snip] > +/* Return 0 if matched */ > +int check_perf_magic(u64 magic) > +{ > + if (!memcmp(&magic, __perf_magic1, sizeof(magic)) > + || magic == __perf_magic2 > + || magic == __perf_magic2_sw) > + return 0

Re: [PATCH v3 8/9] perf hists browser: Add option for runtime switching perf data file

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 23:24:10 +0800, Feng Tang wrote: [snip] > + if (!check_perf_magic(magic)) { > + options[nr_options] = strdup(name); > + abs_path[nr_options++] = strdup(path); Need to check return values. > + } > + fc

[PATCH] perf test: Fix build failure

2012-09-24 Thread Namhyung Kim
From: Namhyung Kim The commit 6a6cd11d4e57 ("perf test: Add test for the sched tracepoint format fields") added following build error: CC builtin-test.o builtin-test.c: In function ‘perf_evsel__test_field’: builtin-test.c:1216:6: error: variable ‘ret’ set but not used [-Werror=unus

[PATCH] perf session: Add perf_session__delete_env

2012-09-24 Thread Namhyung Kim
From: Namhyung Kim The perf session environment information was saved (so allocated) during perf_session__open, but was not freed. As free(3) handles NULL pointer input properly it won't cause a issue for writing modes - e.g. perf record. Signed-off-by: Namhyung Kim --- tools/perf

Re: [PATCH 27/30] tools lib traceevent: Carve out events format parsing routine

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 12:59:41 -0300, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > The pevent_parse_event() routine will parse a events/sys/tp/format file > and add an event_format instance to the pevent struct. > > This patch introduces a pevent_parse_format() routine with j

Re: [PATCH 28/30] perf evsel: Provide a new constructor for tracepoints

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 12:59:42 -0300, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > The existing constructor receives a perf_event_attr filled with the > event type and the config. > > To reduce the boilerplate for tracepoints, provide a new constructor, > perf_evsel__newtp()

Re: [PATCH 29/30] perf test: Add test for the sched tracepoint format fields

2012-09-24 Thread Namhyung Kim
On Mon, 24 Sep 2012 12:59:43 -0300, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > So that we make sure the routines that do event format parsing are > working on at least two well know scheduler tracepoints. It caused a build error and I posted a fix, please see: https://l

Re: [RFC/PATCHSET 00/15] perf report: Add support to accumulate hist periods

2012-09-24 Thread Namhyung Kim
Ping. Any comments for this? Arun, thanks for testing! Namhyung On Thu, 13 Sep 2012 16:19:56 +0900, Namhyung Kim wrote: > Hi, > > This is my first attempt to implement cumulative hist period report. > This work begins from Arun's SORT_INCLUSIVE patch [1] but I completely

Re: [PATCH 3/3] perf ui/browser: Fix stale output of sorted result

2012-09-24 Thread Namhyung Kim
Hi Arnaldo, It seems it's not merged into your tree as I still can see this issue. Would you consider applying? Thanks, Namhyung On Fri, 14 Sep 2012 17:35:29 +0900, Namhyung Kim wrote: > From: Namhyung Kim > > The hist_entry__sort_snprintf() can return 0 if all of the sort key

Re: [PATCH] fix compilation error of perf/core

2012-09-25 Thread Namhyung Kim
Hi Dong, On Tue, 25 Sep 2012 16:21:25 +0800, Dong Hao wrote: > From: Dong Hao > > The newest branch of perf/core should have compilation error! > Error log includes: > > builtin-test.c: In function ‘perf_evsel__test_field’: > builtin-test.c:1216:6: error: > variable ‘ret’ set but not used [-Werr

[PATCH] tools lib traceevent: Fix error path on pevent_parse_event

2012-09-25 Thread Namhyung Kim
t() to handle it. Signed-off-by: Namhyung Kim --- tools/lib/traceevent/event-parse.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 17c922145e88..47264b4652b9 100644 --- a/tools/lib/trace

Re: [PATCH v3 1/9] perf hists: Move hists_init() from util/evsel.c to util/hist.c

2012-09-25 Thread Namhyung Kim
2012-09-25 (화), 08:05 -0300, Arnaldo Carvalho de Melo: > Em Tue, Sep 25, 2012 at 10:25:13AM +0900, Namhyung Kim escreveu: > > On Mon, 24 Sep 2012 13:02:39 -0300, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 24, 2012 at 11:24:03PM +0800, Feng Tang escreveu: > > >

Re: [PATCH v2 3/4] perf annotate: configure objdump path at compile time

2012-09-25 Thread Namhyung Kim
Hi Irina, 2012-09-23 (일), 22:27 +0300, Irina Tirdea: > From: Irina Tirdea > > The default name for objdump is "objdump". For cross-compiling the name of > objdump will be different (e.g. arm-eabi-objdump in Android). > > Set the default objdump name in the Makefile with DEFAULT_OBJDUMP_PATH. I

Re: perf tools regression testing was Re: [PATCH v3 1/9] perf hists: Move hists_init() from util/evsel.c to util/hist.c

2012-09-25 Thread Namhyung Kim
2012-09-25 (화), 10:30 -0300, Arnaldo Carvalho de Melo: > Em Tue, Sep 25, 2012 at 09:59:02PM +0900, Namhyung Kim escreveu: > > Now I'm thinking of making it build-time test so that it can be executed > > by make when specific argument is given - e.g. make C=1 ? > > I

[PATCH 10/16] perf report: Make another loop for output resorting

2012-09-26 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 Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 5

[PATCH 02/16] perf hists: Introduce struct he_stat

2012-09-26 Thread Namhyung Kim
From: Namhyung Kim The struct he_stat is for separating out statistics data of a hist entry. It is required for later changes. It's just a mechanical change and should have no functional differences. Cc: Jiri Olsa Cc: Arun Sharma Cc: Frederic Weisbecker Signed-off-by: Namhyun

[PATCH 05/16] perf tools: Keep group information

2012-09-26 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. Cc: Jiri Olsa Cc: Stephane Eranian Signed-off-by: Namhyung Kim --- tools/perf/util/evlist.c | 10 -- tools/perf/util/evlist.h

[PATCH 16/16] perf report: Add --group option

2012-09-26 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 Signed-off-by: Namhyung Kim --- tools/perf/builtin-report.c | 2 ++ 1 file changed, 2 insertions

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

2012-09-26 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 Signed-off-by: Namhyung Kim

[PATCH 04/16] perf hists: Add more helpers for hist entry stat

2012-09-26 Thread Namhyung Kim
From: Namhyung Kim Add and use he_stat__add_{period,stat} for calculating hist entry's stat. It will be used for accumulated stats later as well. Cc: Jiri Olsa Cc: Arun Sharma Cc: Stephane Eranian Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c

[PATCH 03/16] perf hists: Move he->stat.nr_events initialization to a template

2012-09-26 Thread Namhyung Kim
From: Namhyung Kim Since it is set to 1 for a new hist entry, no need to set to separately. Move it to a template entry. Cc: Jiri Olsa Cc: Arun Sharma Cc: Stephane Eranian Cc: Frederic Weisbecker Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 4 +++- 1 file changed, 3

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

2012-09-26 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 Signed-off-by: Namhyung Kim ---

[PATCH 13/16] perf ui/gtk: Add support for event group view

2012-09-26 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 12/16] perf ui/browser: Add support for event group view

2012-09-26 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 Sig

[PATCH 11/16] perf ui/hist: Add support for event group view

2012-09-26 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 Sig

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

2012-09-26 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 Signed-off-by: Namhyung Kim --- tools/perf/util/hist.c | 25 + tools/perf/util/hist.h | 1 + 2 files changed, 26

[PATCH 07/16] perf header: Add HEADER_GROUP_DESC feature

2012-09-26 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 Signed-off-by: Namhyung Kim --- tools/perf/builtin-record.c | 3 + tools/perf/util/header.c| 149

[PATCH 00/16] perf report: Add suppport for event group view (v2)

2012-09-26 Thread Namhyung Kim
/namhyung/linux-perf.git perf/group-v2 Any comments are welcome, thanks, Namhyung v1 -> v2: * save group relation to header (Jiri) * rebase on top of current acme/perf/core [1] https://lkml.org/lkml/2012/7/24/81 [2] https://lkml.org/lkml/2012/9/13/81 Namhyung Kim (16): perf hists:

[PATCH 08/16] perf hists: Collapse group hist_entries to a leader

2012-09-26 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 06/16] perf evlist: Add perf_evlist__recalc_nr_groups

2012-09-26 Thread Namhyung Kim
From: Namhyung Kim During the event parsing, perf_evlist can have leader-only groups which has nr_members as 1. Since they has no difference than a normal non-group event don't count them as a event group. Add perf_evlist__recalc_nr_groups to count actual group numbers. Cc: Jiri Ols

[PATCH 01/16] perf hists: Add missing period_* fields when collapsing a hist entry

2012-09-26 Thread Namhyung Kim
From: Namhyung Kim So that the perf report won't lost the cpu utilization information. For example, if there're two process that have same name. $ perf report --stdio --showcpuutilization -s pid [SNIP] # Overhead sysus Com

Re: [GIT PULL 0/9] perf/core improvements and fixes

2012-10-26 Thread Namhyung Kim
2012-10-26 (금), 09:06 -0600, David Ahern: > On 10/26/12 8:54 AM, Ingo Molnar wrote: > >> perf/core improvements: > >> > >> . perf inject changes to allow showing where a task sleeps, from Andrew > >> Vagin. > >> > >> . Makefile improv

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

2012-10-26 Thread Namhyung Kim
2012-10-26 (금), 12:23 +0200, Jiri Olsa: > On Fri, Oct 26, 2012 at 11:14:45AM +0200, Peter Zijlstra wrote: > > I haven't actually looked at the implementation, but I understood it to > > be a group modifier, not an event modifier. > > we might want to be able to use PERF_SAMPLE_READ for single even

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

2012-10-26 Thread Namhyung Kim
2012-10-26 (금), 10:14 -0600, David Ahern: > On 10/26/12 9:39 AM, Namhyung Kim wrote: > >> hm, thats the unique sample_type issue again ;) Once we set > >> PERF_SAMPLE_READ for event or group, we need to set it for > >> all other events in session, otherwise the repor

Re: [GIT PULL 0/9] perf/core improvements and fixes

2012-10-27 Thread Namhyung Kim
2012-10-26 (금), 19:20 +0200, Borislav Petkov: > On Fri, Oct 26, 2012 at 09:31:15AM -0700, Arnaldo Carvalho de Melo wrote: > > Right, perf'ing perf is a favourite pastime, right? > > Sure, can I get "perfing perf" on a T-shirt please? Well, guys, this is not perfing perf. It's about perfing make

Re: [PATCH 01/33] perf, x86: Add PEBSv2 record support

2012-10-29 Thread Namhyung Kim
Hi Andi, On Fri, 26 Oct 2012 13:29:43 -0700, Andi Kleen wrote: > From: Andi Kleen > > Add support for the v2 PEBS format. It has a superset of the v1 PEBS > fields, but has a longer record so we need to adjust the code paths. > > The main advantage is the new "EventingRip" support which directly

Re: [PATCH 10/33] perf, tools: Add abort,notx,intx branch filter options to perf report -j v2

2012-10-29 Thread Namhyung Kim
Just minor nitpicks.. On Fri, 26 Oct 2012 13:29:52 -0700, Andi Kleen wrote: > From: Andi Kleen > > Make perf report -j aware of the new intx,notx,abort branch qualifiers. s/report/record/ The same goes to the subject line too. > > v2: ABORT -> ABORTTX > Signed-off-by: Andi Kleen > --- > too

Re: [PATCH 16/33] perf, tools: Add support for weight v2

2012-10-29 Thread Namhyung Kim
On Fri, 26 Oct 2012 13:29:58 -0700, Andi Kleen wrote: > From: Andi Kleen > > perf record has a new option -W that enables weightened sampling. > > Add sorting support in top/report for the average weight per sample and the > total weight sum. This allows to both compare relative cost per event > a

Re: [PATCH 21/33] perf, tools: Add support for record transaction flags

2012-10-29 Thread Namhyung Kim
On Fri, 26 Oct 2012 13:30:03 -0700, Andi Kleen wrote: > From: Andi Kleen > > Add the glue in the user tools to record transaction flags with > --transaction (-T was already taken) and dump them. > > Followon patches will use them. > > Signed-off-by: Andi Kleen > --- > tools/perf/Documentation/pe

Re: [PATCH 0/5] perf dso: Separate dso symbols to separate object

2012-10-29 Thread Namhyung Kim
Hi Jiri, On Sat, 27 Oct 2012 23:18:27 +0200, Jiri Olsa wrote: > hi, > separating dso related stuff into dso object plus some other symbol > object cleanup. It's just a code moving, no actual change was done. > > Attached patches: > 1/5 perf tool: Move build_id__sprintf into build-id object > 2

Re: [PATCH 0/5] perf dso: Separate dso symbols to separate object

2012-10-29 Thread Namhyung Kim
On Mon, 29 Oct 2012 12:13:28 +0100, Jiri Olsa wrote: > On Mon, Oct 29, 2012 at 08:07:48PM +0900, Namhyung Kim wrote: >> Hi Jiri, >> >> On Sat, 27 Oct 2012 23:18:27 +0200, Jiri Olsa wrote: >> > hi, >> > separating dso related stuff into dso object plus some

Re: [PATCH] Documentation: insert an additional information to android.txt

2012-10-29 Thread Namhyung Kim
2012-10-29 (월), 22:41 +0900, Joonsoo Kim: > Without defining ARCH=arm, building a perf for Android ARM will be failed, > because it needs architecture specific files. > So add related information to a document. > > Signed-off-by: Joonsoo Kim Reviewed-by: Namhyung Kim Thanks, N

Re: [PATCH 1/2] perf header: Fix numa topology printing

2012-10-29 Thread Namhyung Kim
2012-10-24 (수), 09:49 +0200, Andrew Jones: > On Wed, Oct 24, 2012 at 04:00:08PM +0900, Namhyung Kim wrote: > > On Tue, 23 Oct 2012 16:12:19 +0200, Andrew Jones wrote: > > > On Tue, Oct 23, 2012 at 10:44:49PM +0900, Namhyung Kim wrote: > > >> Andrew reported that

Re: [RFC/PATCHSET 00/15] perf report: Add support to accumulate hist periods

2012-10-29 Thread Namhyung Kim
Hi Arun and Peter, On Mon, 29 Oct 2012 14:36:01 -0700, Arun Sharma wrote: > On 10/29/12 12:08 PM, Peter Zijlstra wrote: > >> Right, so I tried this and I would expect the callchains to be inverted >> too, so that when I expand say 'c' I would see that 'c' calls 'b' for >> 100% which calls 'a' for

Re: [PATCH 1/9] perf python: add ui stubs file

2012-10-30 Thread Namhyung Kim
Hi David, On Mon, 29 Oct 2012 10:31:41 -0600, David Ahern wrote: > stdio based implementations of ui_ based functions for the python > library. Needed for patch 3 - consolidating open counters method. How about adding ui/util.c to the python-ext-sources? Thanks, Namhyung -- To unsubscribe fr

Re: [PATCH 2/9] perf top: make use of perf_record_opts

2012-10-30 Thread Namhyung Kim
On Mon, 29 Oct 2012 10:31:42 -0600, David Ahern wrote: > Changes top code to use the perf_record_opts struct. Stepping stone to > consolidating the open counters code. Maybe time to rename perf_record_opts to perf_open_opts or just perf_opts? Thanks, Namhyung -- To unsubscribe from this list: sen

Re: [BUG] perf report: different reports when run on terminal as opposed to script

2012-10-30 Thread Namhyung Kim
Hi Dhaval, On Mon, 29 Oct 2012 12:45:53 -0400, Dhaval Giani wrote: > On Mon, Oct 29, 2012 at 12:01 PM, Dhaval Giani wrote: >> Hi, >> >> As part of a class assignment I have to collect some performance >> statistics. In order to do so I run >> >> perf record -g >> >> And in another window, I star

Re: [Patch v1 04/10] perf/x86: add memory profiling via PEBS Load Latency

2012-10-30 Thread Namhyung Kim
Hi Stephane, On Mon, 29 Oct 2012 16:15:46 +0100, Stephane Eranian wrote: > + /* > + * use the mapping table for bit 0-15 > + */ > + val = pebs_data_source[dse.ld_dse]; I guess you meant bit 0-3, right? Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscrib

Re: [Patch v1 06/10] perf/x86: add support for PEBS Precise Store

2012-10-30 Thread Namhyung Kim
On Mon, 29 Oct 2012 16:15:48 +0100, Stephane Eranian wrote: > This patch adds support for PEBS Precise Store > which is available on Intel Sandy Bridge and > Ivy Bridge processors. > > To use Precise store, the proper PEBS event > must be used: mem_trans_retired:precise_stores. > For the perf tool,

Re: [Patch v1 07/10] perf tools: add mem access sampling core support

2012-10-30 Thread Namhyung Kim
On Mon, 29 Oct 2012 16:15:49 +0100, Stephane Eranian wrote: > This patch adds the sorting and histogram support > functions to enable profiling of memory accesses. > > The following sorting orders are added: > - symbol_daddr: data address symbol (or raw address) > - dso_daddr: data address shared

Re: [Patch v1 08/10] perf report: add support for mem access profiling

2012-10-30 Thread Namhyung Kim
On Mon, 29 Oct 2012 16:15:50 +0100, Stephane Eranian wrote: > This patch adds the --mem-mode option to perf report. > > This mode requires a perf.data file created with memory > access samples. > > Signed-off-by: Stephane Eranian > --- [snip] > + cost = mi->cost; > + if (!cost) > +

Re: [Patch v1 10/10] perf tools: add new mem command for memory access profiling

2012-10-30 Thread Namhyung Kim
On Mon, 29 Oct 2012 16:15:52 +0100, Stephane Eranian wrote: > This new command is a wrapper on top of perf record and > perf report to make it easier to configure for memory > access profiling. So this new command will be run only on speicific (PEBS > 2?) Intel machines, right? Is there anything

Re: [BUG] perf report: different reports when run on terminal as opposed to script

2012-10-31 Thread Namhyung Kim
On Tue, 30 Oct 2012 08:05:45 -0400, Dhaval Giani wrote: > On Tue, Oct 30, 2012 at 3:42 AM, Namhyung Kim wrote: >> Hi Dhaval, >> >> On Mon, 29 Oct 2012 12:45:53 -0400, Dhaval Giani wrote: >>> On Mon, Oct 29, 2012 at 12:01 PM, Dhaval Giani >>> wrote

Re: [PATCH 1/9] perf python: add ui stubs file

2012-10-31 Thread Namhyung Kim
On Tue, 30 Oct 2012 08:53:38 -0700, Arnaldo Carvalho de Melo wrote: > Em Tue, Oct 30, 2012 at 08:45:28AM -0600, David Ahern escreveu: >> On 10/30/12 1:24 AM, Namhyung Kim wrote: >> >On Mon, 29 Oct 2012 10:31:41 -0600, David Ahern wrote: >> >>stdio based implementati

Re: [RFC/PATCHSET 00/15] perf report: Add support to accumulate hist periods

2012-10-31 Thread Namhyung Kim
On Tue, 30 Oct 2012 10:01:10 +0100, Ingo Molnar wrote: > * Peter Zijlstra wrote: > >> On Tue, 2012-10-30 at 15:59 +0900, Namhyung Kim wrote: > >> > Yes, the callchain part needs to be improved. Peter's idea >> > indeed looks good to me too. >> >&g

[PATCH/RFC] perf list: Skip unsupported events

2013-08-26 Thread Namhyung Kim
From: Namhyung Kim Some hardware events might not be supported on a system. Listing those events seems meaningless and confusing to users. Let's skip them. Before: $ perf list cache | wc -l 33 After: $ perf list cache | wc -l 27 Signed-off-by: Namhyung Kim --- tools/perf

[PATCH/RFC v2] perf list: Skip unsupported events

2013-08-26 Thread Namhyung Kim
From: Namhyung Kim Some hardware events might not be supported on a system. Listing those events seems meaningless and confusing to users. Let's skip them. Before: $ perf list cache | wc -l 33 After: $ perf list cache | wc -l 27 Signed-off-by: Namhyung Kim --- * fixed a build

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

2013-08-27 Thread Namhyung Kim
Hi Arnaldo, Sorry for late reply. On Mon, 19 Aug 2013 12:17:34 -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Aug 19, 2013 at 11:05:00AM -0300, Arnaldo Carvalho de Melo escreveu: >> But I expected that after the first patch 'perf --gtk' would work, and >> it doesn't. >> >> Now even after I app

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

2013-08-27 Thread Namhyung Kim
Hi Steven, On Thu, 22 Aug 2013 21:08:30 -0400, Steven Rostedt wrote: > On Fri, 23 Aug 2013 07:57:15 +0800 > "zhangwei(Jovi)" wrote: > > >> > >> > What about creating a per cpu buffer when uprobes are registered, and >> > delete them when they are finished? Basically what trace_printk() does >> >

[PATCH 01/13] tracing/uprobes: Fix documentation of uprobe registration syntax

2013-08-27 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 --- Documentation/trace/uprobetracer.txt | 10

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

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

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

2013-08-27 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. Acked-by: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nes

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

2013-08-27 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 10/13] tracing/uprobes: Fetch args before reserving a ring buffer

2013-08-27 Thread Namhyung Kim
From: Namhyung Kim Fetching from user space should be done in a non-atomic context. So use a per-cpu buffer and copy its content to the ring buffer atomically. Note that we can migrate during accessing user memory thus use a per-cpu mutex to protect concurrent accesses. This is needed since

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

2013-08-27 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 13/13] tracing/uprobes: Add support for full argument access methods

2013-08-27 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. The format for the argument types are same as kprobes (but @SYMBOL type is not supported for uprobes), i.e: @ADDR : Fetch memory at

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

2013-08-27 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. Acked-by: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de

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

2013-08-27 Thread Namhyung Kim
Cc: Srikar 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

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

2013-08-27 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. Acked-by: Masami Hiramatsu Cc: Srikar Dronamraju Cc: Oleg Nesterov Cc: zhangwei(Jovi) Cc: Arnaldo Carvalho de Melo Signed-off-by: Namhyung Kim --- kernel/trace

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

2013-08-27 Thread Namhyung Kim
From: Namhyung Kim Convert struct trace_uprobe to make use of the common trace_probe structure. 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 | 151

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

2013-08-27 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 02/13] tracing/probes: Fix basic print type functions

2013-08-27 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

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

2013-08-27 Thread Namhyung Kim
ncheol 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 documentation of uprobe registration syntax tracing/probes: Fix basic print type functions tracing/kprobes: Staticiz

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