10 Aug, 2012

2 commits

  • Introducing PERF_SAMPLE_REGS_USER sample type bit to trigger the dump of
    user level registers on sample. Registers we want to dump are specified
    by sample_regs_user bitmask.

    Only user level registers are dumped at the moment. Meaning the register
    values of the user space context as it was before the user entered the
    kernel for whatever reason (syscall, irq, exception, or a PMI happening
    in userspace).

    The layout of the sample_regs_user bitmap is described in
    asm/perf_regs.h for archs that support register dump.

    This is going to be useful to bring Dwarf CFI based stack unwinding on
    top of samples.

    Original-patch-by: Frederic Weisbecker
    [ Dump registers ABI specification. ]
    Signed-off-by: Jiri Olsa
    Suggested-by: Stephane Eranian
    Cc: "Frank Ch. Eigler"
    Cc: Arun Sharma
    Cc: Benjamin Redelings
    Cc: Corey Ashford
    Cc: Cyrill Gorcunov
    Cc: Frank Ch. Eigler
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: Ulrich Drepper
    Link: http://lkml.kernel.org/r/1344345647-11536-3-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • This brings a new API to help the selective dump of registers on event
    sampling, and its implementation for x86 arch.

    Added HAVE_PERF_REGS config option to determine if the architecture
    provides perf registers ABI.

    The information about desired registers will be passed in u64 mask.
    It's up to the architecture to map the registers into the mask bits.

    For the x86 arch implementation, both 32 and 64 bit registers bits are
    defined within single enum to ensure 64 bit system can provide register
    dump for compat task if needed in the future.

    Original-patch-by: Frederic Weisbecker
    [ Added missing linux/errno.h include ]
    Signed-off-by: Jiri Olsa
    Cc: "Frank Ch. Eigler"
    Cc: Arun Sharma
    Cc: Benjamin Redelings
    Cc: Corey Ashford
    Cc: Cyrill Gorcunov
    Cc: Frank Ch. Eigler
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Masami Hiramatsu
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    Cc: Ulrich Drepper
    Link: http://lkml.kernel.org/r/1344345647-11536-2-git-send-email-jolsa@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa