public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, alexander.shishkin@linux.intel.com,
	namhyung@kernel.org, eranian@google.com,
	linux-kernel@vger.kernel.org, tonyj@suse.com,
	nasastry@in.ibm.com, Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Subject: Re: [PATCH] perf c2c: Fix c2c report for empty numa node
Date: Fri, 1 Mar 2019 12:35:39 +0530	[thread overview]
Message-ID: <9ee9ca23-bb29-2038-5fe3-d52bcf4cd049@linux.ibm.com> (raw)
In-Reply-To: <20190228162208.GC8674@krava>


On 2/28/19 9:52 PM, Jiri Olsa wrote:
> how about attached change (untested)?

LGTM. Would you mind sending a patch.

> 
> but I wonder there are some other hidden
> bugs wrt empty node
> 
> jirka
> 
> 
> ---
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index 4272763a5e96..9e6cc868bdb4 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -2056,6 +2056,12 @@ static int setup_nodes(struct perf_session *session)
>  		if (!set)
>  			return -ENOMEM;
>  
> +		nodes[node] = set;
> +
> +		/* empty node, skip */
> +		if (cpu_map__empty(map))
> +			continue;
> +
>  		for (cpu = 0; cpu < map->nr; cpu++) {
>  			set_bit(map->map[cpu], set);
>  
> @@ -2064,8 +2070,6 @@ static int setup_nodes(struct perf_session *session)
>  
>  			cpu2node[map->map[cpu]] = node;
>  		}
> -
> -		nodes[node] = set;
>  	}
>  
>  	setup_nodes_header();
> 


  reply	other threads:[~2019-03-01  7:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 15:37 [PATCH] perf c2c: Fix c2c report for empty numa node Ravi Bangoria
2019-02-28 16:12 ` Jiri Olsa
2019-02-28 16:22   ` Jiri Olsa
2019-03-01  7:05     ` Ravi Bangoria [this message]
2019-03-01 10:26       ` Jiri Olsa
2019-03-02  3:07         ` Ravi Bangoria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ee9ca23-bb29-2038-5fe3-d52bcf4cd049@linux.ibm.com \
    --to=ravi.bangoria@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=nasastry@in.ibm.com \
    --cc=tonyj@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox