All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL v4] hw-breakpoints: Rewrite on top of perf events v4
@ 2009-11-03 19:11 Frederic Weisbecker
  2009-11-03 19:11 ` [PATCH 1/6] perf/core: Provide a kernel-internal interface to get to performance counters Frederic Weisbecker
                   ` (6 more replies)
  0 siblings, 7 replies; 43+ messages in thread
From: Frederic Weisbecker @ 2009-11-03 19:11 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: LKML, Frederic Weisbecker, Prasad, Alan Stern, Peter Zijlstra,
	Arnaldo Carvalho de Melo, Steven Rostedt, Ingo Molnar,
	Jan Kiszka, Jiri Slaby, Li Zefan, Avi Kivity, Paul Mackerras,
	Mike Galbraith, Masami Hiramatsu, Paul Mundt

Hi all,

This is the v4 of the hw-breakpoints API rewrite on top of perf events.

This integrates the following fixes:

Changes in v4:

    - Drop the hw_breakpoint_restore() stub as it is only used by KVM
    - EXPORT_SYMBOL_GPL hw_breakpoint_restore() as KVM can be built as a
      module
    - Restore the breakpoints unconditionally on kvm guest exit:
      TIF_DEBUG_THREAD doesn't anymore cover every cases of running
      breakpoints and vcpu->arch.switch_db_regs might not always be
      set when the guest used debug registers.
      (Waiting for a reliable optimization)
    - Simplify a bit the callback attribution as suggested by Paul
      Mackerras
    - Remove the wrong comment about the fact
      perf_event_create_kernel_counter must be called from a kernel
      thread.

Changes in v3:

    - Fix broken CONFIG_KVM, propagate the breakpoint api
      changes to kvm when we exit the guest and restore the bp registers
      to the host. The only change is in the 4th patch.

Changes in v2:

    - Follow the perf "event " rename
    - The ptrace regression have been fixed (ptrace breakpoint perf events
      weren't released when a task ended)
    - Drop the struct hw_breakpoint and store generic fields in
      perf_event_attr.
    - Separate core and arch specific headers, drop
      asm-generic/hw_breakpoint.h and create linux/hw_breakpoint.h
    - Use new generic len/type for breakpoint
    - Handle off case: when breakpoints api is not supported by an arch
    - Use proper in-kernel perf api provided by Arjan.

This tree can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
	perfevents/hw-breakpoint-v4

Arjan van de Ven (1):
      perf/core: Provide a kernel-internal interface to get to performance counters

Frederic Weisbecker (3):
      perf/core: Add a callback to perf events
      hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events
      hw-breakpoints: Arbitrate access to pmu following registers constraints

Li Zefan (1):
      ksym_tracer: Remove KSYM_SELFTEST_ENTRY

Paul Mundt (1):
      x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread().

 arch/Kconfig                         |    3 +
 arch/x86/include/asm/debugreg.h      |   11 +-
 arch/x86/include/asm/hw_breakpoint.h |   58 +++--
 arch/x86/include/asm/processor.h     |   12 +-
 arch/x86/kernel/hw_breakpoint.c      |  391 +++++++++++++++--------
 arch/x86/kernel/process.c            |    9 +-
 arch/x86/kernel/process_32.c         |   26 +--
 arch/x86/kernel/process_64.c         |   26 +--
 arch/x86/kernel/ptrace.c             |  182 +++++++----
 arch/x86/kernel/smpboot.c            |    3 -
 arch/x86/kvm/x86.c                   |   15 +-
 arch/x86/power/cpu.c                 |    6 -
 include/asm-generic/hw_breakpoint.h  |  139 --------
 include/linux/hw_breakpoint.h        |  131 ++++++++
 include/linux/perf_event.h           |   37 ++-
 kernel/exit.c                        |    5 +
 kernel/hw_breakpoint.c               |  595 +++++++++++++++++++++-------------
 kernel/perf_event.c                  |  136 ++++++++-
 kernel/trace/trace.h                 |    1 -
 kernel/trace/trace_entries.h         |    6 +-
 kernel/trace/trace_ksym.c            |  126 ++++----
 kernel/trace/trace_selftest.c        |    2 +-
 22 files changed, 1180 insertions(+), 740 deletions(-)
 delete mode 100644 include/asm-generic/hw_breakpoint.h
 create mode 100644 include/linux/hw_breakpoint.h

^ permalink raw reply	[flat|nested] 43+ messages in thread
* [GIT PULL v2] hw-breakpoints: Rewrite on top of perf events
@ 2009-10-24 14:16 Frederic Weisbecker
  2009-10-24 14:16 ` [PATCH 4/6] hw-breakpoints: Rewrite the hw-breakpoints layer " Frederic Weisbecker
  0 siblings, 1 reply; 43+ messages in thread
From: Frederic Weisbecker @ 2009-10-24 14:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: LKML, Frederic Weisbecker, Prasad, Alan Stern, Peter Zijlstra,
	Arnaldo Carvalho de Melo, Steven Rostedt, Ingo Molnar,
	Jan Kiszka, Jiri Slaby, Li Zefan, Avi Kivity, Paul Mackerras,
	Mike Galbraith, Masami Hiramatsu, Paul Mundt

Hi all,

This is the v2 of the hw-breakpoints API rewrite on top of perf events.
You can find the previous version here:
http://lwn.net/Articles/351922/

Changes in v2:
    
    - Follow the perf "event " rename
    - The ptrace regression have been fixed (ptrace breakpoint perf events
      weren't released when a task ended)
    - Drop the struct hw_breakpoint and store generic fields in
      perf_event_attr.
    - Separate core and arch specific headers, drop
      asm-generic/hw_breakpoint.h and create linux/hw_breakpoint.h
    - Use new generic len/type for breakpoint
    - Handle off case: when breakpoints api is not supported by an arch
    - Use proper in-kernel perf api provided by Arjan.

There are still a lot of things that need to be cleaned, simplified,
improved (ptrace side, the bp api, etc....) I guess these things can
be done incrementally if you agree.

I've also tried to get an arch-independent api. Generic fields for
breakpoints are stored in perf_event_attr structure (type, len, addr).
This needs to be discussed and improved before it becomes a perf
userspace ABI. We need to find a generic enough structure to host
the breakpoints parameters, something that can better fit to most arch
(handling breakpoint ranges in powerpc, etc...).

Thanks.

---

The following patchset are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing.git
	perfevents/hw-breakpoint

Arjan van de Ven (1):
      perf/core: Provide a kernel-internal interface to get to performance counters

Frederic Weisbecker (3):
      perf/core: Add a callback to perf events
      hw-breakpoints: Rewrite the hw-breakpoints layer on top of perf events
      hw-breakpoints: Arbitrate access to pmu following registers constraints

Li Zefan (1):
      ksym_tracer: Remove KSYM_SELFTEST_ENTRY

Paul Mundt (1):
      x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread().

 arch/Kconfig                         |    3 +
 arch/x86/include/asm/debugreg.h      |    7 -
 arch/x86/include/asm/hw_breakpoint.h |   58 +++--
 arch/x86/include/asm/processor.h     |   12 +-
 arch/x86/kernel/hw_breakpoint.c      |  376 ++++++++++++++--------
 arch/x86/kernel/process.c            |    9 +-
 arch/x86/kernel/process_32.c         |   26 +--
 arch/x86/kernel/process_64.c         |   26 +--
 arch/x86/kernel/ptrace.c             |  182 +++++++----
 arch/x86/kernel/smpboot.c            |    3 -
 arch/x86/power/cpu.c                 |    6 -
 include/asm-generic/hw_breakpoint.h  |  139 --------
 include/linux/hw_breakpoint.h        |  131 ++++++++
 include/linux/perf_event.h           |   37 ++-
 kernel/exit.c                        |    5 +
 kernel/hw_breakpoint.c               |  595 +++++++++++++++++++++-------------
 kernel/perf_event.c                  |  137 ++++++++-
 kernel/trace/trace.h                 |    1 -
 kernel/trace/trace_entries.h         |    6 +-
 kernel/trace/trace_ksym.c            |  126 ++++----
 kernel/trace/trace_selftest.c        |    2 +-
 21 files changed, 1154 insertions(+), 733 deletions(-)
 delete mode 100644 include/asm-generic/hw_breakpoint.h
 create mode 100644 include/linux/hw_breakpoint.h

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

end of thread, other threads:[~2009-11-14 13:34 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-03 19:11 [GIT PULL v4] hw-breakpoints: Rewrite on top of perf events v4 Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 1/6] perf/core: Provide a kernel-internal interface to get to performance counters Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 2/6] x86/hw-breakpoints: Actually flush thread breakpoints in flush_thread() Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 3/6] perf/core: Add a callback to perf events Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 4/6] hw-breakpoints: Rewrite the hw-breakpoints layer on top of " Frederic Weisbecker
2009-11-03 19:58   ` Jan Kiszka
2009-11-03 20:15     ` Frederic Weisbecker
2009-11-03 20:22       ` Jan Kiszka
2009-11-03 20:29         ` Frederic Weisbecker
2009-11-03 20:39           ` Jan Kiszka
2009-11-03 20:45             ` Frederic Weisbecker
2009-11-04 23:59   ` Paul Mackerras
2009-11-05  6:00     ` K.Prasad
2009-11-05 11:00       ` Paul Mackerras
2009-11-05 11:09     ` Frederic Weisbecker
2009-11-07 10:03       ` Paul Mackerras
2009-11-07 19:52         ` Frederic Weisbecker
2009-11-05 11:03   ` Paul Mackerras
2009-11-05 11:11     ` Frederic Weisbecker
2009-11-05 15:34   ` K.Prasad
2009-11-05 21:06     ` Frederic Weisbecker
2009-11-08 17:32       ` K.Prasad
2009-11-12 15:42         ` Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 5/6] hw-breakpoints: Arbitrate access to pmu following registers constraints Frederic Weisbecker
2009-11-05 10:58   ` Paul Mackerras
2009-11-05 11:24     ` Frederic Weisbecker
2009-11-08 20:56     ` Benjamin Herrenschmidt
2009-11-12 15:54       ` Frederic Weisbecker
2009-11-12 20:00         ` Benjamin Herrenschmidt
2009-11-14 13:34           ` Frederic Weisbecker
2009-11-03 19:11 ` [PATCH 6/6] ksym_tracer: Remove KSYM_SELFTEST_ENTRY Frederic Weisbecker
2009-11-05 14:13 ` [GIT PULL v4] hw-breakpoints: Rewrite on top of perf events v4 K.Prasad
2009-11-05 20:30   ` Frederic Weisbecker
  -- strict thread matches above, loose matches on Subject: below --
2009-10-24 14:16 [GIT PULL v2] hw-breakpoints: Rewrite on top of perf events Frederic Weisbecker
2009-10-24 14:16 ` [PATCH 4/6] hw-breakpoints: Rewrite the hw-breakpoints layer " Frederic Weisbecker
2009-10-24 16:19   ` Jan Kiszka
2009-10-25 23:31     ` Frederic Weisbecker
2009-10-26  8:17       ` Jan Kiszka
2009-11-01 21:09         ` Frederic Weisbecker
2009-11-01 22:09           ` Jan Kiszka
2009-11-01 22:49             ` Frederic Weisbecker
2009-11-01 23:37             ` Frederic Weisbecker
2009-11-02  7:45               ` Jan Kiszka
2009-11-02 13:04                 ` Frederic Weisbecker

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.