linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 1/8] perf: Block perf calls for system call tracepoints
@ 2018-12-05 16:05 Jiri Olsa
  2018-12-05 16:05 ` [PATCH 1/8] perf: Allow to block process in syscall tracepoints Jiri Olsa
                   ` (7 more replies)
  0 siblings, 8 replies; 45+ messages in thread
From: Jiri Olsa @ 2018-12-05 16:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Steven Rostedt, Peter Zijlstra
  Cc: lkml, Ingo Molnar, Namhyung Kim, Alexander Shishkin,
	Thomas Gleixner, Luis Claudio R. Goncalves, ldv, esyr,
	Frederic Weisbecker

hi,
Steven asked for possibility to block traced process
in case the tracer can't keep up and we would loose
events.
    
This (RFC) patchset tries to implement this by adding
'block' bool in struct perf_event_attr to be set only
for syscalls tracepoints and adding code to block the
traced process, if there's no space in event's ring
buffer.
    
The blocking code will poll/periodically check for the
space and continue if the event was successfully written.

Available also here:
  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
  perf/block

Thoughts?

thanks,
jirka


---
Jiri Olsa (8):
      perf: Allow to block process in syscall tracepoints
      perf tools: Sync uapi perf_event.h
      perf record: Add --block option
      perf trace: Add --block option
      perf tools: Add block term support for tracepoints
      perf tools: Add ordered_events__flush_time interface
      perf trace: Move event delivery to deliver_event function
      perf trace: Add ordered processing for --block option

 arch/x86/entry/common.c               | 36 ++++++++++++++++++++++++++++++++++--
 include/linux/perf_event.h            |  2 ++
 include/linux/sched.h                 |  2 ++
 include/linux/syscalls.h              |  2 ++
 include/uapi/linux/perf_event.h       |  3 ++-
 kernel/events/core.c                  | 40 ++++++++++++++++++++++++++++++++++++++--
 kernel/events/ring_buffer.c           |  4 +++-
 kernel/trace/trace_event_perf.c       |  4 ++++
 kernel/trace/trace_syscalls.c         | 28 ++++++++++++++++++++++++----
 tools/include/uapi/linux/perf_event.h |  3 ++-
 tools/perf/builtin-record.c           |  9 +++++++++
 tools/perf/builtin-trace.c            | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 tools/perf/perf.h                     |  1 +
 tools/perf/util/evsel.c               |  7 +++++++
 tools/perf/util/evsel.h               |  2 ++
 tools/perf/util/ordered-events.c      | 34 ++++++++++++++++++++++++++++++----
 tools/perf/util/ordered-events.h      |  3 +++
 tools/perf/util/parse-events.c        |  8 ++++++++
 tools/perf/util/parse-events.h        |  1 +
 tools/perf/util/parse-events.l        |  1 +
 20 files changed, 263 insertions(+), 24 deletions(-)

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

end of thread, other threads:[~2018-12-18 14:29 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 16:05 [RFC 1/8] perf: Block perf calls for system call tracepoints Jiri Olsa
2018-12-05 16:05 ` [PATCH 1/8] perf: Allow to block process in syscall tracepoints Jiri Olsa
2018-12-05 17:35   ` Steven Rostedt
2018-12-05 17:56     ` Jiri Olsa
2018-12-06  8:09   ` Peter Zijlstra
2018-12-06 10:30     ` Jiri Olsa
2018-12-06  8:10   ` Peter Zijlstra
2018-12-06  8:24     ` Jiri Olsa
2018-12-06 10:31       ` Peter Zijlstra
2018-12-06  8:34     ` Peter Zijlstra
2018-12-06 10:31       ` Jiri Olsa
2018-12-06 18:19       ` Steven Rostedt
2018-12-07  8:44         ` Jiri Olsa
2018-12-07  8:58         ` Peter Zijlstra
2018-12-07 13:41           ` Steven Rostedt
2018-12-07 15:11             ` Peter Zijlstra
2018-12-07 15:49               ` Arnaldo Carvalho de Melo
2018-12-08 10:41                 ` Peter Zijlstra
2018-12-08 17:34                   ` Steven Rostedt
2018-12-07 20:14               ` Steven Rostedt
2018-12-08 10:44                 ` Peter Zijlstra
2018-12-08 17:38                   ` Steven Rostedt
2018-12-10 10:18                     ` Peter Zijlstra
2018-12-13  0:39                       ` Dmitry V. Levin
2018-12-13  1:26                         ` Steven Rostedt
2018-12-13  1:49                           ` Dmitry V. Levin
2018-12-13 10:01                           ` Peter Zijlstra
2018-12-13 10:05                             ` Peter Zijlstra
2018-12-13 10:08                             ` Peter Zijlstra
2018-12-13 11:29                             ` Jiri Olsa
2018-12-06  8:17   ` Peter Zijlstra
2018-12-06 10:27     ` Jiri Olsa
2018-12-05 16:05 ` [PATCH 2/8] perf tools: Sync uapi perf_event.h Jiri Olsa
2018-12-05 16:05 ` [PATCH 3/8] perf record: Add --block option Jiri Olsa
2018-12-05 16:05 ` [PATCH 4/8] perf trace: " Jiri Olsa
2018-12-05 16:05 ` [PATCH 5/8] perf tools: Add block term support for tracepoints Jiri Olsa
2018-12-05 16:05 ` [PATCH 6/8] perf tools: Add ordered_events__flush_time interface Jiri Olsa
2018-12-14 21:00   ` [tip:perf/core] perf ordered_events: " tip-bot for Jiri Olsa
2018-12-18 14:27   ` tip-bot for Jiri Olsa
2018-12-05 16:05 ` [PATCH 7/8] perf trace: Move event delivery to deliver_event function Jiri Olsa
2018-12-14 21:01   ` [tip:perf/core] perf trace: Move event delivery to a new deliver_event() function tip-bot for Jiri Olsa
2018-12-18 14:28   ` tip-bot for Jiri Olsa
2018-12-05 16:05 ` [PATCH 8/8] perf trace: Add ordered processing for --block option Jiri Olsa
2018-12-14 21:02   ` [tip:perf/core] perf trace: Add ordered processing tip-bot for Jiri Olsa
2018-12-18 14:29   ` tip-bot for Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).