Re: [PATCH 5/5] perf tools: Transform nodes string info to struct

From: Jiri Olsa
Date: Fri Jul 01 2016 - 02:26:22 EST


On Thu, Jun 30, 2016 at 06:20:09PM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

> >
> > +struct numa_node {
> > + u32 node;
> > + u64 mem_total;
> > + u64 mem_free;
> > + struct cpu_map *map;
> > +};
> > +
> > struct perf_env {
> > char *hostname;
> > char *os_release;
> > @@ -33,18 +41,18 @@ struct perf_env {
> > int nr_cmdline;
> > int nr_sibling_cores;
> > int nr_sibling_threads;
> > - int nr_numa_nodes;
>
> why rename it from nr_numa_nodes to numa_nodes_cnt? Seems gratuitous and
> potentially introduces up to three 4 byte holes into 'struct perf_env'
> :-\

it goes along nicely with the caches/chaches_cnt ;-)

I'll change it back, np

jirka

>
> Applied the other patches in this series,
>
> Thanks,
>
> - Arnaldo
>
> > int nr_pmu_mappings;
> > int nr_groups;
> > char *cmdline;
> > const char **cmdline_argv;
> > char *sibling_cores;
> > char *sibling_threads;
> > - char *numa_nodes;
> > char *pmu_mappings;
> > struct cpu_topology_map *cpu;
> > struct cpu_cache_level *caches;
> > int caches_cnt;
> > + struct numa_node *numa_nodes;
> > + int numa_nodes_cnt;
> > };

SNIP