|
@@ -43,9 +43,6 @@ struct thread *thread__new(pid_t pid, pid_t tid)
|
|
thread->cpu = -1;
|
|
thread->cpu = -1;
|
|
INIT_LIST_HEAD(&thread->comm_list);
|
|
INIT_LIST_HEAD(&thread->comm_list);
|
|
|
|
|
|
- if (unwind__prepare_access(thread) < 0)
|
|
|
|
- goto err_thread;
|
|
|
|
-
|
|
|
|
comm_str = malloc(32);
|
|
comm_str = malloc(32);
|
|
if (!comm_str)
|
|
if (!comm_str)
|
|
goto err_thread;
|
|
goto err_thread;
|
|
@@ -201,10 +198,18 @@ size_t thread__fprintf(struct thread *thread, FILE *fp)
|
|
map_groups__fprintf(thread->mg, fp);
|
|
map_groups__fprintf(thread->mg, fp);
|
|
}
|
|
}
|
|
|
|
|
|
-void thread__insert_map(struct thread *thread, struct map *map)
|
|
|
|
|
|
+int thread__insert_map(struct thread *thread, struct map *map)
|
|
{
|
|
{
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
|
|
+ ret = unwind__prepare_access(thread);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
map_groups__fixup_overlappings(thread->mg, map, stderr);
|
|
map_groups__fixup_overlappings(thread->mg, map, stderr);
|
|
map_groups__insert(thread->mg, map);
|
|
map_groups__insert(thread->mg, map);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
}
|
|
}
|
|
|
|
|
|
static int thread__clone_map_groups(struct thread *thread,
|
|
static int thread__clone_map_groups(struct thread *thread,
|