lkml.org 
[lkml]   [2019]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] perf header: Add die information in CPU topology
On Thu, May 23, 2019 at 01:41:19PM -0700, kan.liang@linux.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

\
 
 \ /
  Last update: 2019-05-28 11:00    [W:0.096 / U:2.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site