public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: acme@redhat.com, kan.liang@intel.com, linux-kernel@vger.kernel.org
Subject: Re: perf test topo broken?
Date: Fri, 20 Nov 2015 10:46:45 +0100	[thread overview]
Message-ID: <20151120094645.GD897@krava.brq.redhat.com> (raw)
In-Reply-To: <20151119221353.GA6928@us.ibm.com>

On Thu, Nov 19, 2015 at 02:13:53PM -0800, Sukadev Bhattiprolu wrote:

SNIP

> Commenting out following code seems to cause the test to pass, but are
> core_ids in general related to number of cpus online?
> 
> Sukadev
> 
> ---
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index 4383800..d5104da 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -1652,11 +1652,14 @@ static int process_cpu_topology(struct perf_file_section *section,
>                 if (ph->needs_swap)
>                         nr = bswap_32(nr);
>  
> +#if 0
>                 if (nr > (u32)cpu_nr) {
> -                       pr_debug("core_id number is too big."
> -                                "You may need to upgrade the perf tool.\n");
> +                       pr_debug("core_id number is too big.  nr %d, cpu_nr %d. "
> +                                "You may need to upgrade the perf tool.\n",
> +                                nr, cpu_nr);
>                         goto free_cpu;
>                 }
> +#endif
>                 ph->env.cpu[i].core_id = nr;

looks like we can safely remove this check,

I don't see any place we use core_id as array index
or any other place assuming core_id < cpu_nr

Kan Liang?

thanks,
jirka

  parent reply	other threads:[~2015-11-20  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 22:13 perf test topo broken? Sukadev Bhattiprolu
2015-11-20  9:40 ` Jiri Olsa
2015-11-20  9:46 ` Jiri Olsa [this message]
2015-11-25 15:16   ` Liang, Kan

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=20151120094645.GD897@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sukadev@linux.vnet.ibm.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