[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54E60DB5.5070509@oracle.com>
Date: Thu, 19 Feb 2015 09:22:13 -0700
From: David Ahern <david.ahern@...cle.com>
To: Adrian Hunter <adrian.hunter@...el.com>,
David Ahern <dsahern@...il.com>, acme@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: Fix probing for PERF_FLAG_FD_CLOEXEC flag
On 2/19/15 9:17 AM, Adrian Hunter wrote:
> Yes, I am sorry it is a pain. I don't know why I didn't add a comment
> to the code :-(. Using -1 for the pid is a workaround to avoid gratuitous
> jump label changes. If pid=0 is used and then a system-wide trace is done
> with Intel PT, there will be a jump label change shortly after the tracing
> starts. That means the running code gets changed, but Intel PT decoding
> has to walk the code to reconstruct the trace - so errors result. There
> will always be occasional jump label changes, but this avoids one that
> would otherwise always happen.
I don't understand the response. Why can't pid == getpid() (ie., pid >
0) be used for this test? pid = -1 and pid = 0 are not needed. With pid
> 0 cpu value does not matter so cpu = -1 can be used. Again this is
just to determine if the kernel supports PERF_FLAG_FD_CLOEXEC. Existence
of PT should not be involved here.
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists