All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf c2c: Fix report with offline cpus
@ 2019-08-22  8:50 Ravi Bangoria
  2019-08-22 10:10 ` Jiri Olsa
  2019-08-23 12:29 ` [tip: perf/core] " tip-bot2 for Ravi Bangoria
  0 siblings, 2 replies; 4+ messages in thread
From: Ravi Bangoria @ 2019-08-22  8:50 UTC (permalink / raw)
  To: acme, jolsa; +Cc: linux-kernel, Ravi Bangoria, Nageswara R Sastry

If c2c is recorded on a machine where any cpus are offline,
'perf c2c report' throws an error "node/cpu topology bugFailed
setup nodes". It fails because while preparing node-cpu mapping
we don't consider offline cpus.

Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
Reported-by: Nageswara R Sastry <nasastry@in.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
---
 tools/perf/builtin-c2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 9e6cc86..fc68a94 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2027,7 +2027,7 @@ static int setup_nodes(struct perf_session *session)
 		c2c.node_info = 2;
 
 	c2c.nodes_cnt = session->header.env.nr_numa_nodes;
-	c2c.cpus_cnt  = session->header.env.nr_cpus_online;
+	c2c.cpus_cnt  = session->header.env.nr_cpus_avail;
 
 	n = session->header.env.numa_nodes;
 	if (!n)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf c2c: Fix report with offline cpus
  2019-08-22  8:50 [PATCH] perf c2c: Fix report with offline cpus Ravi Bangoria
@ 2019-08-22 10:10 ` Jiri Olsa
  2019-08-22 15:19   ` Arnaldo Carvalho de Melo
  2019-08-23 12:29 ` [tip: perf/core] " tip-bot2 for Ravi Bangoria
  1 sibling, 1 reply; 4+ messages in thread
From: Jiri Olsa @ 2019-08-22 10:10 UTC (permalink / raw)
  To: Ravi Bangoria; +Cc: acme, linux-kernel, Nageswara R Sastry

On Thu, Aug 22, 2019 at 02:20:45PM +0530, Ravi Bangoria wrote:
> If c2c is recorded on a machine where any cpus are offline,
> 'perf c2c report' throws an error "node/cpu topology bugFailed
> setup nodes". It fails because while preparing node-cpu mapping
> we don't consider offline cpus.
> 
> Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
> Reported-by: Nageswara R Sastry <nasastry@in.ibm.com>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

> ---
>  tools/perf/builtin-c2c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index 9e6cc86..fc68a94 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -2027,7 +2027,7 @@ static int setup_nodes(struct perf_session *session)
>  		c2c.node_info = 2;
>  
>  	c2c.nodes_cnt = session->header.env.nr_numa_nodes;
> -	c2c.cpus_cnt  = session->header.env.nr_cpus_online;
> +	c2c.cpus_cnt  = session->header.env.nr_cpus_avail;
>  
>  	n = session->header.env.numa_nodes;
>  	if (!n)
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] perf c2c: Fix report with offline cpus
  2019-08-22 10:10 ` Jiri Olsa
@ 2019-08-22 15:19   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-08-22 15:19 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: Ravi Bangoria, linux-kernel, Nageswara R Sastry

Em Thu, Aug 22, 2019 at 12:10:26PM +0200, Jiri Olsa escreveu:
> On Thu, Aug 22, 2019 at 02:20:45PM +0530, Ravi Bangoria wrote:
> > If c2c is recorded on a machine where any cpus are offline,
> > 'perf c2c report' throws an error "node/cpu topology bugFailed
> > setup nodes". It fails because while preparing node-cpu mapping
> > we don't consider offline cpus.
> > 
> > Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
> > Reported-by: Nageswara R Sastry <nasastry@in.ibm.com>
> > Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
> 
> Acked-by: Jiri Olsa <jolsa@redhat.com>

Thanks, applied.

- Arnaldo
 
> thanks,
> jirka
> 
> > ---
> >  tools/perf/builtin-c2c.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> > index 9e6cc86..fc68a94 100644
> > --- a/tools/perf/builtin-c2c.c
> > +++ b/tools/perf/builtin-c2c.c
> > @@ -2027,7 +2027,7 @@ static int setup_nodes(struct perf_session *session)
> >  		c2c.node_info = 2;
> >  
> >  	c2c.nodes_cnt = session->header.env.nr_numa_nodes;
> > -	c2c.cpus_cnt  = session->header.env.nr_cpus_online;
> > +	c2c.cpus_cnt  = session->header.env.nr_cpus_avail;
> >  
> >  	n = session->header.env.numa_nodes;
> >  	if (!n)
> > -- 
> > 1.8.3.1
> > 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: perf/core] perf c2c: Fix report with offline cpus
  2019-08-22  8:50 [PATCH] perf c2c: Fix report with offline cpus Ravi Bangoria
  2019-08-22 10:10 ` Jiri Olsa
@ 2019-08-23 12:29 ` tip-bot2 for Ravi Bangoria
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Ravi Bangoria @ 2019-08-23 12:29 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Nageswara R Sastry, Ravi Bangoria, Jiri Olsa,
	Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel

The following commit has been merged into the perf/core branch of tip:

Commit-ID:     1ea770f6c1971bc101b3741f4d88b0b4ea5c4181
Gitweb:        https://git.kernel.org/tip/1ea770f6c1971bc101b3741f4d88b0b4ea5c4181
Author:        Ravi Bangoria <ravi.bangoria@linux.ibm.com>
AuthorDate:    Thu, 22 Aug 2019 14:20:45 +05:30
Committer:     Arnaldo Carvalho de Melo <acme@redhat.com>
CommitterDate: Thu, 22 Aug 2019 17:16:57 -03:00

perf c2c: Fix report with offline cpus

If c2c is recorded on a machine where any cpus are offline, 'perf c2c
report' throws an error "node/cpu topology bugFailed setup nodes".

It fails because while preparing node-cpu mapping we don't consider
offline cpus.

Reported-by: Nageswara R Sastry <nasastry@in.ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Fixes: 1e181b92a2da ("perf c2c report: Add 'node' sort key")
Link: http://lkml.kernel.org/r/20190822085045.25108-1-ravi.bangoria@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 01629f5..2111437 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2027,7 +2027,7 @@ static int setup_nodes(struct perf_session *session)
 		c2c.node_info = 2;
 
 	c2c.nodes_cnt = session->header.env.nr_numa_nodes;
-	c2c.cpus_cnt  = session->header.env.nr_cpus_online;
+	c2c.cpus_cnt  = session->header.env.nr_cpus_avail;
 
 	n = session->header.env.numa_nodes;
 	if (!n)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-23 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22  8:50 [PATCH] perf c2c: Fix report with offline cpus Ravi Bangoria
2019-08-22 10:10 ` Jiri Olsa
2019-08-22 15:19   ` Arnaldo Carvalho de Melo
2019-08-23 12:29 ` [tip: perf/core] " tip-bot2 for Ravi Bangoria

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.