All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Török Edwin" <edwintorok@gmail.com>
To: mingo@elte.hu, srostedt@redhat.com
Cc: a.p.zijlstra@chello.nl, sandmann@daimi.au.dk,
	linux-kernel@vger.kernel.org,
	"Török Edwin" <edwintorok@gmail.com>
Subject: [PATCH 0/4] ftrace: add userspace stacktrace support and semaphore-latency tracer
Date: Sun, 12 Oct 2008 16:12:00 +0300	[thread overview]
Message-ID: <1223817124-27239-2-git-send-email-edwintorok@gmail.com> (raw)
In-Reply-To: <1223817124-27239-1-git-send-email-edwintorok@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]

Hi,

This patch series is a draft implementation of a semaphore-latency tracer.
I would appreciate feedback on these patches so that they can be merged into
mainline.

The patches apply on top of tip/master (commit aaf9631d60b82182c7e9890b5ffec70f38131a50).

The first two patches add userspace stacktrace support.
Unfortunately if the userspace application (actually libc) is compiled without framepointers
on x86-64, the userspace trace will contain only 1 entry: the return address.
You can either request raw IP addresses in the trace, or ask for them to be
resolved to object file + relative address, then a tool such as addr2line can be
used to get file:line information.
This is currently x86-only, but other architectures could implement it.

TODO: It would be worth investigating if we could avoid code duplication vs. oprofile,
and use a common function for userspace traces, and convert oprofile to it.

The last 2 patches add a new tracer (and is independent of the first 2 patches).
This tracer attempts to help in tracking rwsem latency issues.
Each latency instance gets an ID, and a userspace program can be used to group
the stacktraces by latency ID, thus obtaining a list of all tasks involved
in a latency: the task(s) that was (were) holding the semaphore, and the tasks
that had to wait due to this.

See the patches themselves for more detail on how to use them.

Shortlog below:

Török Edwin (4):
  Add support for userspace stacktraces in tracing/iter_ctrl
  Identify which executable object the userspace address belongs to.
  add tracepoints in rwsem
  Implement semaphore latency tracer

 Documentation/ftrace.txt     |    5 +-
 arch/x86/kernel/stacktrace.c |   57 +++++++++++++
 include/linux/stacktrace.h   |    8 ++
 include/trace/rwsem.h        |   35 ++++++++
 kernel/trace/Kconfig         |   12 +++
 kernel/trace/Makefile        |    1 +
 kernel/trace/trace.c         |  188 ++++++++++++++++++++++++++++++++++++++++++
 kernel/trace/trace.h         |   35 ++++++++
 kernel/trace/trace_semlat.c  |  186 +++++++++++++++++++++++++++++++++++++++++
 lib/rwsem-spinlock.c         |   16 ++--
 lib/rwsem.c                  |   13 +--
 11 files changed, 539 insertions(+), 17 deletions(-)
 create mode 100644 include/trace/rwsem.h
 create mode 100644 kernel/trace/trace_semlat.c


  reply	other threads:[~2008-10-12 13:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-12 13:11 [PATCH 0/4] ftrace: add userspace stacktrace support and semaphore-latency tracer Török Edwin
2008-10-12 13:12 ` Török Edwin [this message]
2008-10-12 13:12 ` [PATCH 1/4] Add support for userspace stacktraces in tracing/iter_ctrl Török Edwin
2008-10-12 13:31   ` Frédéric Weisbecker
2008-10-12 13:53     ` Török Edwin
2008-10-13  8:02       ` Frédéric Weisbecker
2008-10-26  4:05   ` Frédéric Weisbecker
2008-10-26  7:03     ` Török Edwin
2008-10-26 15:06       ` Frédéric Weisbecker
2008-10-26 13:15     ` Frank Ch. Eigler
2008-10-26 13:29       ` Peter Zijlstra
2008-10-26 13:38         ` Török Edwin
2008-10-26 13:49           ` Frank Ch. Eigler
2008-10-27 16:03   ` Ingo Molnar
2008-10-27 16:16     ` Török Edwin
2008-10-12 13:12 ` [PATCH 2/4] Identify which executable object the userspace address belongs to Török Edwin
2008-10-12 13:12 ` [PATCH 3/4] add tracepoints in rwsem Török Edwin
2008-10-12 13:12 ` [PATCH 4/4] Implement semaphore latency tracer Török Edwin
2008-10-12 19:13   ` Peter Zijlstra
2008-10-12 20:10     ` Török Edwin
2008-10-22 15:28       ` Ingo Molnar
2008-10-22 15:41         ` Török Edwin
2008-10-22 15:48           ` Ingo Molnar
2008-10-22 17:22             ` Peter Zijlstra
2008-10-22 17:25               ` Török Edwin
2008-10-12 18:25 ` [PATCH 0/4] ftrace: add userspace stacktrace support and semaphore-latency tracer Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1223817124-27239-2-git-send-email-edwintorok@gmail.com \
    --to=edwintorok@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sandmann@daimi.au.dk \
    --cc=srostedt@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.