Re: [PATCH v13 02/14] perf, tools, jevents: Program to convert JSON file to C style file

2015-06-03 Thread Jiri Olsa
On Tue, Jun 02, 2015 at 10:12:02AM -0700, Sukadev Bhattiprolu wrote: SNIP + * If we fail to locate/process JSON and map files, create a NULL mapping + * table. This would at least allow perf to build even if we can't find/use + * the aliases. + */ +static void create_empty_mapping(const

Re: [PATCH v13 06/14] perf, tools: Support alias descriptions

2015-06-03 Thread Jiri Olsa
On Tue, Jun 02, 2015 at 10:12:06AM -0700, Sukadev Bhattiprolu wrote: SNIP @@ -1033,37 +1064,49 @@ void print_pmu_events(const char *event_glob, bool name_only) event_glob continue; -

Re: [PATCH v8] perf: __kmod_path__parse: deal with kernel module names in '[]' correctly

2015-06-03 Thread Jiri Olsa
On Wed, Jun 03, 2015 at 08:52:21AM +, Wang Nan wrote: Before patch ba92732e9808df679ddf75c5ea1c0caae6d7dce2 ('perf kmaps: Check kmaps to make code more robust'), perf report and perf annotate will segfault if trace data contains kernel module information like this: Acked-by: Jiri Olsa jo

Re: [PATCH v7] perf: __kmod_path__parse: deal with kernel module names in '[]' correctly

2015-06-03 Thread Jiri Olsa
On Wed, Jun 03, 2015 at 07:49:23AM +, Wang Nan wrote: SNIP diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index b335db3..87f5796 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -166,12 +166,28 @@ bool is_supported_compression(const char *ext) return

Re: [PATCH v13 12/14] perf, tools: Add support for event list topics

2015-06-03 Thread Jiri Olsa
On Wed, Jun 03, 2015 at 05:57:33AM -0700, Andi Kleen wrote: please split at least the jevents Topic parsing from the rest idelay also the alias update and the display change What's the point of all these splits? It's already one logical unit, not too large, and is bisectable. splitting

[PATCH 4/9] perf stat: Remove transaction_run from shadow update/print code

2015-06-03 Thread Jiri Olsa
It's no longer needed, because we use nameid to recognize transaction events. Keeping it only in stat code to initialize transaction events. Link: http://lkml.kernel.org/n/tip-eo93tek7cjy8zqdvfd6f5...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 14

[PATCH 5/9] perf stat: Introduce reset_shadow_stats function

2015-06-03 Thread Jiri Olsa
Move shadow counters reset code into separate function as preparation for moving it into its own object. Link: http://lkml.kernel.org/n/tip-0i8ssz8kj0rpp5r699srq...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 21 + 1 file changed

[PATCH 7/9] perf stat: Add output file argument to print_shadow_stats function

2015-06-03 Thread Jiri Olsa
As preparation for moving shadow counters code into its own object. Link: http://lkml.kernel.org/n/tip-uhx2opot7qtd3xdq9pvx4...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 112 +++--- 1 file changed, 56

[PATCH 2/9] perf stat: Replace transaction event possition check with id check

2015-06-03 Thread Jiri Olsa
Using perf_stat::id to check for transaction events, instead of current possition based way. Link: http://lkml.kernel.org/n/tip-ewc81hslqwhaljvlock51...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 55

[PATCH 9/9] perf stat: Move shadow stat counters into separate object

2015-06-03 Thread Jiri Olsa
Separating shadow counters code into separate object as a cleanup, but mainly for upcomming changes, so could use it from script command context. Link: http://lkml.kernel.org/n/tip-ic34l55jem02kx4h3wodn...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c

[PATCH 6/9] perf stat: Introduce print_shadow_stats function

2015-06-03 Thread Jiri Olsa
Move shadow counters display code into separate function as preparation for moving it into its own object. Link: http://lkml.kernel.org/n/tip-loph8qgefq6664yqko3jg...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 72

[PATCH 1/9] perf stat: Add id into perf_stat struct

2015-06-03 Thread Jiri Olsa
://lkml.kernel.org/n/tip-9lnvjksibrs0flhkpix2q...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 6 ++ tools/perf/util/stat.c| 31 ++- tools/perf/util/stat.h| 20 3 files changed, 52 insertions(+), 5 deletions

[PATCHv2 0/9] perf stat: Separate shadow counters code

2015-06-03 Thread Jiri Olsa
/jolsa/perf.git perf/shadow I tested on Haswel with limited set of transaction events, but all seemed ok. thanks, jirka --- Jiri Olsa (9): perf stat: Add id into perf_stat struct perf stat: Replace transaction event possition check with id check perf stat: Remove setup_events

[PATCH 3/9] perf stat: Remove setup_events function

2015-06-03 Thread Jiri Olsa
We can use already existing parse_events interface. Both transaction_attrs and transaction_limited_attrs are changed to be single strings. Link: http://lkml.kernel.org/n/tip-9r37hrfb81v16xthafgxt...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 27

[PATCH 8/9] perf stat: Add aggr_mode argument to print_shadow_stats function

2015-06-03 Thread Jiri Olsa
As preparation for moving shadow counters code into its own object. Link: http://lkml.kernel.org/n/tip-kdgryri2kahing584g5is...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools

Re: [PATCH 1/9] perf tools: Add nameid value into evsel object

2015-06-02 Thread Jiri Olsa
On Tue, Jun 02, 2015 at 03:10:56PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 02, 2015 at 12:59:55AM +0200, Jiri Olsa escreveu: Adding a way to tag an evsel object with ID value based on its name. It will be used for transaction events, but could be useful for others. For what

Re: [PATCH 4/9] perf stat: Remove transaction_run from shadow update/print code

2015-06-03 Thread Jiri Olsa
On Wed, Jun 03, 2015 at 12:10:38PM -0300, Arnaldo Carvalho de Melo wrote: Em Wed, Jun 03, 2015 at 04:25:54PM +0200, Jiri Olsa escreveu: It's no longer needed, because we use nameid to recognize transaction events. Keeping it only in stat code to initialize transaction events. Lemme

Re: [PATCHv3] perf stat: Add id into perf_stat struct

2015-06-09 Thread Jiri Olsa
On Mon, Jun 08, 2015 at 11:03:40AM -0300, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 04, 2015 at 03:50:55PM +0200, Jiri Olsa escreveu: On Wed, Jun 03, 2015 at 04:25:51PM +0200, Jiri Olsa wrote: We need fast way to identify evsel as transaction event for shadow counters computation

[PATCHv3] perf stat: Add id into perf_stat struct

2015-06-04 Thread Jiri Olsa
On Wed, Jun 03, 2015 at 04:25:51PM +0200, Jiri Olsa wrote: We need fast way to identify evsel as transaction event for shadow counters computation. Currently we are using possition (in evlist) based way. Adding 'id' into 'struct perf_stat' so it can carry transaction event ID and we can use

Re: [PATCH 01/26] perf tools: Change thread_map::map into struct

2015-06-22 Thread Jiri Olsa
On Mon, Jun 22, 2015 at 11:40:16AM -0300, Arnaldo Carvalho de Melo wrote: SNIP +++ b/tools/perf/tests/openat-syscall-tp-fields.c @@ -45,7 +45,7 @@ int test__syscall_openat_tp_fields(void) perf_evsel__config(evsel, opts); - evlist-threads-map[0] =

[PATCH 26/27] perf stat: Introduce print_counters function

2015-06-22 Thread Jiri Olsa
Centralize counters print code into single print_counters function. Link: http://lkml.kernel.org/n/tip-1vae9jeuab2db5wxq820s...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 127 +++--- 1 file changed, 64

[PATCH 20/27] perf stat: Separate counters reading and processing

2015-06-22 Thread Jiri Olsa
...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 56 +-- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 158859e622d3..74ac92baa2bd 100644

[PATCH 16/27] perf stat: Move perf_evlist__(alloc|free|reset)_stats into stat object

2015-06-22 Thread Jiri Olsa
Moving perf_evlist__(alloc|free|reset)_stats into stat object, so it could be used in following patches. Link: http://lkml.kernel.org/n/tip-8dwmf838kipxabe0vay8h...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 42

[PATCH 24/27] perf stat: Rename print_interval to process_interval

2015-06-22 Thread Jiri Olsa
It suits better, because the function also reads counter's data. Also the 'print_interval' name will be used in following generalization of counters display. Link: http://lkml.kernel.org/n/tip-8dwmf838kipxabe0vay8h...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf

[PATCH 12/27] perf stat: Rename struct perf_counts::cpu member to values

2015-06-22 Thread Jiri Olsa
Renaming 'struct xyarray *cpu' pointer to more fitting/generic values, because now we store both cpu and thread values. Link: http://lkml.kernel.org/n/tip-fee055ta61vlnjfjzurmy...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/stat.c | 12 ++-- tools/perf

[PATCH 19/27] perf stat: Introduce read_counters function

2015-06-22 Thread Jiri Olsa
in the same way as 'perf stat' command does. Link: http://lkml.kernel.org/n/tip-yi40dw75mmzib0m37u11m...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 47 ++- 1 file changed, 22 insertions(+), 25 deletions(-) diff

[PATCH 22/27] perf stat: Move perf_stat initialization counter process code

2015-06-22 Thread Jiri Olsa
Moving perf_stat initialization counter process code, to make the reading path free of processing logic. Link: http://lkml.kernel.org/n/tip-ne0sgdk0ip9f81tfiqaup...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 5 + 1 file changed, 1 insertion(+), 4

[PATCH 08/27] perf tests: Add thread_map object tests

2015-06-22 Thread Jiri Olsa
Adding thread_map object tests for comm name values. Link: http://lkml.kernel.org/n/tip-opjrl8os3je8wl93ujkm8...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 tools/perf/tests/tests.h| 1

[PATCH 02/27] perf tools: Add comm string into struct thread_map

2015-06-22 Thread Jiri Olsa
-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/python-ext-sources | 1 + tools/perf/util/thread_map.c | 67 -- tools/perf/util/thread_map.h | 12 +++ 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/python-ext

[PATCH 09/27] perf stat: Introduce perf_counts function

2015-06-22 Thread Jiri Olsa
Introducing perf_counts function, that returns 'struct perf_counts_values' pointer for given cpu. Also moving perf_counts* structures into stat.h. Link: http://lkml.kernel.org/n/tip-qu64zmm5zbpbkuybusnkg...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c

[PATCH 10/27] perf stat: Use xyarray for cpu evsel counts

2015-06-22 Thread Jiri Olsa
Switching single dimensional array of 'struct perf_counts_values' with xyarray object, so we could store thread dimension counts. Link: http://lkml.kernel.org/n/tip-t1wefzwb3z78sjlpzt95l...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 2

[PATCH 03/27] perf tools: Add reference counting for cpu_map object

2015-06-22 Thread Jiri Olsa
Adding refference counting for cpu_map object, so it could be easily shared among other objects. Using cpu_map__put instead cpu_map__delete and making cpu_map__delete static. Link: http://lkml.kernel.org/n/tip-gwy96ohuwhjz603bnf70a...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org

[PATCH 04/27] perf tools: Add reference counting for thread_map object

2015-06-22 Thread Jiri Olsa
Adding refference counting for thread_map object, so it could be easily shared among other objects. Using thread_map__put instead thread_map__delete and making thread_map__delete static. Link: http://lkml.kernel.org/n/tip-myadl53clbkjvzeqolwp9...@git.kernel.org Signed-off-by: Jiri Olsa jo

[PATCH 01/27] perf tools: Change thread_map::map into struct

2015-06-22 Thread Jiri Olsa
We need to store command names with the pid. Changing map to be struct holding pid. Process name is coming in shortly. Link: http://lkml.kernel.org/n/tip-z4zuyvcxa6glzqm8qubk6...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-trace.c | 4

[PATCH 05/27] perf tools: Propagate cpu maps through the evlist

2015-06-22 Thread Jiri Olsa
Propagate evlist's cpu_map object through all the evsel objects, while keeping already configured evsel-cpus. It'll be handy to access evsel's cpus directly in following patches. Link: http://lkml.kernel.org/n/tip-myadl53clbkjvzeqolwp9...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org

[PATCH 13/27] perf stat: Introduce perf_evlist__reset_stats

2015-06-22 Thread Jiri Olsa
To fit in with the rest of the helpers (alloc and free). Link: http://lkml.kernel.org/n/tip-dqgpvhc4b2rius8gv65df...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf

[PATCH 06/27] perf tools: Propagate thread maps through the evlist

2015-06-22 Thread Jiri Olsa
-6vc92bytyy2d6c5entm5s...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evlist.c | 4 +++- tools/perf/util/evsel.c | 1 + tools/perf/util/evsel.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index

[PATCH 11/27] perf stat: Make stats work over the thread dimension

2015-06-22 Thread Jiri Olsa
Now that we have space for thread dimension counts, let's store it. Link: http://lkml.kernel.org/n/tip-vvu96knzwli7ajpjz7qu8...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 32 +- tools/perf/tests/openat

[PATCH 07/27] perf tools: Make perf_evsel__(nr_)cpus generic

2015-06-22 Thread Jiri Olsa
Because we now propagate all evlist's cpu_maps and thread_map objects through all evsels, the perf_evsel__(nr_)cpus no longer need to be specific to stat object and check evlist and target objects. Link: http://lkml.kernel.org/n/tip-3pp2i969cmewv580k6qvd...@git.kernel.org Signed-off-by: Jiri Olsa

[PATCHv4 00/27] perf stat: Introduce --per-thread option

2015-06-22 Thread Jiri Olsa
- using init_stats to initialize 'struct stats*' - change TASK-$pid output into $comm-$pid - updated doc with --per-task option thanks, jirka --- Jiri Olsa (27): perf tools: Change thread_map::map into struct perf tools: Add comm string into struct thread_map perf tools: Add

[PATCH 27/27] perf stat: Introduce --per-thread option

2015-06-22 Thread Jiri Olsa
://lkml.kernel.org/n/tip-0v0ixd9k7o9z1u8hqngm1...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/Documentation/perf-stat.txt | 4 ++ tools/perf/builtin-stat.c | 68 +- tools/perf/util/stat.h | 1 + 3 files changed, 71

[PATCH 14/27] perf stat: Move perf_evsel__(alloc|free|reset)_stat_priv into stat object

2015-06-22 Thread Jiri Olsa
Moving perf_evsel__(alloc|free|reset)_stat_priv into stat object, so it could be used outside stat command in following patches. Link: http://lkml.kernel.org/n/tip-ti0tocuk8fuw0zb7puyuw...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 25

[PATCH 15/27] perf stat: Move perf_evsel__(alloc|free)_prev_raw_counts into stat object

2015-06-22 Thread Jiri Olsa
Moving perf_evsel__(alloc|free)_prev_raw_counts into stat object, so it could be used in following patches. Link: http://lkml.kernel.org/n/tip-am4oi22oasuy97bc4mt8i...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 18 -- tools/perf/util

[PATCH 21/27] perf stat: Move zero_per_pkg into counter process code

2015-06-22 Thread Jiri Olsa
Moving zero_per_pkg into counter process code, to make the reading path free of processing logic. Link: http://lkml.kernel.org/n/tip-wi2ces8lzpzip39yes2f9...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 25/27] perf stat: Using init_stats instead of memset

2015-06-22 Thread Jiri Olsa
The init_stats function is meant to init 'struct stats'. Reported-by: David Ahern dsah...@gmail.com Link: http://lkml.kernel.org/n/tip-secivjava21t7921lkpy0...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 17/27] perf stat: Introduce perf_evsel__alloc_stats function

2015-06-22 Thread Jiri Olsa
Move all stat allocation logic related to stat object under single function. This way we can use it separately for stat object out of evlist object. Link: http://lkml.kernel.org/n/tip-hclg66nszn5mx8t9uwrxx...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/stat.c

[PATCH 18/27] perf stat: Introduce perf_evsel__read function

2015-06-22 Thread Jiri Olsa
Adding simple read function that reads/store data into given struct perf_counts_values *count object. Link: http://lkml.kernel.org/n/tip-9r2zmzq0vkw8l300usq82...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evsel.c | 14 ++ tools/perf/util/evsel.h | 3

[PATCH 23/27] perf stat: Remove perf_evsel__read_cb function

2015-06-22 Thread Jiri Olsa
It's no longer used, the stat command uses perf_evsel__read now. Link: http://lkml.kernel.org/n/tip-5yh5pg1mw9wefhup1vvts...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evsel.c | 16 tools/perf/util/evsel.h | 7 --- 2 files changed, 23

Re: [PATCH 03/27] perf tools: Add reference counting for cpu_map object

2015-06-23 Thread Jiri Olsa
On Tue, Jun 23, 2015 at 06:06:45PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 23, 2015 at 12:36:04AM +0200, Jiri Olsa escreveu: -void cpu_map__delete(struct cpu_map *map) +static void cpu_map__delete(struct cpu_map *map) { - free(map); + if (map) { + WARN_ONCE

Re: [PATCH 02/27] perf tools: Add comm string into struct thread_map

2015-06-23 Thread Jiri Olsa
On Tue, Jun 23, 2015 at 06:01:58PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 23, 2015 at 12:36:03AM +0200, Jiri Olsa escreveu: Adding support to hold comm name together with pids in 'struct thread_map'. It will be useful for --per-thread option to display task pid together

Re: [PATCH 01/26] perf tools: Change thread_map::map into struct

2015-06-19 Thread Jiri Olsa
On Fri, Jun 19, 2015 at 06:07:13PM -0300, Arnaldo Carvalho de Melo wrote: Em Thu, Jun 18, 2015 at 11:48:40PM +0200, Jiri Olsa escreveu: We need to store command names with the pid. Changing map to be struct holding pid. Process name is coming in shortly. Link: http://lkml.kernel.org/n

Re: [PATCH 02/27] perf tools: Add comm string into struct thread_map

2015-06-25 Thread Jiri Olsa
On Thu, Jun 25, 2015 at 11:39:27AM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 23, 2015 at 11:56:18PM +0200, Jiri Olsa escreveu: On Tue, Jun 23, 2015 at 06:01:58PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 23, 2015 at 12:36:03AM +0200, Jiri Olsa escreveu: Adding support

Re: [PATCH 12/13] perf thread_map: Change map entries into a struct

2015-06-25 Thread Jiri Olsa
On Tue, Jun 23, 2015 at 06:47:26PM -0300, Arnaldo Carvalho de Melo wrote: From: Jiri Olsa jo...@kernel.org We need to store command names with the pid. Changing map entries to be a struct holding pid. Process name is coming in shortly. Signed-off-by: Jiri Olsa jo...@kernel.org Cc: Adrian

Re: [PATCHv4 00/27] perf stat: Introduce --per-thread option

2015-06-23 Thread Jiri Olsa
On Mon, Jun 22, 2015 at 08:06:00PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 23, 2015 at 12:36:01AM +0200, Jiri Olsa escreveu: hi, adding the possibility to display stat data per thread. Allowing following commands and output: $ perf stat -e cycles,instructions --per

[PATCH 0/3] perf tool: Build fixes

2015-06-22 Thread Jiri Olsa
hi, sending some build fixes. Also available in here: git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git perf/make_test thanks, jirka --- Jiri Olsa (3): perf tests: Add testing for Makefile.perf perf tests: Add test for make install with prefix perf build: Fix

[PATCH 2/3] perf tests: Add test for make install with prefix

2015-06-22 Thread Jiri Olsa
Lukas Wunner reported issue (and fix) with 'make install prefix=...'. Adding automated test for this, so it wouldn't happen again. Link: http://lkml.kernel.org/n/tip-qfcf64pquysrw6533ku9i...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/tests/make | 8 1 file

[PATCH 3/3] perf build: Fix single target build dependency check

2015-06-22 Thread Jiri Olsa
-yrix4k0nb2fgmtzvmvxr2...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Makefile b/tools/perf/Makefile index d31a7bbd7cee..480546d5f13b 100644 --- a/tools/perf/Makefile +++ b/tools

[PATCH 1/3] perf tests: Add testing for Makefile.perf

2015-06-22 Thread Jiri Olsa
indentation for make_kernelsrc and make_kernelsrc_tools tests. Link: http://lkml.kernel.org/n/tip-fr9fdnme6d71pmj5xowb8...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/tests/make | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/tools

Re: [PATCH regression 4.0 - 4.1] tools perf: Fix build breakage if prefix= is specified

2015-06-18 Thread Jiri Olsa
On Thu, Jun 18, 2015 at 01:00:32PM +0200, Lukas Wunner wrote: Invoking Makefile.perf with prefix= breaks the build since Makefile.perf hands that variable down to Makefile.build where it overrides prefix := $(subst ./,,$(OUTPUT)$(dir)/) leading to errors like this: No rule to

[PATCH 04/26] perf tools: Add reference counting for thread_map object

2015-06-18 Thread Jiri Olsa
Adding refference counting for thread_map object, so it could be easily shared among other objects. Using thread_map__put instead thread_map__delete and making thread_map__delete static. Link: http://lkml.kernel.org/n/tip-myadl53clbkjvzeqolwp9...@git.kernel.org Signed-off-by: Jiri Olsa jo

Re: [PATCH regression 4.0 - 4.1] tools perf: Fix build breakage if prefix= is specified

2015-06-18 Thread Jiri Olsa
On Thu, Jun 18, 2015 at 10:39:35PM +0200, Lukas Wunner wrote: Hi David, On Thu, Jun 18, 2015 at 02:26:25PM -0600, David Ahern wrote: It worked for me last week with OL6. I created a standalone perf rpm with 4.1-rc6; it builds just fine with _prefix (rpm variable) set to /usr: [...]

[PATCH 26/26] perf stat: Introduce --per-thread option

2015-06-18 Thread Jiri Olsa
://lkml.kernel.org/n/tip-0v0ixd9k7o9z1u8hqngm1...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/Documentation/perf-stat.txt | 4 ++ tools/perf/builtin-stat.c | 68 +- tools/perf/util/stat.h | 1 + 3 files changed, 71

[PATCH 22/26] perf stat: Remove perf_evsel__read_cb function

2015-06-18 Thread Jiri Olsa
It's no longer used, the stat command uses perf_evsel__read now. Link: http://lkml.kernel.org/n/tip-5yh5pg1mw9wefhup1vvts...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evsel.c | 16 tools/perf/util/evsel.h | 7 --- 2 files changed, 23

Re: [PATCH regression 4.0 - 4.1] tools perf: Fix build breakage if prefix= is specified

2015-06-18 Thread Jiri Olsa
to make target '/usrabspath.o', needed by '/usrlibperf-in.o' Fixes: c819e2cf2eb6f65d3208d195d7a0edef6108d5 Signed-off-by: Lukas Wunner lu...@wunner.de Acked-by: Jiri Olsa jo...@kernel.org thanks, jirka -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

[PATCH 21/26] perf stat: Move perf_stat initialization counter process code

2015-06-18 Thread Jiri Olsa
Moving perf_stat initialization counter process code, to make the reading path free of processing logic. Link: http://lkml.kernel.org/n/tip-ne0sgdk0ip9f81tfiqaup...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 5 + 1 file changed, 1 insertion(+), 4

[PATCH 25/26] perf stat: Introduce print_counters function

2015-06-18 Thread Jiri Olsa
Centralize counters print code into single print_counters function. Link: http://lkml.kernel.org/n/tip-1vae9jeuab2db5wxq820s...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 127 +++--- 1 file changed, 64

[PATCH 24/26] perf stat: Using init_stats instead of memset

2015-06-18 Thread Jiri Olsa
The init_stats function is meant to init 'struct stats'. Link: http://lkml.kernel.org/n/tip-secivjava21t7921lkpy0...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin

[PATCHv3 00/26] perf stat: Introduce --per-thread option

2015-06-18 Thread Jiri Olsa
--- Jiri Olsa (26): perf tools: Change thread_map::map into struct perf tools: Add comm string into struct thread_map perf tools: Add reference counting for cpu_map object perf tools: Add reference counting for thread_map object perf tools: Propagate cpu maps through

[PATCH 01/26] perf tools: Change thread_map::map into struct

2015-06-18 Thread Jiri Olsa
We need to store command names with the pid. Changing map to be struct holding pid. Process name is coming in shortly. Link: http://lkml.kernel.org/n/tip-z4zuyvcxa6glzqm8qubk6...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-trace.c | 4

[PATCH 02/26] perf tools: Add comm string into struct thread_map

2015-06-18 Thread Jiri Olsa
-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/python-ext-sources | 1 + tools/perf/util/thread_map.c | 63 +++--- tools/perf/util/thread_map.h | 2 ++ 3 files changed, 62 insertions(+), 4 deletions(-) diff --git a/tools/perf/util/python-ext-sources b

[PATCH 03/26] perf tools: Add reference counting for cpu_map object

2015-06-18 Thread Jiri Olsa
Adding refference counting for cpu_map object, so it could be easily shared among other objects. Using cpu_map__put instead cpu_map__delete and making cpu_map__delete static. Link: http://lkml.kernel.org/n/tip-gwy96ohuwhjz603bnf70a...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org

[PATCH 08/26] perf tests: Add thread_map object tests

2015-06-18 Thread Jiri Olsa
Adding thread_map object tests for comm name values. Link: http://lkml.kernel.org/n/tip-opjrl8os3je8wl93ujkm8...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 tools/perf/tests/tests.h| 1

[PATCH 15/26] perf stat: Move perf_evlist__(alloc|free)_stats into evlist object

2015-06-18 Thread Jiri Olsa
Moving perf_evlist__(alloc|free)_stats into evsel object, so it could be used in following patches. Link: http://lkml.kernel.org/n/tip-8dwmf838kipxabe0vay8h...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 32 tools/perf

[PATCH 06/26] perf tools: Propagate thread maps through the evlist

2015-06-18 Thread Jiri Olsa
-6vc92bytyy2d6c5entm5s...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evlist.c | 4 +++- tools/perf/util/evsel.c | 1 + tools/perf/util/evsel.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index

[PATCH 23/26] perf stat: Rename print_interval to process_interval

2015-06-18 Thread Jiri Olsa
It suits better, because the function also reads counter's data. Also the 'print_interval' name will be used in following generalization of counters display. Link: http://lkml.kernel.org/n/tip-8dwmf838kipxabe0vay8h...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf

[PATCH 18/26] perf stat: Introduce read_counters function

2015-06-18 Thread Jiri Olsa
in the same way as 'perf stat' command does. Link: http://lkml.kernel.org/n/tip-yi40dw75mmzib0m37u11m...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 47 ++- 1 file changed, 22 insertions(+), 25 deletions(-) diff

[PATCH 09/26] perf stat: Introduce perf_counts function

2015-06-18 Thread Jiri Olsa
Introducing perf_counts function, that returns 'struct perf_counts_values' pointer for given cpu. Also moving perf_counts* structures into stat.h. Link: http://lkml.kernel.org/n/tip-qu64zmm5zbpbkuybusnkg...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c

[PATCH 05/26] perf tools: Propagate cpu maps through the evlist

2015-06-18 Thread Jiri Olsa
Propagate evlist's cpu_map object through all the evsel objects, while keeping already configured evsel-cpus. It'll be handy to access evsel's cpus directly in following patches. Link: http://lkml.kernel.org/n/tip-myadl53clbkjvzeqolwp9...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org

[PATCH 07/26] perf tools: Make perf_evsel__(nr_)cpus generic

2015-06-18 Thread Jiri Olsa
Because we now propagate all evlist's cpu_maps and thread_map objects through all evsels, the perf_evsel__(nr_)cpus no longer need to be specific to stat object and check evlist and target objects. Link: http://lkml.kernel.org/n/tip-3pp2i969cmewv580k6qvd...@git.kernel.org Signed-off-by: Jiri Olsa

[PATCH 11/26] perf stat: Make stats work over the thread dimension

2015-06-18 Thread Jiri Olsa
Now that we have space for thread dimension counts, let's store it. Link: http://lkml.kernel.org/n/tip-vvu96knzwli7ajpjz7qu8...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 32 +- tools/perf/tests/openat

[PATCH 12/26] perf stat: Rename struct perf_counts::cpu member to values

2015-06-18 Thread Jiri Olsa
Renaming 'struct xyarray *cpu' pointer to more fitting/generic values, because now we store both cpu and thread values. Link: http://lkml.kernel.org/n/tip-fee055ta61vlnjfjzurmy...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/stat.c | 12 ++-- tools/perf

[PATCH 19/26] perf stat: Separate counters reading and processing

2015-06-18 Thread Jiri Olsa
...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 56 +-- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 72d43484507e..3b923e179d90 100644

[PATCH 14/26] perf stat: Move perf_evsel__(alloc|free)_prev_raw_counts into stat object

2015-06-18 Thread Jiri Olsa
Moving perf_evsel__(alloc|free)_prev_raw_counts into stat object, so it could be used in following patches. Link: http://lkml.kernel.org/n/tip-am4oi22oasuy97bc4mt8i...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 18 -- tools/perf/util

[PATCH 13/26] perf stat: Move perf_evsel__(alloc|free|reset)_stat_priv into stat object

2015-06-18 Thread Jiri Olsa
Moving perf_evsel__(alloc|free|reset)_stat_priv into stat object, so it could be used outside stat command in following patches. Link: http://lkml.kernel.org/n/tip-ti0tocuk8fuw0zb7puyuw...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 25

[PATCH 17/26] perf stat: Introduce perf_evsel__read function

2015-06-18 Thread Jiri Olsa
Adding simple read function that reads/store data into given struct perf_counts_values *count object. Link: http://lkml.kernel.org/n/tip-9r2zmzq0vkw8l300usq82...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evsel.c | 14 ++ tools/perf/util/evsel.h | 3

[PATCH 20/26] perf stat: Move zero_per_pkg into counter process code

2015-06-18 Thread Jiri Olsa
Moving zero_per_pkg into counter process code, to make the reading path free of processing logic. Link: http://lkml.kernel.org/n/tip-wi2ces8lzpzip39yes2f9...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 16/26] perf stat: Introduce perf_evsel__alloc_stats function

2015-06-18 Thread Jiri Olsa
Move all stat allocation logic related to stat object under single function. This way we can use it separately for stat object out of evlist object. Link: http://lkml.kernel.org/n/tip-hclg66nszn5mx8t9uwrxx...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/stat.c

[PATCH 10/26] perf stat: Use xyarray for cpu evsel counts

2015-06-18 Thread Jiri Olsa
Switching single dimensional array of 'struct perf_counts_values' with xyarray object, so we could store thread dimension counts. Link: http://lkml.kernel.org/n/tip-t1wefzwb3z78sjlpzt95l...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 2

Re: [PATCH regression 4.0 - 4.1] tools perf: Fix build breakage if prefix= is specified

2015-06-18 Thread Jiri Olsa
On Thu, Jun 18, 2015 at 10:39:35PM +0200, Lukas Wunner wrote: Hi David, On Thu, Jun 18, 2015 at 02:26:25PM -0600, David Ahern wrote: It worked for me last week with OL6. I created a standalone perf rpm with 4.1-rc6; it builds just fine with _prefix (rpm variable) set to /usr: [...]

Re: [PATCH 09/27] perf stat: Introduce perf_counts function

2015-06-23 Thread Jiri Olsa
On Tue, Jun 23, 2015 at 06:11:54PM -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 23, 2015 at 12:36:10AM +0200, Jiri Olsa escreveu: Introducing perf_counts function, that returns 'struct perf_counts_values' pointer for given cpu. - evsel-counts-cpu[cpu] = *count

[PATCH 02/22] perf tools: Add comm string into struct thread_map

2015-06-26 Thread Jiri Olsa
/comm. Link: http://lkml.kernel.org/n/tip-pf6bgmbujukce0sgliuhj...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/python-ext-sources | 1 + tools/perf/util/thread_map.c | 59 ++ tools/perf/util/thread_map.h | 8

[PATCH 01/22] perf thread_map: Introduce thread_map__reset function

2015-06-26 Thread Jiri Olsa
We need to reset newly allocated 'struct thread_map_data' entries, because we will introduce new comm memeber, which will get set later or not at all. Link: http://lkml.kernel.org/n/tip-hg8xtux446qyjqkkcezwk...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util

[PATCH 09/22] perf stat: Move perf_evsel__(alloc|free|reset)_stat_priv into stat object

2015-06-26 Thread Jiri Olsa
Moving perf_evsel__(alloc|free|reset)_stat_priv into stat object, so it could be used outside stat command in following patches. Link: http://lkml.kernel.org/n/tip-ti0tocuk8fuw0zb7puyuw...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 25

[PATCHv5 00/22] perf stat: Introduce --per-thread option

2015-06-26 Thread Jiri Olsa
-$pid output into $comm-$pid - updated doc with --per-task option thanks, jirka --- Jiri Olsa (22): perf thread_map: Introduce thread_map__reset function perf tools: Add comm string into struct thread_map perf tests: Add thread_map object tests perf stat: Introduce

[PATCH 03/22] perf tests: Add thread_map object tests

2015-06-26 Thread Jiri Olsa
Adding thread_map object tests for comm name values. Link: http://lkml.kernel.org/n/tip-opjrl8os3je8wl93ujkm8...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 4 tools/perf/tests/tests.h| 1

[PATCH 07/22] perf stat: Rename struct perf_counts::cpu member to values

2015-06-26 Thread Jiri Olsa
Renaming 'struct xyarray *cpu' pointer to more fitting/generic values, because now we store both cpu and thread values. Link: http://lkml.kernel.org/n/tip-fee055ta61vlnjfjzurmy...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/stat.c | 12 ++-- tools/perf

[PATCH 08/22] perf stat: Introduce perf_evlist__reset_stats

2015-06-26 Thread Jiri Olsa
To fit in with the rest of the helpers (alloc and free). Link: http://lkml.kernel.org/n/tip-dqgpvhc4b2rius8gv65df...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/perf

[PATCH 21/22] perf stat: Introduce print_counters function

2015-06-26 Thread Jiri Olsa
Centralize counters print code into single print_counters function. Link: http://lkml.kernel.org/n/tip-1vae9jeuab2db5wxq820s...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 127 +++--- 1 file changed, 64

[PATCH 18/22] perf stat: Remove perf_evsel__read_cb function

2015-06-26 Thread Jiri Olsa
It's no longer used, the stat command uses perf_evsel__read now. Link: http://lkml.kernel.org/n/tip-5yh5pg1mw9wefhup1vvts...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/util/evsel.c | 16 tools/perf/util/evsel.h | 7 --- 2 files changed, 23

[PATCH 10/22] perf stat: Move perf_evsel__(alloc|free)_prev_raw_counts into stat object

2015-06-26 Thread Jiri Olsa
Moving perf_evsel__(alloc|free)_prev_raw_counts into stat object, so it could be used in following patches. Link: http://lkml.kernel.org/n/tip-am4oi22oasuy97bc4mt8i...@git.kernel.org Signed-off-by: Jiri Olsa jo...@kernel.org --- tools/perf/builtin-stat.c | 18 -- tools/perf/util

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