Re: [PATCH v8 04/14] perf tools: Move unwind__prepare_access from thread_new into thread__insert_map
From: Jiri Olsa
Date: Thu Jun 02 2016 - 16:34:13 EST
On Thu, Jun 02, 2016 at 09:55:16AM +0000, He Kuang wrote:
SNIP
> }
>
> -void thread__insert_map(struct thread *thread, struct map *map)
> +int thread__insert_map(struct thread *thread, struct map *map)
> {
> + int ret;
> +
> map_groups__fixup_overlappings(thread->mg, map, stderr);
> map_groups__insert(thread->mg, map);
> +
> + ret = unwind__prepare_access(thread);
> + if (ret)
> + map_groups__remove(thread->mg, map);
we could move this call to the top and sve the call to map_groups__remove
jirka