Re: [PATCH 03/27] perf tools: Add reference counting for cpu_map object

From: Arnaldo Carvalho de Melo
Date: Tue Jun 23 2015 - 17:07:05 EST


Em Tue, Jun 23, 2015 at 12:36:04AM +0200, Jiri Olsa escreveu:
> -void cpu_map__delete(struct cpu_map *map)
> +static void cpu_map__delete(struct cpu_map *map)
> {
> - free(map);
> + if (map) {
> + WARN_ONCE(atomic_read(&map->refcnt) != 0,
> + "cpu map refcnt disbalanced\n");

Have you used this to catch some bug or is this just some attempt at a
proactive check? s/disbalanced/unbalanced/g

- Arnaldo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/