All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] perf tool: improve error handling in perf_flag_probe()
@ 2014-09-13  8:46 Yann Droneaud
  2014-09-13  8:46 ` [PATCH 1/2] perf tools: shortcut PERF_FLAG_FD_CLOEXEC probing in case of EBUSY error Yann Droneaud
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yann Droneaud @ 2014-09-13  8:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Yann Droneaud, Adrian Hunter, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Stephane Eranian, William Cohen

Hi,

Following the EBUSY errors reported by Jiri Olsa [1], I've tryed to
improve a bit the way perf_flag_probe() handle errors.

In case EBUSY is returned by perf_event_open(), testing the function
again without PERF_FLAG_FD_CLOEXEC is meaningless: EBUSY is not
related to close-on-exec flag, so there's nothing to confirm.

For other errors, not yet handled by perf_flag_probe(), it's
pointless to report a second error message for the same error code:
the second check should not print an error if the error is the same
as the one return for the first check.

[1] http://lkml.kernel.org/r/1406908014-8312-1-git-send-email-jolsa@kernel.org

Yann Droneaud (2):
  perf tools: shortcut PERF_FLAG_FD_CLOEXEC probing in case of EBUSY
    error
  perf tools: report PERF_FLAG_FD_CLOEXEC probing error once

 tools/perf/util/cloexec.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: William Cohen <wcohen@redhat.com>
-- 
1.9.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-20 12:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-13  8:46 [PATCH 0/2] perf tool: improve error handling in perf_flag_probe() Yann Droneaud
2014-09-13  8:46 ` [PATCH 1/2] perf tools: shortcut PERF_FLAG_FD_CLOEXEC probing in case of EBUSY error Yann Droneaud
2014-09-13  8:46 ` [PATCH 2/2] perf tools: report PERF_FLAG_FD_CLOEXEC probing error once Yann Droneaud
2014-09-20 12:14 ` [PATCH 0/2] perf tool: improve error handling in perf_flag_probe() Jiri Olsa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.