diff options
author | Tony Lindgren <tony@atomide.com> | 2011-02-25 21:27:14 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-02-25 21:27:14 +0100 |
commit | 02fa9f0451ac639a687bfc145eefe58703ff220e (patch) | |
tree | fe984acc78f22f6eb8fb98efaba8b1ac2f3ad8d9 /tools/perf/util/event.c | |
parent | OMAP2+: clocksource: fix crash on boot when !CONFIG_OMAP_32K_TIMER (diff) | |
parent | omap4: prcm: Fix the CPUx clockdomain offsets (diff) | |
download | linux-02fa9f0451ac639a687bfc145eefe58703ff220e.tar.xz linux-02fa9f0451ac639a687bfc145eefe58703ff220e.zip |
Merge branch 'patches_for_2.6.38rc' of git://git.pwsan.com/linux-2.6 into devel-fixes
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 1478ab4ee222..50d0a931497a 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -263,11 +263,12 @@ static int __event__synthesize_thread(event_t *comm_event, event_t *mmap_event, process, session); } -int event__synthesize_thread(pid_t pid, event__handler_t process, - struct perf_session *session) +int event__synthesize_thread_map(struct thread_map *threads, + event__handler_t process, + struct perf_session *session) { event_t *comm_event, *mmap_event; - int err = -1; + int err = -1, thread; comm_event = malloc(sizeof(comm_event->comm) + session->id_hdr_size); if (comm_event == NULL) @@ -277,8 +278,15 @@ int event__synthesize_thread(pid_t pid, event__handler_t process, if (mmap_event == NULL) goto out_free_comm; - err = __event__synthesize_thread(comm_event, mmap_event, pid, - process, session); + err = 0; + for (thread = 0; thread < threads->nr; ++thread) { + if (__event__synthesize_thread(comm_event, mmap_event, + threads->map[thread], + process, session)) { + err = -1; + break; + } + } free(mmap_event); out_free_comm: free(comm_event); |