On 2/11/13 3:15 PM, Tim Chen wrote:
On Mon, 2013-02-11 at 12:34 -0700, David Ahern wrote:
On 2/11/13 11:50 AM, Tim Chen wrote:
David,

When I am doing a profiling of kernel compile with 32 threads on a 4
socket westmere machine, I found that perf record terminated right away
for the version of perf in 3.7 kernel source tree.
There's no profile data recroded and the compile is running in
background.

$ make -j32 &
then
$ sudo /test/perf record -a -g -f sleep 5
sleep: Terminated

This is the more appropriate fix. Make mmap consistent with comm. Revert the other one.

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 3cf2c3e..ba74a81 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -183,7 +183,7 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
         * We raced with a task exiting - just return:
         */
        pr_debug("couldn't open %s\n", filename);
-       return -1;
+       return 0;
    }

    event->header.type = PERF_RECORD_MMAP;


--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to