Searched hist:abd828688407eb86044f1bc9e5133c55d7597596 (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/tools/perf/util/ |
H A D | thread.c | diff abd828688407eb86044f1bc9e5133c55d7597596 Fri Dec 11 16:11:23 CST 2015 Arnaldo Carvalho de Melo <acme@redhat.com> 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 <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-4b9mkuk66to4ecckpmpvqx6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
H A D | intel-pt.c | diff abd828688407eb86044f1bc9e5133c55d7597596 Fri Dec 11 16:11:23 CST 2015 Arnaldo Carvalho de Melo <acme@redhat.com> 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 <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-4b9mkuk66to4ecckpmpvqx6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|
H A D | machine.c | diff abd828688407eb86044f1bc9e5133c55d7597596 Fri Dec 11 16:11:23 CST 2015 Arnaldo Carvalho de Melo <acme@redhat.com> 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 <masami.hiramatsu.pt@hitachi.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-4b9mkuk66to4ecckpmpvqx6s@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
|