[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190528085948.GB27906@krava>
Date: Tue, 28 May 2019 10:59:48 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: kan.liang@...ux.intel.com
Cc: acme@...nel.org, jolsa@...nel.org, mingo@...hat.com,
linux-kernel@...r.kernel.org, peterz@...radead.org,
ak@...ux.intel.com
Subject: Re: [PATCH 1/3] perf header: Add die information in CPU topology
On Thu, May 23, 2019 at 01:41:19PM -0700, kan.liang@...ux.intel.com wrote:
SNIP
> @@ -88,7 +138,7 @@ static int build_cpu_topology(struct cpu_topology *tp, int cpu)
> return ret;
> }
>
> -void cpu_topology__delete(struct cpu_topology *tp)
> +void cpu_topology__delete(struct cpu_topology *tp, bool has_die)
> {
> u32 i;
>
> @@ -98,17 +148,22 @@ void cpu_topology__delete(struct cpu_topology *tp)
> for (i = 0 ; i < tp->core_sib; i++)
> zfree(&tp->core_siblings[i]);
>
> + if (has_die) {
I think there's no need for has_die check in here,
tp->die_sib will be zero, and also will tp->die_siblings[i]
jirka
> + for (i = 0 ; i < tp->die_sib; i++)
> + zfree(&tp->die_siblings[i]);
> + }
> +
> for (i = 0 ; i < tp->thread_sib; i++)
> zfree(&tp->thread_siblings[i]);
>
> free(tp);
> }
SNIP
Powered by blists - more mailing lists