aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/vmlinux-gdb.py
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2015-12-11 19:11:23 -0300
committerArnaldo Carvalho de Melo <[email protected]>2015-12-14 12:08:55 -0300
commitabd828688407eb86044f1bc9e5133c55d7597596 (patch)
treeb42146c0c9ffa8dc7cd3643af4e021b5a4f4d1b8 /scripts/gdb/vmlinux-gdb.py
parentb6847d2c2a50e96680e233ce4b2784981b6f309e (diff)
perf thread: Fix reference count initial state
We should always return from thread__new(), the constructor, with the object with a reference count of one, so that: struct thread *thread = thread__new(); thread__put(thread); Will call thread__delete(). If any reference is made to that 'thread' variable, it better use thread__get(thread) to hold a reference. We were returning with thread->refcnt set to zero, fix it and some cases where thread__delete() was being called, which were not a problem because just one reference was being used, now that we set it to 1, use thread__put() instead. Reported-by: Masami Hiramatsu <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/gdb/vmlinux-gdb.py')
0 files changed, 0 insertions, 0 deletions