linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] perf: timehist command
@ 2013-06-07 22:22 David Ahern
  2013-06-07 22:22 ` [RFC PATCH 1/4] perf: move setup_list from symbol.c to strlist.c David Ahern
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Ahern @ 2013-06-07 22:22 UTC (permalink / raw)
  To: acme, linux-kernel
  Cc: mingo, peterz, fweisbec, jolsa, namhyung, eranian, David Ahern

I have commented a few times over the years about a perf-based command
that does a time history analysis of task scheduling. Internal to the
product I work on it has been extremely helpful debugging systems with
heavy CPU contention - understanding which tasks are consuming cpu cycles
over a given time window; when, why and how long a task was off the CPU
and how much time did the task get when it was scheduled; inefficiencies
from process bombs (shell scripts); and more.

This is the first exported version of that command. It contains the
basic features. It is also availabe at:
    https://github.com/dsahern/linux/commits/timehist-basic-3.9

We rely on the version that also provides time-of-day correlations.
e.g., task X raised an alarm at time Y due to lack of access to a
CPU. Take time Y from the log file and correlate with perf data to
gain some insights into what was happening before, during and after
the time of interest. The time-of-day version can be found here:
    https://github.com/dsahern/linux/commits/timehist-timeofday-3.9

The command currently uses the context-switch event -- for legacy reasons
with the kernel version we use. The command needs to be updated to
leverage the many scheduling tracepoints and with it updating the data
that can be generated from the analysis. Until then throwing it out for
comments and in case others find it useful.

David Ahern (4):
  perf: move setup_list from symbol.c to strlist.c
  perf: add methods for setting/retrieving priv element of thread struct
  perf: sample after exit loses thread correlation
  perf: add timehist command

 tools/perf/Makefile           |    2 ++
 tools/perf/builtin-inject.c   |    2 +-
 tools/perf/builtin-kmem.c     |    3 ++-
 tools/perf/builtin-kvm.c      |    3 ++-
 tools/perf/builtin-lock.c     |    3 ++-
 tools/perf/builtin-sched.c    |   17 +++++++-------
 tools/perf/builtin-script.c   |    3 ++-
 tools/perf/builtin-trace.c    |    9 +++++---
 tools/perf/builtin.h          |    1 +
 tools/perf/perf.c             |    1 +
 tools/perf/perf.h             |    6 +++++
 tools/perf/tests/hists_link.c |    2 +-
 tools/perf/util/build-id.c    |   11 ++++-----
 tools/perf/util/event.c       |   11 +++++++--
 tools/perf/util/machine.c     |   49 ++++++++++++++++++++++++++++++++---------
 tools/perf/util/machine.h     |    6 +++--
 tools/perf/util/session.c     |    2 +-
 tools/perf/util/strlist.c     |   15 +++++++++++++
 tools/perf/util/strlist.h     |    2 ++
 tools/perf/util/symbol.c      |   14 ------------
 tools/perf/util/thread.h      |   12 +++++++++-
 21 files changed, 121 insertions(+), 53 deletions(-)

-- 
1.7.10.1


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

end of thread, other threads:[~2013-07-19  7:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-07 22:22 [RFC PATCH 0/4] perf: timehist command David Ahern
2013-06-07 22:22 ` [RFC PATCH 1/4] perf: move setup_list from symbol.c to strlist.c David Ahern
2013-06-07 22:22 ` [RFC PATCH 2/4] perf: add methods for setting/retrieving priv element of thread struct David Ahern
2013-07-19  7:43   ` [tip:perf/core] perf tools: Add methods for setting/ retrieving " tip-bot for David Ahern
2013-06-07 22:22 ` [PATCH 3/4] perf: sample after exit loses thread correlation David Ahern
2013-06-07 22:22 ` [RFC PATCH 4/4] perf: add timehist command David Ahern
2013-06-20 10:46   ` Ingo Molnar
2013-06-20 15:00     ` David Ahern
2013-06-20 15:26       ` Ingo Molnar

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).