diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-03-03 01:17:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-03 01:17:53 -0500 |
commit | 94ac003b665fc04f13a7ab3b2be896b9b9503451 (patch) | |
tree | 1fdaaf514ed20dfd1f3657693a55ab1547f1a656 /tools/perf/util/thread.h | |
parent | 788b94ba6c223d4ce955218d59075cd1edb92692 (diff) | |
parent | ae536acfacb65a4a9858c32b12361e09f84f4157 (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Warn if given uprobe event accesses memory on older kernel (Masami Hiramatsu)
- 'perf record' Documentation fixes (Namhyung Kim)
- Report unsupported events properly in 'perf stat' (Suzuki K. Poulose)
Infrastructure changes:
- Avoid FORK after COMM when synthesizing records for pre-existing threads (Arnaldo Carvalho de Melo)
- Reference count struct thread (Arnaldo Carvalho de Melo)
- Don't keep the session around in 'perf sched', thread refcounting removes that need (Arnaldo Carvalho de Melo)
- Initialize cpu set in pthread_attr_setaffinity_np() feature test (Adrian Hunter)
- Only include tsc file for x86 (David Ahern)
- Compare JOBS to 0 after grep (David Ahern)
- Improve feature detection messages (Ingo Molnar)
- Revert "perf: Remove the extra validity check on nr_pages" (Kan Liang)
- Remove bias offset to find probe point by address (Masami Hiramatsu)
- Fix build error on ARCH=i386/x86_64/sparc64 (Namhyung Kim)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r-- | tools/perf/util/thread.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index 160fd066a7d1..783b6688d2f7 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h | |||
@@ -20,6 +20,7 @@ struct thread { | |||
20 | pid_t tid; | 20 | pid_t tid; |
21 | pid_t ppid; | 21 | pid_t ppid; |
22 | int cpu; | 22 | int cpu; |
23 | int refcnt; | ||
23 | char shortname[3]; | 24 | char shortname[3]; |
24 | bool comm_set; | 25 | bool comm_set; |
25 | bool dead; /* if set thread has exited */ | 26 | bool dead; /* if set thread has exited */ |
@@ -37,6 +38,18 @@ struct comm; | |||
37 | struct thread *thread__new(pid_t pid, pid_t tid); | 38 | struct thread *thread__new(pid_t pid, pid_t tid); |
38 | int thread__init_map_groups(struct thread *thread, struct machine *machine); | 39 | int thread__init_map_groups(struct thread *thread, struct machine *machine); |
39 | void thread__delete(struct thread *thread); | 40 | void thread__delete(struct thread *thread); |
41 | |||
42 | struct thread *thread__get(struct thread *thread); | ||
43 | void thread__put(struct thread *thread); | ||
44 | |||
45 | static inline void __thread__zput(struct thread **thread) | ||
46 | { | ||
47 | thread__put(*thread); | ||
48 | *thread = NULL; | ||
49 | } | ||
50 | |||
51 | #define thread__zput(thread) __thread__zput(&thread) | ||
52 | |||
40 | static inline void thread__exited(struct thread *thread) | 53 | static inline void thread__exited(struct thread *thread) |
41 | { | 54 | { |
42 | thread->dead = true; | 55 | thread->dead = true; |