Re: [PATCH 1/2] tools/perf: Fix out of bound access to affinity "sched_cpus"

2022-09-05 Thread Jiri Olsa
On Mon, Sep 05, 2022 at 10:24:40AM +0530, Athira Rajeev wrote: > The affinity code in "affinity_set" function access array > named "sched_cpus". The size for this array is allocated in > affinity_setup function which is nothing but value from > get_cpu_set_size. This is used to contain the cpumask

Re: [PATCH 03/13] powerpc/bpf: Update ldimm64 instructions during extra pass

2022-01-08 Thread Jiri Olsa
25b5 ("bpf: Add bpf_for_each_map_elem() helper") > Cc: sta...@vger.kernel.org # v5.15 > Signed-off-by: Naveen N. Rao Tested-by: Jiri Olsa thanks, jirka > --- > arch/powerpc/net/bpf_jit_comp.c | 29 +++-- > arch/powerpc/net/bpf_jit_comp32.c | 6 +++

Re: [BUG] powerpc: test_progs -t for_each faults kernel

2022-01-03 Thread Jiri Olsa
On Mon, Jan 03, 2022 at 11:07:02AM +0530, Naveen N. Rao wrote: > Hi Jiri, > > Jiri Olsa wrote: > > hi, > > when running 'test_progs -t for_each' on powerpc we are getting > > the fault below > > This looks to be the same issue reported by Yauheni: > h

[BUG] powerpc: test_progs -t for_each faults kernel

2022-01-02 Thread Jiri Olsa
hi, when running 'test_progs -t for_each' on powerpc we are getting the fault below it seems that for some reason the function callback address passed to bpf_for_each_array_elem is wrong.. I wonder it's the powerpc function pointers magic ;-) it's the latest bpf-next/master, I can send .config

Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-29 Thread Jiri Olsa
On Thu, Nov 25, 2021 at 08:18:50AM +0530, Athira Rajeev wrote: > Sort key p_stage_cyc is used to present the latency > cycles spend in pipeline stages. perf tool has local > p_stage_cyc sort key to display this info. There is no > global variant available for this sort key. local variant > shows

Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-29 Thread Jiri Olsa
On Mon, Nov 29, 2021 at 02:43:48PM +0530, Athira Rajeev wrote: > > > > On 28-Nov-2021, at 10:04 PM, Jiri Olsa wrote: > > > > On Thu, Nov 25, 2021 at 08:18:50AM +0530, Athira Rajeev wrote: > >> Sort key p_stage_cyc is used to present the latency > >>

Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-28 Thread Jiri Olsa
On Thu, Nov 25, 2021 at 08:18:50AM +0530, Athira Rajeev wrote: > Sort key p_stage_cyc is used to present the latency > cycles spend in pipeline stages. perf tool has local > p_stage_cyc sort key to display this info. There is no > global variant available for this sort key. local variant > shows

Re: [PATCH 1/2] powerpc/bpf: Fix detecting BPF atomic instructions

2021-07-02 Thread Jiri Olsa
this, such programs would be accepted and > incorrectly JIT'ed resulting in soft lockups, as seen with the atomic > bounds test. Fix this by looking at the correct immediate value. > > Fixes: 91c960b0056672 ("bpf: Rename BPF_XADD and prepare to encode other > atomics in .imm")

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Jiri Olsa
? __schedule+0x6d8/0xb20 > [ 730.892209] __schedule+0x6d8/0xb20 > [ 730.892899] schedule+0x5b/0xc0 > [ 730.893522] exit_to_user_mode_prepare+0x11d/0x240 > [ 730.894457] syscall_exit_to_user_mode+0x27/0x70 > [ 730.895361] entry_SYSCALL_64_after_hwframe+0x44/0xae

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Jiri Olsa
On Fri, May 28, 2021 at 11:56:02AM +0200, Daniel Borkmann wrote: SNIP > > Ondrej / Paul / Jiri: at least for the BPF tracing case specifically (I > haven't looked > at the rest but it's also kind of independent), the attached fix should > address both > reported issues, please take a look &

Re: [PATCH v2] lockdown,selinux: avoid bogus SELinux lockdown permission checks

2021-05-28 Thread Jiri Olsa
On Fri, May 28, 2021 at 09:09:57AM +0200, Daniel Borkmann wrote: > On 5/28/21 3:37 AM, Paul Moore wrote: > > On Mon, May 17, 2021 at 5:22 AM Ondrej Mosnacek wrote: > > > > > > Commit 59438b46471a ("security,lockdown,selinux: implement SELinux > > > lockdown") added an implementation of the

Re: [PATCH V2 3/5] tools/perf: Add powerpc support for PERF_SAMPLE_WEIGHT_STRUCT

2021-03-24 Thread Jiri Olsa
#include "../../../util/event.h" > +#include "../../../util/synthetic-events.h" > +#include "../../../util/machine.h" > +#include "../../../util/tool.h" > +#include "../../../util/map.h" > +#include "../../..

Re: [PATCH 4/4] tools/perf: Support pipeline stage cycles for powerpc

2021-03-17 Thread Jiri Olsa
On Wed, Mar 17, 2021 at 05:01:27PM +0530, Athira Rajeev wrote: > class="ApplePlainTextBody"> class="ApplePlainTextBody">On 16-Mar-2021, at > 4:48 AM, Jiri Olsa jo...@redhat.com wrote:On Mon, Mar 15, > 2021 at 01:22:09PM +0530, Athira Rajeev w

Re: [PATCH 4/4] tools/perf: Support pipeline stage cycles for powerpc

2021-03-15 Thread Jiri Olsa
On Mon, Mar 15, 2021 at 01:22:09PM +0530, Athira Rajeev wrote: SNIP > + > +static char *setup_dynamic_sort_keys(char *str) > +{ > + unsigned int j; > + > + if (sort__mode == SORT_MODE__MEMORY) > + for (j = 0; j < ARRAY_SIZE(dynamic_sort_keys_mem); j++) > +

Re: [PATCH 2/4] tools/perf: Add dynamic headers for perf report columns

2021-03-12 Thread Jiri Olsa
On Tue, Mar 09, 2021 at 09:03:58AM -0500, Athira Rajeev wrote: > Currently the header string for different columns in perf report > is fixed. Some fields of perf sample could have different meaning > for different architectures than the meaning conveyed by the header > string. An example is the

Re: [PATCH 4/4] tools/perf: Support pipeline stage cycles for powerpc

2021-03-12 Thread Jiri Olsa
On Tue, Mar 09, 2021 at 09:04:00AM -0500, Athira Rajeev wrote: > The pipeline stage cycles details can be recorded on powerpc from > the contents of Performance Monitor Unit (PMU) registers. On > ISA v3.1 platform, sampling registers exposes the cycles spent in > different pipeline stages. Patch

Re: [PATCH] powerpc: Fix instruction encoding for lis in ppc_function_entry()

2021-03-05 Thread Jiri Olsa
pc_function_entry") > Reported-by: Jiri Olsa > Signed-off-by: Naveen N. Rao > --- > arch/powerpc/include/asm/code-patching.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/powerpc/include/asm/code-patching.h > b/arch/powerpc/include/asm/code-pat

Re: [PATCH] tools/perf: Fix powerpc gap between kernel end and module start

2021-01-12 Thread Jiri Olsa
tion > using calloc fails. > > Fix this by detecting the kernel's last symbol and limiting > the range of last kernel symbol to pagesize. > > Signed-off-by: Athira Rajeev I can't test, but since the same approach works for arm and s390, this also looks ok Acked-by: Jiri Olsa thank

Re: [PATCH V5 0/4] powerpc/perf: Add support for perf extended regs in powerpc

2020-07-30 Thread Jiri Olsa
On Thu, Jul 30, 2020 at 01:24:40PM +0530, Athira Rajeev wrote: > > > > On 27-Jul-2020, at 10:46 PM, Athira Rajeev > > wrote: > > > > Patch set to add support for perf extended register capability in > > powerpc. The capability flag PERF_PMU_CAP_EXTENDED_REGS, is used to > > indicate the PMU

[tip: perf/core] perf expr: Add expr_scanner_ctx object

2020-04-22 Thread tip-bot2 for Jiri Olsa
The following commit has been merged into the perf/core branch of tip: Commit-ID: 871f9f599db8d9d2387c0717e712af405290edea Gitweb: https://git.kernel.org/tip/871f9f599db8d9d2387c0717e712af405290edea Author:Jiri Olsa AuthorDate:Thu, 02 Apr 2020 02:03:35 +05:30 Committer

[tip: perf/core] perf expr: Add expr_ prefix for parse_ctx and parse_id

2020-04-22 Thread tip-bot2 for Jiri Olsa
The following commit has been merged into the perf/core branch of tip: Commit-ID: aecce63e2b98f28606b063949cca06facf215d6c Gitweb: https://git.kernel.org/tip/aecce63e2b98f28606b063949cca06facf215d6c Author:Jiri Olsa AuthorDate:Thu, 02 Apr 2020 02:03:34 +05:30 Committer

Re: [PATCH v8 0/7] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-04-02 Thread Jiri Olsa
linux.git/commit/?h=perf/core=37cd7f65bf71a48f25eeb6d9be5dacb20d008ea6 > > Changelog: > v7 -> v8 > - Add test case for testing parsing of "?" in metric expression > - Reaname variables name to runtime Acked-by: Jiri Olsa thanks, jirka

Re: [PATCH v8 6/7] tools/perf: Enable Hz/hz prinitg for --metric-only option

2020-04-02 Thread Jiri Olsa
On Thu, Apr 02, 2020 at 02:03:39AM +0530, Kajol Jain wrote: > Commit 54b5091606c18 ("perf stat: Implement --metric-only mode") > added function 'valid_only_metric()' which drops "Hz" or "hz", > if it is part of "ScaleUnit". This patch enable it since hv_24x7 > supports couple of frequency events.

Re: [PATCH v7 3/6] perf/tools: Refactoring metricgroup__add_metric function

2020-03-30 Thread Jiri Olsa
On Fri, Mar 27, 2020 at 03:55:25PM +0530, Kajol Jain wrote: SNIP > + eg->ids = ids; > + eg->idnum = idnum; > + eg->metric_name = pe->metric_name; > + eg->metric_expr = pe->metric_expr; > + eg->metric_unit = pe->unit; > + list_add_tail(>nd, group_list); > + > + return

Re: [PATCH v7 3/6] perf/tools: Refactoring metricgroup__add_metric function

2020-03-30 Thread Jiri Olsa
On Fri, Mar 27, 2020 at 03:55:25PM +0530, Kajol Jain wrote: > This patch refactor metricgroup__add_metric function where > some part of it move to function metricgroup__add_metric_param. > No logic change. > > Signed-off-by: Kajol Jain > --- > tools/perf/util/metricgroup.c | 61

Re: [PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-30 Thread Jiri Olsa
On Fri, Mar 27, 2020 at 03:55:26PM +0530, Kajol Jain wrote: SNIP > > %% > struct expr_scanner_ctx *sctx = expr_get_extra(yyscanner); > @@ -93,7 +106,7 @@ if { return IF; } > else { return ELSE; } > #smt_on { return SMT_ON; } > {number} { return

Re: [PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-30 Thread Jiri Olsa
On Fri, Mar 27, 2020 at 03:55:26PM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c > index ea10fc4412c4..516504cf0ea5 100644 > --- a/tools/perf/tests/expr.c > +++ b/tools/perf/tests/expr.c > @@ -10,7 +10,7 @@ static int test(struct expr_parse_ctx

Re: [PATCH v6 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-24 Thread Jiri Olsa
On Fri, Mar 20, 2020 at 06:24:04PM +0530, Kajol Jain wrote: > Patch enhances current metric infrastructure to handle "?" in the metric > expression. The "?" can be use for parameters whose value not known while > creating metric events and which can be replace later at runtime to > the proper

Re: [PATCH v6 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-24 Thread Jiri Olsa
On Fri, Mar 20, 2020 at 06:24:04PM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > index 52fb119d25c8..b4b91d8ad5be 100644 > --- a/tools/perf/util/metricgroup.c > +++ b/tools/perf/util/metricgroup.c > @@ -474,8 +474,13 @@ static bool

Re: [PATCH v5 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-17 Thread Jiri Olsa
On Tue, Mar 17, 2020 at 11:53:31AM +0530, Kajol Jain wrote: SBIP > +static int metricgroup__add_metric_runtime_param(struct strbuf *events, > + struct list_head *group_list, struct pmu_event *pe) > +{ > + int i, count; > + int ret = -EINVAL; > + > + count =

Re: [PATCH v5 08/11] perf/tools: Refactoring metricgroup__add_metric function

2020-03-17 Thread Jiri Olsa
On Tue, Mar 17, 2020 at 11:53:30AM +0530, Kajol Jain wrote: > This patch refactor metricgroup__add_metric function where > some part of it move to function metricgroup__add_metric_param. > No logic change. > > Signed-off-by: Kajol Jain > --- > tools/perf/util/metricgroup.c | 63

Re: [PATCH v5 08/11] perf/tools: Refactoring metricgroup__add_metric function

2020-03-17 Thread Jiri Olsa
On Tue, Mar 17, 2020 at 11:53:30AM +0530, Kajol Jain wrote: > This patch refactor metricgroup__add_metric function where > some part of it move to function metricgroup__add_metric_param. > No logic change. > > Signed-off-by: Kajol Jain > --- > tools/perf/util/metricgroup.c | 63

Re: [PATCH v5 08/11] perf/tools: Refactoring metricgroup__add_metric function

2020-03-17 Thread Jiri Olsa
On Tue, Mar 17, 2020 at 11:53:30AM +0530, Kajol Jain wrote: > This patch refactor metricgroup__add_metric function where > some part of it move to function metricgroup__add_metric_param. > No logic change. can't compile this change: [jolsa@krava perf]$ make JOBS=1 BUILD: Doing 'make -j1'

Re: [PATCH v5 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-17 Thread Jiri Olsa
On Tue, Mar 17, 2020 at 11:53:31AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/arch/powerpc/util/header.c > b/tools/perf/arch/powerpc/util/header.c > index 3b4cdfc5efd6..dcc3c6ab2e67 100644 > --- a/tools/perf/arch/powerpc/util/header.c > +++ b/tools/perf/arch/powerpc/util/header.c >

Re: [PATCH v5 09/11] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-17 Thread Jiri Olsa
On Tue, Mar 17, 2020 at 11:53:31AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h > index 0938ad166ece..7786829b048b 100644 > --- a/tools/perf/util/expr.h > +++ b/tools/perf/util/expr.h > @@ -17,12 +17,13 @@ struct expr_parse_ctx { > > struct

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h > index 9377538f4097..d17664e628db 100644 > --- a/tools/perf/util/expr.h > +++ b/tools/perf/util/expr.h > @@ -15,6 +15,7 @@ struct parse_ctx { > struct parse_id

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > +static int metricgroup__add_metric_runtime_param(struct strbuf *events, > + struct list_head *group_list, struct pmu_event *pe) > +{ > + int i, count; > + int ret = -EINVAL; > + > + count =

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Tue, Mar 10, 2020 at 03:34:55PM -0300, Arnaldo Carvalho de Melo wrote: SNIP > > diff --git a/tools/perf/arch/powerpc/util/header.c > > b/tools/perf/arch/powerpc/util/header.c > > index 3b4cdfc5efd6..036f6b2ce202 100644 > > --- a/tools/perf/arch/powerpc/util/header.c > > +++

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.l b/tools/perf/util/expr.l > index 1928f2a3dddc..ec4b00671f67 100644 > --- a/tools/perf/util/expr.l > +++ b/tools/perf/util/expr.l > @@ -45,6 +45,21 @@ static char *normalize(char *str) >

Re: [PATCH v4 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > index c3a8c701609a..11eeeb929b91 100644 > --- a/tools/perf/util/metricgroup.c > +++ b/tools/perf/util/metricgroup.c > @@ -474,6 +474,98 @@ static bool

Re: [PATCH v4 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-10 Thread Jiri Olsa
On Tue, Mar 10, 2020 at 03:18:36PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Mar 09, 2020 at 10:35:06AM +0100, Jiri Olsa escreveu: > > On Mon, Mar 09, 2020 at 11:55:44AM +0530, Kajol Jain wrote: > > > First patch of the patchset fix inconsistent results we are getting

Re: [PATCH v4 0/8] powerpc/perf: Add json file metric support for the hv_24x7 socket/chip level events

2020-03-09 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:44AM +0530, Kajol Jain wrote: > First patch of the patchset fix inconsistent results we are getting when > we run multiple 24x7 events. > > Patchset adds json file metric support for the hv_24x7 socket/chip level > events. "hv_24x7" pmu interface events needs system

Re: [PATCH v3 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-02 Thread Jiri Olsa
On Sat, Feb 29, 2020 at 03:11:57PM +0530, Kajol Jain wrote: SNIP > #define PVR_VER(pvr)(((pvr) >> 16) & 0x) /* Version field */ > #define PVR_REV(pvr)(((pvr) >> 0) & 0x) /* Revison field */ > > +#define SOCKETS_INFO_FILE_PATH "/devices/hv_24x7/interface/" > + > int >

Re: [PATCH v3 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-02 Thread Jiri Olsa
On Sat, Feb 29, 2020 at 03:11:57PM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > index 02aee946b6c1..f629828cc0de 100644 > --- a/tools/perf/util/metricgroup.c > +++ b/tools/perf/util/metricgroup.c > @@ -399,6 +399,11 @@ void

Re: [PATCH v3 6/8] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-02 Thread Jiri Olsa
On Sat, Feb 29, 2020 at 03:11:57PM +0530, Kajol Jain wrote: SNIP > + *dst++ = paramval[i++]; > + free(paramval); > + } > + } > else > *dst++ = *str; >

Re: [PATCH v2] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Jiri Olsa
> powerpc. > > This patch depends on kernel side changes done my Madhavan: > https://lists.ozlabs.org/pipermail/linuxppc-dev/2018-December/182596.html > > Signed-off-by: Ravi Bangoria > --- Acked-by: Jiri Olsa thanks, jirka > tools/perf/Documentation/perf-c2c.txt |

Re: [PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-28 Thread Jiri Olsa
On Mon, Jan 14, 2019 at 09:44:02AM +0530, Ravi Bangoria wrote: SNIP > diff --git a/tools/perf/arch/x86/util/mem-events.c > b/tools/perf/arch/x86/util/mem-events.c > new file mode 100644 > index 000..5b4dcfe > --- /dev/null > +++ b/tools/perf/arch/x86/util/mem-events.c > @@ -0,0 +1,25 @@ >

Re: [GIT PULL] Please pull JSON files for Power9 PMU events

2017-07-13 Thread Jiri Olsa
On Thu, Jul 13, 2017 at 01:43:41PM +1000, Michael Ellerman wrote: > Sukadev Bhattiprolu writes: > ... > > > > tools/perf/pmu-events/arch/powerpc/mapfile.csv | 3 + > > .../perf/pmu-events/arch/powerpc/power9/cache.json | 176 + > >

Re: [PATCH v6 0/7] perf report: Show branch type

2017-07-07 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote: > v6: >Update according to the review comments from >Jiri Olsa <jo...@redhat.com>. Major modifications are: > >1. Move that multiline conditional code inside {} brackets. > >2. Move branch_type_

Re: [PATCH v2] perf: libdw support for powerpc

2017-06-15 Thread Jiri Olsa
...@redhat.com> looks good and got possitive feedback from our QE testing this Acked-by: Jiri Olsa <jo...@kernel.org> thanks, jirka

Re: [PATCH v6 2/7] perf/x86/intel: Record branch type

2017-05-09 Thread Jiri Olsa
On Tue, May 09, 2017 at 07:57:11PM +0800, Jin, Yao wrote: SNIP > > > > > + > > > > > + type >>= 2; /* skip X86_BR_USER and X86_BR_KERNEL */ > > > > > + mask = ~(~0 << 1); > > > > is that a fancy way to get 1 into the mask? what do I miss? > > you did not comment on this one > > Sorry, I

Re: [PATCH v6 2/7] perf/x86/intel: Record branch type

2017-05-09 Thread Jiri Olsa
On Mon, Apr 24, 2017 at 08:47:14AM +0800, Jin, Yao wrote: > > > On 4/23/2017 9:55 PM, Jiri Olsa wrote: > > On Thu, Apr 20, 2017 at 08:07:50PM +0800, Jin Yao wrote: > > > > SNIP > > > > > +#define X86_BR_TYPE_MAP_MAX 16 > > > + &

Re: [PATCH v6 2/7] perf/x86/intel: Record branch type

2017-04-23 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:50PM +0800, Jin Yao wrote: SNIP > > +#define X86_BR_TYPE_MAP_MAX 16 > + > +static int > +common_branch_type(int type) > +{ > + int i, mask; > + const int branch_map[X86_BR_TYPE_MAP_MAX] = { > + PERF_BR_CALL, /* X86_BR_CALL */ > +

Re: [PATCH v6 0/7] perf report: Show branch type

2017-04-20 Thread Jiri Olsa
On Thu, Apr 20, 2017 at 08:07:48PM +0800, Jin Yao wrote: > v6: >Update according to the review comments from >Jiri Olsa <jo...@redhat.com>. Major modifications are: > >1. Move that multiline conditional code inside {} brackets. > >2. Move branch_type_

Re: [PATCH v5 6/7] perf report: Show branch type statistics for stdio mode

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:13PM +0800, Jin Yao wrote: SNIP > +static void branch_type_stat_display(FILE *fp, struct branch_type_stat *stat) > +{ > + u64 total = 0; > + int i; > + > + for (i = 0; i < PERF_BR_MAX; i++) > + total += stat->counts[i]; > + > + if (total

Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote: SNIP > +static int count_str_printf(int index, const char *str, > + char *bf, int bfsize) > +{ > + int printed; > + > + printed = scnprintf(bf, bfsize, > + "%s%s", > + (index) ? " " : " (", str); > + > +

Re: [PATCH v5 4/7] perf report: Refactor the branch info printing code

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:11PM +0800, Jin Yao wrote: SNIP > static int counts_str_build(char *bf, int bfsize, >u64 branch_count, u64 predicted_count, >u64 abort_count, u64 cycles_count, >u64 iter_count, u64

Re: [PATCH v5 6/7] perf report: Show branch type statistics for stdio mode

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:13PM +0800, Jin Yao wrote: SNIP > +static void branch_type_stat_display(FILE *fp, struct branch_type_stat *stat) > +{ > + u64 total = 0; > + int i; > + > + for (i = 0; i < PERF_BR_MAX; i++) > + total += stat->counts[i]; > + > + if (total

Re: [PATCH v5 4/7] perf report: Refactor the branch info printing code

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:11PM +0800, Jin Yao wrote: SNIP > + > static int counts_str_build(char *bf, int bfsize, >u64 branch_count, u64 predicted_count, >u64 abort_count, u64 cycles_count, >u64 iter_count,

Re: [PATCH v5 7/7] perf report: Show branch type in callchain entry

2017-04-19 Thread Jiri Olsa
On Wed, Apr 19, 2017 at 11:48:14PM +0800, Jin Yao wrote: SNIP > +static int branch_type_str(struct branch_type_stat *stat, > +char *bf, int bfsize) > +{ > + int i, j = 0, printed = 0; > + u64 total = 0; > + > + for (i = 0; i < PERF_BR_MAX; i++) > +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP > +static int hist_iter__branch_callback(struct hist_entry_iter *iter, > + struct addr_location *al __maybe_unused, > + bool single __maybe_unused, > +

Re: [PATCH v4 4/5] perf report: Show branch type statistics for stdio mode

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:05AM +0800, Jin Yao wrote: SNIP > +const char *branch_type_name(int type) > +{ > + const char *branch_names[PERF_BR_MAX] = { > + "N/A", > + "JCC", > + "JMP", > + "IND_JMP", > + "CALL", > +

Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:06AM +0800, Jin Yao wrote: SNIP > static int counts_str_build(char *bf, int bfsize, >u64 branch_count, u64 predicted_count, >u64 abort_count, u64 cycles_count, > - u64 iter_count, u64

Re: [PATCH v4 5/5] perf report: Show branch type in callchain entry

2017-04-18 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:06AM +0800, Jin Yao wrote: SNIP > +static int branch_type_str(struct branch_type_stat *stat, > +char *bf, int bfsize) > +{ > + int i, j = 0, printed = 0; > + u64 total = 0; > + > + for (i = 0; i < PERF_BR_MAX; i++) > +

Re: [PATCH v4 0/5] perf report: Show branch type

2017-04-13 Thread Jiri Olsa
On Thu, Apr 13, 2017 at 11:25:39AM +0800, Jin, Yao wrote: SNIP > > > > Now it works without my patch and it runs with latest perf/core branch. > > So it looks like a regression issue. > > > > Thanks > > Jin Yao > > > > > > I have tested, the regression issue is happened after this commit: >

Re: [PATCH v4 0/5] perf report: Show branch type

2017-04-12 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 11:42:44PM +0800, Jin, Yao wrote: > > > On 4/12/2017 10:26 PM, Jiri Olsa wrote: > > On Wed, Apr 12, 2017 at 08:25:34PM +0800, Jin, Yao wrote: > > > > SNIP > > > > > > # Overhead Command Source Shared Object Source Symb

Re: [PATCH v4 0/5] perf report: Show branch type

2017-04-12 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 08:25:34PM +0800, Jin, Yao wrote: SNIP > > # Overhead Command Source Shared Object Source Symbol > > Target SymbolBasic Block Cycles > > # ... > >

Re: [PATCH v4 0/5] perf report: Show branch type

2017-04-12 Thread Jiri Olsa
On Wed, Apr 12, 2017 at 06:21:01AM +0800, Jin Yao wrote: SNIP > > 3. Use 2 bits in perf_branch_entry for a "cross" metrics checking >for branch cross 4K or 2M area. It's an approximate computing >for checking if the branch cross 4K page or 2MB page. > > For example: > > perf record -g

Re: [PATCH v21 16/19] perf, tools: Make alias matching case-insensitive

2016-10-04 Thread Jiri Olsa
On Mon, Oct 03, 2016 at 09:54:48PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 03, 2016 at 09:47:06PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Sep 15, 2016 at 03:24:53PM -0700, Sukadev Bhattiprolu escreveu: > > > From: Andi Kleen > > > > > > Make alias

Re: [PATCH v21 16/19] perf, tools: Make alias matching case-insensitive

2016-10-04 Thread Jiri Olsa
On Mon, Oct 03, 2016 at 09:47:06PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Sep 15, 2016 at 03:24:53PM -0700, Sukadev Bhattiprolu escreveu: > > From: Andi Kleen > > > > Make alias matching the events parser case-insensitive. This is useful > > with the JSON events.

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-30 Thread Jiri Olsa
On Thu, Sep 29, 2016 at 07:19:48PM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 27, 2016 at 04:18:46PM +0200, Jiri Olsa escreveu: > > On Mon, Sep 26, 2016 at 09:59:54AM -0700, Andi Kleen wrote: > > > On Mon, Sep 26, 2016 at 12:03:43PM -0300, Arnaldo Carvalho de Melo wro

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-27 Thread Jiri Olsa
On Mon, Sep 26, 2016 at 09:59:54AM -0700, Andi Kleen wrote: > On Mon, Sep 26, 2016 at 12:03:43PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Sep 26, 2016 at 10:35:33AM +0200, Jiri Olsa escreveu: > > > ping.. is that working for you? IMO we can include this > &g

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-26 Thread Jiri Olsa
On Thu, Sep 22, 2016 at 06:27:13PM +0200, Jiri Olsa wrote: > On Thu, Sep 22, 2016 at 05:00:22PM +0200, Jiri Olsa wrote: > > On Mon, Sep 19, 2016 at 09:28:20PM -0300, Arnaldo Carvalho de Melo wrote: > > > Em Mon, Sep 19, 2016 at 09:02:58PM -0300, Arnaldo Carvalho de Melo > >

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-22 Thread Jiri Olsa
On Thu, Sep 22, 2016 at 05:00:22PM +0200, Jiri Olsa wrote: > On Mon, Sep 19, 2016 at 09:28:20PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Sep 19, 2016 at 09:02:58PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Mon, Sep 19, 2016 at 08:37:53PM -0300, Arnald

Re: [PATCH v21 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-22 Thread Jiri Olsa
On Mon, Sep 19, 2016 at 09:28:20PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, Sep 19, 2016 at 09:02:58PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Sep 19, 2016 at 08:37:53PM -0300, Arnaldo Carvalho de Melo escreveu: > > > yeah, changing that typedef + true def to plain include >

Re: [PATCH] perf tests: Add dwarf unwind test for powerpc

2016-09-19 Thread Jiri Olsa
t; unwinding it. > > $ ./perf test 50 > 50: Test dwarf unwind: Ok > > User stack dump for powerpc: https://lkml.org/lkml/2016/4/28/482 > > Signed-off-by: Ravi Bangoria <ravi.bango...@linux.vnet.ibm.com> can't test, but looks good Acked-by: Jiri Olsa <jo...@kernel.org> thanks, jirka

Re: [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format

2016-09-01 Thread Jiri Olsa
On Wed, Aug 31, 2016 at 09:15:30AM -0700, Andi Kleen wrote: > > > > > > > > > > > I've already made some changes in pmu-events/* to support > > > > this hierarchy to see how bad the change would be.. and > > > > it's not that bad ;-) > > > > > > Everything has to be automated, please no manual

Re: [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format

2016-08-31 Thread Jiri Olsa
On Wed, Aug 31, 2016 at 07:42:47AM -0700, Andi Kleen wrote: > > hi, > > I had discussion with Ingo about the state of this patchset > > and there's one more requirement from his side - to split > > event files into per topic files > > Thanks Jiri. > > > > I made some initial changes over latest

Re: [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format

2016-08-31 Thread Jiri Olsa
t; > The file, 'tools/perf/pmu-events/README' in [PATCH 16/16] gives more > details. > > Note: > - All known events tables for the architecture are included in the > perf binary. > > - For architectures that don't have any JSON files, an empty mapping >

Re: [PATCH v5] tools/perf: Fix the mask in regs_dump__printf and print_sample_iregs

2016-06-28 Thread Jiri Olsa
44 > --- a/tools/include/linux/bitmap.h > +++ b/tools/include/linux/bitmap.h > @@ -2,6 +2,7 @@ > #define _PERF_BITOPS_H > > #include > +#include this could go in the bitmap.c file, but anyway: Acked-by: Jiri Olsa <jo...@kernel.org> thanks, jirka > #include

Re: [PATCH v3] tools/perf: Fix the mask in regs_dump__printf and print_sample_iregs

2016-06-22 Thread Jiri Olsa
On Tue, Jun 21, 2016 at 06:35:31PM +0300, Yury Norov wrote: SNIP > > index 5214974e841a..1337b1c73f82 100644 > > --- a/tools/perf/util/session.c > > +++ b/tools/perf/util/session.c > > @@ -940,8 +940,22 @@ static void branch_stack__printf(struct perf_sample > > *sample) > > static void

Re: [PATCH v2] tools/perf: Fix the mask in regs_dump__printf and

2016-06-20 Thread Jiri Olsa
On Mon, Jun 20, 2016 at 05:27:25PM +0800, Wangnan (F) wrote: > > > On 2016/6/20 17:18, Jiri Olsa wrote: > > On Mon, Jun 20, 2016 at 02:14:01PM +0530, Madhavan Srinivasan wrote: > > > When decoding the perf_regs mask in regs_dump__printf(), > > > we loop thro

Re: [PATCH v2] tools/perf: Fix the mask in regs_dump__printf and

2016-06-20 Thread Jiri Olsa
On Mon, Jun 20, 2016 at 02:14:01PM +0530, Madhavan Srinivasan wrote: SNIP > diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c > index e3ce2f34d3ad..76d5006ebcc3 100644 > --- a/tools/perf/builtin-script.c > +++ b/tools/perf/builtin-script.c > @@ -412,11 +412,16 @@ static void

Re: [PATCH v2] tools/perf: Fix the mask in regs_dump__printf and

2016-06-20 Thread Jiri Olsa
On Mon, Jun 20, 2016 at 02:14:01PM +0530, Madhavan Srinivasan wrote: > When decoding the perf_regs mask in regs_dump__printf(), > we loop through the mask using find_first_bit and find_next_bit functions. > "mask" is of type "u64", but sent as a "unsigned long *" to > lib functions along with

Re: [PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-17 Thread Jiri Olsa
On Fri, Jun 17, 2016 at 02:43:31PM +0530, Madhavan Srinivasan wrote: SNIP > > > if (data->user_regs.abi) { > - u64 mask = evsel->attr.sample_regs_user; > + u.val64 = evsel->attr.sample_regs_user; > > - sz =

Re: [PATCH] tools/perf: Fix the mask in regs_dump__printf

2016-06-17 Thread Jiri Olsa
t; Suggested-by: Yury Norov <yno...@caviumnetworks.com> > Cc: Yury Norov <yno...@caviumnetworks.com> > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: Ingo Molnar <mi...@redhat.com> > Cc: Arnaldo Carvalho de Melo <a...@kernel.org> > Cc: Alexander Shishki

Re: [PATCH v2 1/2] tools include: Adopt byte ordering macros from byteorder/generic.h

2016-06-16 Thread Jiri Olsa
On Thu, Jun 16, 2016 at 10:41:31AM +, He Kuang wrote: > From: Wang Nan > > This patch adopts the macros for byte order conversion from > "include/linux/byteorder/generic.h" to > "tools/include/linux/byteorder/generic.h" > > tools/perf/MANIFEST is also updated for 'make

Re: [PATCH 1/2] tools include: Sync byteorder/generic.h

2016-06-16 Thread Jiri Olsa
On Thu, Jun 16, 2016 at 01:32:08AM +, He Kuang wrote: > From: Wang Nan > > This patch copies "include/linux/byteorder/generic.h" to > "tools/include/linux/byteorder/generic.h" to enable other libraries to > use macros in it. it's not the file copied, as the changelog

Re: [PATCH 2/2] tools include: Fix wrong macro definitions for cpu_to_le* for big endian

2016-06-16 Thread Jiri Olsa
On Thu, Jun 16, 2016 at 01:32:09AM +, He Kuang wrote: > From: Wang Nan > > The cpu_to_le* macros in kernel.h are defined without considering > endianese. This patch includes "byteoder/generic.h" instead to fix the > bug, and removes redundant le64_to_cpu definition in

Re: [PATCH 1/1] perf tools: Fix build break on powerpc

2016-03-27 Thread Jiri Olsa
On Sat, Mar 26, 2016 at 11:01:47AM -0700, Sukadev Bhattiprolu wrote: > From 502e8236082412db1d33abfad95aaf14b539502e Mon Sep 17 00:00:00 2001 > From: Sukadev Bhattiprolu > Date: Sat, 26 Mar 2016 17:31:39 -0400 > Subject: [PATCH 1/1] perf tools: Fix build break on

Re: [PATCH V8 3/4] tools/perf: Map the ID values with register names

2016-01-08 Thread Jiri Olsa
On Fri, Jan 08, 2016 at 02:32:30PM +0530, Anju T wrote: SNIP > +#endif /* ARCH_PERF_REGS_H */ > diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile > index 38a0853..acf0302 100644 > --- a/tools/perf/config/Makefile > +++ b/tools/perf/config/Makefile > @@ -23,6 +23,11 @@ $(call

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2016-01-08 Thread Jiri Olsa
On Thu, Jan 07, 2016 at 06:23:03PM -0300, Arnaldo Carvalho de Melo wrote: > Em Thu, Jan 07, 2016 at 05:39:57PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Jan 07, 2016 at 12:28:15PM +0530, Naveen N. Rao escreveu: > > > Can you please push at least the initial 3 patches of this for v4.4?

Re: [PATCH V7 3/4] tools/perf: Map the ID values with register names

2016-01-06 Thread Jiri Olsa
On Wed, Jan 06, 2016 at 03:15:50PM +0530, Anju T wrote: SNIP > + [PERF_REG_POWERPC_GPR28] = "gpr28", > + [PERF_REG_POWERPC_GPR29] = "gpr29", > + [PERF_REG_POWERPC_GPR30] = "gpr30", > + [PERF_REG_POWERPC_GPR31] = "gpr31", > + [PERF_REG_POWERPC_NIP] = "nip", > +

Re: [PATCH v3 0/3] perf build: PowerPC: Fix build breakage due to libbpf

2015-12-15 Thread Jiri Olsa
arate > them into 3 patches. Please help me test it on PowerPC. > > Cc: Arnaldo Carvalho de Melo <a...@kernel.org> > Cc: Jiri Olsa <jo...@redhat.com> > Cc: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > Cc: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> &g

Re: [PATCH v2] perf: Fix build break on powerpc due to sample_reg_masks

2015-09-30 Thread Jiri Olsa
for 'perf_reg_value()' function (due to the static inline version > in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that > function. > > Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> Acked-by: Jiri Olsa <jo...@kernel.org> thanks, jirka

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-29 Thread Jiri Olsa
On Tue, Sep 29, 2015 at 11:06:17AM +0530, Naveen N. Rao wrote: > On 2015/09/24 10:15PM, Naveen N Rao wrote: > > On 2015/09/24 08:32AM, Stephane Eranian wrote: > > > On Thu, Sep 24, 2015 at 5:57 AM, Jiri Olsa <jo...@redhat.com> wrote: > > > > > > > >

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-29 Thread Jiri Olsa
On Tue, Sep 29, 2015 at 01:30:10PM +0530, Naveen N. Rao wrote: SNIP > > > Suka has also posted a fix for this with a different approach [1]. Can > > > you please ack/pull one of these versions? Building perf is broken on > > > v4.3-rc due to this. > > > > I did not get any answer for

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-29 Thread Jiri Olsa
On Tue, Sep 29, 2015 at 11:10:02AM -0700, Sukadev Bhattiprolu wrote: SNIP > > diff --git a/tools/perf/util/perf_regs.c b/tools/perf/util/perf_regs.c > index 885e8ac..6b8eb13 100644 > --- a/tools/perf/util/perf_regs.c > +++ b/tools/perf/util/perf_regs.c > @@ -6,6 +6,7 @@ const struct sample_reg

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-29 Thread Jiri Olsa
On Tue, Sep 29, 2015 at 10:01:36PM +0530, Naveen N. Rao wrote: > On 2015/09/29 12:47PM, Jiri Olsa wrote: > > On Tue, Sep 29, 2015 at 01:30:10PM +0530, Naveen N. Rao wrote: > > > > SNIP > > > > > > > Suka has also posted a fix for this with a different a

Re: [PATCH v16 00/16] perf, tools: Add support for PMU events in JSON format

2015-09-21 Thread Jiri Olsa
Source Code only > | json-files-7x86 and Powerpc datafiles only > | json-v16.1-with-dataBoth code and data (for build/test) > > Arnaldo, Ingo, > > I have not received any comments on this patch set since it was Acked by > Jiri Olsa in June. Can you please

  1   2   >