2014-12-29 12:52:36 +00:00
|
|
|
perf-y += builtin-bench.o
|
2014-12-29 14:13:44 +00:00
|
|
|
perf-y += builtin-annotate.o
|
2015-11-17 13:53:21 +00:00
|
|
|
perf-y += builtin-config.o
|
2014-12-29 14:13:44 +00:00
|
|
|
perf-y += builtin-diff.o
|
|
|
|
perf-y += builtin-evlist.o
|
2013-03-07 12:45:20 +00:00
|
|
|
perf-y += builtin-ftrace.o
|
2014-12-29 14:13:44 +00:00
|
|
|
perf-y += builtin-help.o
|
|
|
|
perf-y += builtin-sched.o
|
|
|
|
perf-y += builtin-buildid-list.o
|
|
|
|
perf-y += builtin-buildid-cache.o
|
2017-01-05 18:33:32 +00:00
|
|
|
perf-y += builtin-kallsyms.o
|
2014-12-29 14:13:44 +00:00
|
|
|
perf-y += builtin-list.o
|
|
|
|
perf-y += builtin-record.o
|
|
|
|
perf-y += builtin-report.o
|
|
|
|
perf-y += builtin-stat.o
|
|
|
|
perf-y += builtin-timechart.o
|
|
|
|
perf-y += builtin-top.o
|
|
|
|
perf-y += builtin-script.o
|
|
|
|
perf-y += builtin-kmem.o
|
|
|
|
perf-y += builtin-lock.o
|
|
|
|
perf-y += builtin-kvm.o
|
|
|
|
perf-y += builtin-inject.o
|
|
|
|
perf-y += builtin-mem.o
|
2015-02-20 22:16:59 +00:00
|
|
|
perf-y += builtin-data.o
|
2015-12-08 04:21:48 +00:00
|
|
|
perf-y += builtin-version.o
|
2016-09-22 15:36:38 +00:00
|
|
|
perf-y += builtin-c2c.o
|
2021-02-08 20:08:45 +00:00
|
|
|
perf-y += builtin-daemon.o
|
perf kwork: New tool to trace time properties of kernel work (such as softirq, and workqueue)
The 'perf kwork' tool is used to trace time properties of kernel work
(such as irq, softirq, and workqueue), including runtime, latency, and
timehist, using the infrastructure in the perf tools to allow tracing
extra targets.
This is the first commit to reuse the 'perf record' framework code to
implement a simple record function, kwork is not supported currently.
Test cases:
# perf
usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS]
The most commonly used perf commands are:
<SNIP>
iostat Show I/O performance metrics
kallsyms Searches running kernel for symbols
kmem Tool to trace/measure kernel memory properties
kvm Tool to trace/measure kvm guest os
kwork Tool to trace/measure kernel work properties (latencies)
list List all symbolic event types
lock Analyze lock events
mem Profile memory accesses
record Run a command and record its profile into perf.data
<SNIP>
See 'perf help COMMAND' for more information on a specific command.
# perf kwork
Usage: perf kwork [<options>] {record}
-D, --dump-raw-trace dump raw trace in ASCII
-f, --force don't complain, do it
-k, --kwork <kwork> list of kwork to profile
-v, --verbose be more verbose (show symbol address, etc)
# perf kwork record -- sleep 1
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 1.787 MB perf.data ]
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220709015033.38326-2-yangjihong1@huawei.com
[ Add {} for multiline if blocks ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-07-09 01:50:17 +00:00
|
|
|
perf-y += builtin-kwork.o
|
2014-12-29 14:13:44 +00:00
|
|
|
|
2018-01-19 08:56:17 +00:00
|
|
|
perf-$(CONFIG_TRACE) += builtin-trace.o
|
2014-12-29 22:52:25 +00:00
|
|
|
perf-$(CONFIG_LIBELF) += builtin-probe.o
|
2014-12-29 14:13:44 +00:00
|
|
|
|
2014-12-29 12:52:36 +00:00
|
|
|
perf-y += bench/
|
2014-12-29 14:03:09 +00:00
|
|
|
perf-y += tests/
|
2014-12-29 14:13:44 +00:00
|
|
|
|
2014-12-30 16:09:15 +00:00
|
|
|
perf-y += perf.o
|
|
|
|
|
2014-12-29 14:13:44 +00:00
|
|
|
paths += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))"
|
|
|
|
paths += -DPERF_INFO_PATH="BUILD_STR($(infodir_SQ))"
|
|
|
|
paths += -DPERF_MAN_PATH="BUILD_STR($(mandir_SQ))"
|
|
|
|
|
|
|
|
CFLAGS_builtin-help.o += $(paths)
|
|
|
|
CFLAGS_builtin-timechart.o += $(paths)
|
2015-12-15 15:39:35 +00:00
|
|
|
CFLAGS_perf.o += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))" \
|
|
|
|
-DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" \
|
2017-01-16 15:22:37 +00:00
|
|
|
-DPREFIX="BUILD_STR($(prefix_SQ))"
|
perf trace: Support 'strace' syscall event groups
I.e.:
$ cat ~/share/perf-core/strace/groups/file
access
chmod
creat
execve
faccessat
getcwd
lstat
mkdir
open
openat
quotactl
readlink
rename
rmdir
stat
statfs
symlink
unlink
$
Then, on a quiet desktop, try running this and then moving your mouse to
see the deluge of mouse related activity:
# perf probe 'vfs_getname=getname_flags:72 pathname=filename:string'
Added new event:
probe:vfs_getname (on getname_flags:72 with pathname=filename:string)
You can now use it in all perf tools, such as:
perf record -e probe:vfs_getname -aR sleep 1
#
# trace --ev probe:vfs_getname --filter-pids 2232 -e file
0.042 (0.042 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
0.042 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/xterm")
0.100 (0.100 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
0.142 (0.018 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
0.142 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/index.theme")
0.192 (0.069 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
0.230 (0.017 ms): mousetweaks/2235 open(filename: 0x14c3c10, mode: 438 ) ...
0.230 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/usr/share/icons/Adwaita/cursors/xterm")
0.253 (0.041 ms): mousetweaks/2235 ... [continued]: open()) = 14
0.459 (0.008 ms): mousetweaks/2235 open(filename: 0x14e3910, mode: 438 ) ...
0.459 ( ): probe:vfs_getname:(ffffffff812230bc) pathname="/home/acme/.icons/Adwaita/cursors/left_side")
0.468 (0.017 ms): mousetweaks/2235 ... [continued]: open()) = -1 ENOENT No such file or directory
Need to combine that raw_syscalls:sys_enter(open) + probe:vfs_getname +
raw_syscalls:sys_exit(open) sequence...
Now, if you're bored, please write some more syscall groups, like the ones
in 'strace' and send it our way :-)
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Milian Wolff <mail@milianw.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-a42xklu59lcbxp7bbnic74a8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-07-20 15:02:09 +00:00
|
|
|
CFLAGS_builtin-trace.o += -DSTRACE_GROUPS_DIR="BUILD_STR($(STRACE_GROUPS_DIR_SQ))"
|
2016-01-07 11:41:53 +00:00
|
|
|
CFLAGS_builtin-report.o += -DTIPDIR="BUILD_STR($(tipdir_SQ))"
|
2016-01-09 10:16:28 +00:00
|
|
|
CFLAGS_builtin-report.o += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
|
2014-12-29 16:42:46 +00:00
|
|
|
|
2019-02-13 12:32:39 +00:00
|
|
|
perf-y += util/
|
|
|
|
perf-y += arch/
|
|
|
|
perf-y += ui/
|
|
|
|
perf-y += scripts/
|
|
|
|
perf-$(CONFIG_TRACE) += trace/beauty/
|
2014-12-29 23:34:23 +00:00
|
|
|
|
|
|
|
gtk-y += ui/gtk/
|