From: Petar Gligoric <petar.gligor@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Petar Gligoric <petar.gligoric@rohde-schwarz.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Andi Kleen <ak@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>,
Ian Rogers <irogers@google.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH v2 0/3] perf: introduce perf based task analyzer
Date: Tue, 6 Dec 2022 10:44:03 -0500 [thread overview]
Message-ID: <20221206154406.41941-1-petar.gligor@gmail.com> (raw)
From: Petar Gligoric <petar.gligoric@rohde-schwarz.com>
This patch-series introduces the task analyzer and adds the feature to
output csv files for further analysis in thirds party script
(e.g. pandas and friends).
The task analyzer dissects recorded perf.data files based on
sched:sched_switch events. It outputs useful information for the user
of each task, like times between schedule in/schedule out of the same
task.
Switched-In Switched-Out CPU PID TID Comm Runtime Time Out-In
15576.658891407 15576.659156086 4 2412 2428 gdbus 265 1949
15576.659111320 15576.659455410 0 2412 2412 gnome-shell 344 2267
15576.659491326 15576.659506173 2 74 74 kworker/2:1 15 13145
[...]
The user can modify the output to his liking and his necessity. He can
either limit the output to tasks he wants or filter tasks he does not
present in the output. The output can also be limited via the time or
specific tasks can be highlight via colors. A combination of those
options is also possible.
Additionally the user can print out a summary of all tasks, which is a
table of information from all tasks throughout the whole trace.
Information, like total runtime, how many times the tasks have been
scheduled in, what the max runtime was and when it occurred, just to
name few.
Summary
Task Information Runtime Information
PID TID Comm Runs Accumulated Mean Median Min Max Max At
14 14 ksoftirqd/0 13 334 26 15 9 127 15571.621211956
15 15 rcu_preempt 133 1778 13 13 2 33 15572.581176024
16 16 migration/0 3 49 16 13 12 24 15571.608915425
[...]
The standard task as well as the summary can be printed in either
nanoseconds, milliseconds or microseconds(standard).
Both standard as well as summary can be saved in a user specified file
in csv format.
v2:
- Add tests for new perf task-analyzer suggested by Ian Rogers
Hagen Paul Pfeifer (1):
perf script: introduce task analyzer
Petar Gligoric (2):
perf script: task-analyzer add csv support
perf test: Add new task-analyzer tests
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
.../scripts/python/bin/tasks-analyzer-record | 2 +
.../scripts/python/bin/tasks-analyzer-report | 3 +
tools/perf/scripts/python/tasks-analyzer.py | 937 ++++++++++++++++++
3 files changed, 942 insertions(+)
create mode 100755 tools/perf/scripts/python/bin/tasks-analyzer-record
create mode 100755 tools/perf/scripts/python/bin/tasks-analyzer-report
create mode 100755 tools/perf/scripts/python/tasks-analyzer.py
--
2.30.2
next reply other threads:[~2022-12-06 15:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-06 15:44 Petar Gligoric [this message]
2022-12-06 15:44 ` [PATCH v2 1/3] perf script: introduce " Petar Gligoric
2022-12-06 15:44 ` [PATCH v2 2/3] perf script: task-analyzer add csv support Petar Gligoric
2022-12-06 15:44 ` [PATCH v2 3/3] perf test: add new task-analyzer tests Petar Gligoric
2022-12-06 18:32 ` [PATCH v2 0/3] perf: introduce perf based task analyzer Namhyung Kim
2022-12-06 22:21 ` Petar Gligoric
2022-12-08 4:59 ` Namhyung Kim
2022-12-08 12:15 ` Petar Gligoric
2022-12-08 19:10 ` Namhyung Kim
2022-12-08 20:11 ` Petar Gligoric
2022-12-08 20:15 ` Namhyung Kim
2022-12-12 20:03 ` Arnaldo Carvalho de Melo
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=20221206154406.41941-1-petar.gligor@gmail.com \
--to=petar.gligor@gmail.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=petar.gligoric@rohde-schwarz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®