Merge branch 'perfcounters-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perfcounters-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf tools: Make 'make html' work
perf annotate: Fix segmentation fault
perf_counter: Fix the PARISC build
perf_counter: Check task on counter read IPI
perf: Rename perf-examples.txt to examples.txt
perf record: Fix typo in pid_synthesize_comm_event

+24 -2
+15
kernel/perf_counter.c
··· 1503 1503 */ 1504 1504 static void __perf_counter_read(void *info) 1505 1505 { 1506 + struct perf_cpu_context *cpuctx = &__get_cpu_var(perf_cpu_context); 1506 1507 struct perf_counter *counter = info; 1507 1508 struct perf_counter_context *ctx = counter->ctx; 1508 1509 unsigned long flags; 1510 + 1511 + /* 1512 + * If this is a task context, we need to check whether it is 1513 + * the current task context of this cpu. If not it has been 1514 + * scheduled out before the smp call arrived. In that case 1515 + * counter->count would have been updated to a recent sample 1516 + * when the counter was scheduled out. 1517 + */ 1518 + if (ctx->task && cpuctx->task_ctx != ctx) 1519 + return; 1509 1520 1510 1521 local_irq_save(flags); 1511 1522 if (ctx->is_active) ··· 2018 2007 2019 2008 return 0; 2020 2009 } 2010 + 2011 + #ifndef PERF_COUNTER_INDEX_OFFSET 2012 + # define PERF_COUNTER_INDEX_OFFSET 0 2013 + #endif 2021 2014 2022 2015 static int perf_counter_index(struct perf_counter *counter) 2023 2016 {
+1 -1
tools/perf/Documentation/Makefile
··· 35 35 # DESTDIR= 36 36 37 37 ASCIIDOC=asciidoc 38 - ASCIIDOC_EXTRA = 38 + ASCIIDOC_EXTRA = --unsafe 39 39 MANPAGE_XSL = manpage-normal.xsl 40 40 XMLTO_EXTRA = 41 41 INSTALL?=install
tools/perf/Documentation/perf-examples.txt tools/perf/Documentation/examples.txt
+7
tools/perf/builtin-annotate.c
··· 980 980 (void *)(long)(event->header.size), 981 981 event->fork.pid, event->fork.ppid); 982 982 983 + /* 984 + * A thread clone will have the same PID for both 985 + * parent and child. 986 + */ 987 + if (thread == parent) 988 + return 0; 989 + 983 990 if (!thread || !parent || thread__fork(thread, parent)) { 984 991 dprintf("problem processing PERF_EVENT_FORK, skipping event.\n"); 985 992 return -1;
+1 -1
tools/perf/builtin-record.c
··· 219 219 snprintf(filename, sizeof(filename), "/proc/%d/status", pid); 220 220 221 221 fp = fopen(filename, "r"); 222 - if (fd == NULL) { 222 + if (fp == NULL) { 223 223 /* 224 224 * We raced with a task exiting - just return: 225 225 */