2014-12-29 16:42:46 +00:00
|
|
|
libperf-y += abspath.o
|
|
|
|
libperf-y += alias.o
|
|
|
|
libperf-y += annotate.o
|
|
|
|
libperf-y += build-id.o
|
|
|
|
libperf-y += config.o
|
|
|
|
libperf-y += ctype.o
|
|
|
|
libperf-y += db-export.o
|
|
|
|
libperf-y += environment.o
|
|
|
|
libperf-y += event.o
|
|
|
|
libperf-y += evlist.o
|
|
|
|
libperf-y += evsel.o
|
|
|
|
libperf-y += exec_cmd.o
|
|
|
|
libperf-y += find_next_bit.o
|
|
|
|
libperf-y += help.o
|
|
|
|
libperf-y += kallsyms.o
|
|
|
|
libperf-y += levenshtein.o
|
2015-07-21 11:13:34 +00:00
|
|
|
libperf-y += llvm-utils.o
|
2014-12-29 16:42:46 +00:00
|
|
|
libperf-y += parse-options.o
|
|
|
|
libperf-y += parse-events.o
|
|
|
|
libperf-y += path.o
|
|
|
|
libperf-y += rbtree.o
|
|
|
|
libperf-y += bitmap.o
|
|
|
|
libperf-y += hweight.o
|
|
|
|
libperf-y += run-command.o
|
|
|
|
libperf-y += quote.o
|
|
|
|
libperf-y += strbuf.o
|
|
|
|
libperf-y += string.o
|
|
|
|
libperf-y += strlist.o
|
|
|
|
libperf-y += strfilter.o
|
|
|
|
libperf-y += top.o
|
|
|
|
libperf-y += usage.o
|
|
|
|
libperf-y += wrapper.o
|
|
|
|
libperf-y += sigchain.o
|
|
|
|
libperf-y += dso.o
|
|
|
|
libperf-y += symbol.o
|
|
|
|
libperf-y += color.o
|
|
|
|
libperf-y += pager.o
|
|
|
|
libperf-y += header.o
|
|
|
|
libperf-y += callchain.o
|
|
|
|
libperf-y += values.o
|
|
|
|
libperf-y += debug.o
|
|
|
|
libperf-y += machine.o
|
|
|
|
libperf-y += map.o
|
|
|
|
libperf-y += pstack.o
|
|
|
|
libperf-y += session.o
|
|
|
|
libperf-y += ordered-events.o
|
|
|
|
libperf-y += comm.o
|
|
|
|
libperf-y += thread.o
|
|
|
|
libperf-y += thread_map.o
|
|
|
|
libperf-y += trace-event-parse.o
|
|
|
|
libperf-y += parse-events-flex.o
|
|
|
|
libperf-y += parse-events-bison.o
|
|
|
|
libperf-y += pmu.o
|
|
|
|
libperf-y += pmu-flex.o
|
|
|
|
libperf-y += pmu-bison.o
|
|
|
|
libperf-y += trace-event-read.o
|
|
|
|
libperf-y += trace-event-info.o
|
|
|
|
libperf-y += trace-event-scripting.o
|
|
|
|
libperf-y += trace-event.o
|
|
|
|
libperf-y += svghelper.o
|
|
|
|
libperf-y += sort.o
|
|
|
|
libperf-y += hist.o
|
|
|
|
libperf-y += util.o
|
|
|
|
libperf-y += xyarray.o
|
|
|
|
libperf-y += cpumap.o
|
|
|
|
libperf-y += cgroup.o
|
|
|
|
libperf-y += target.o
|
|
|
|
libperf-y += rblist.o
|
|
|
|
libperf-y += intlist.o
|
|
|
|
libperf-y += vdso.o
|
2015-08-07 10:51:03 +00:00
|
|
|
libperf-y += counts.o
|
2014-12-29 16:42:46 +00:00
|
|
|
libperf-y += stat.o
|
2015-06-03 14:25:59 +00:00
|
|
|
libperf-y += stat-shadow.o
|
2014-12-29 16:42:46 +00:00
|
|
|
libperf-y += record.o
|
|
|
|
libperf-y += srcline.o
|
|
|
|
libperf-y += data.o
|
2015-02-19 18:22:33 +00:00
|
|
|
libperf-$(CONFIG_X86) += tsc.o
|
2014-12-29 16:42:46 +00:00
|
|
|
libperf-y += cloexec.o
|
|
|
|
libperf-y += thread-stack.o
|
2015-04-30 14:37:27 +00:00
|
|
|
libperf-$(CONFIG_AUXTRACE) += auxtrace.o
|
2015-05-27 17:51:51 +00:00
|
|
|
libperf-y += parse-branch-options.o
|
2014-12-29 16:42:46 +00:00
|
|
|
|
2014-12-29 22:52:25 +00:00
|
|
|
libperf-$(CONFIG_LIBELF) += symbol-elf.o
|
2015-07-15 09:14:07 +00:00
|
|
|
libperf-$(CONFIG_LIBELF) += probe-file.o
|
2014-12-29 22:52:25 +00:00
|
|
|
libperf-$(CONFIG_LIBELF) += probe-event.o
|
|
|
|
|
|
|
|
ifndef CONFIG_LIBELF
|
|
|
|
libperf-y += symbol-minimal.o
|
|
|
|
endif
|
|
|
|
|
2014-12-29 23:06:25 +00:00
|
|
|
libperf-$(CONFIG_DWARF) += probe-finder.o
|
|
|
|
libperf-$(CONFIG_DWARF) += dwarf-aux.o
|
|
|
|
|
2014-12-29 23:11:11 +00:00
|
|
|
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
|
|
|
|
libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
|
|
|
|
|
perf data: Add perf data to CTF conversion support
Adding 'perf data convert' to convert perf data file into different
format. This patch adds support for CTF format conversion.
To convert perf.data into CTF run:
$ perf data convert --to-ctf=./ctf-data/
[ perf data convert: Converted 'perf.data' into CTF data './ctf-data/' ]
[ perf data convert: Converted and wrote 11.268 MB (100230 samples) ]
The command will create CTF metadata out of perf.data file (or one
specified via -i option) and then convert all sample events into single
CTF stream.
Each sample_type bit is translated into separated CTF event field apart
from following exceptions:
PERF_SAMPLE_RAW - added in next patch
PERF_SAMPLE_READ - TODO
PERF_SAMPLE_CALLCHAIN - TODO
PERF_SAMPLE_BRANCH_STACK - TODO
PERF_SAMPLE_REGS_USER - TODO
PERF_SAMPLE_STACK_USER - TODO
$ perf --debug=data-convert=2 data convert ...
The converted CTF data could be analyzed by CTF tools, like babletrace
or tracecompass [1].
$ babeltrace ./ctf-data/
[03:19:13.962125533] (+?.?????????) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 1 }
[03:19:13.962130001] (+0.000004468) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 1 }
[03:19:13.962131936] (+0.000001935) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 8 }
[03:19:13.962133732] (+0.000001796) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 114 }
[03:19:13.962135557] (+0.000001825) cycles: { }, { ip = 0xFFFFFFFF8105443A, tid = 20714, pid = 20714, period = 2087 }
[03:19:13.962137627] (+0.000002070) cycles: { }, { ip = 0xFFFFFFFF81361938, tid = 20714, pid = 20714, period = 37582 }
[03:19:13.962161091] (+0.000023464) cycles: { }, { ip = 0xFFFFFFFF8124218F, tid = 20714, pid = 20714, period = 600246 }
[03:19:13.962517569] (+0.000356478) cycles: { }, { ip = 0xFFFFFFFF811A75DB, tid = 20714, pid = 20714, period = 1325731 }
[03:19:13.969518008] (+0.007000439) cycles: { }, { ip = 0x34080917B2, tid = 20714, pid = 20714, period = 1144298 }
The following members to the ctf-environment were decided to be added to
distinguish and specify perf CTF data:
- domain
It says "kernel" because it contains a kernel trace (not to be
confused with a user space like lttng-ust does)
- tracer_name
It says perf. This can be used to distinguish between lttng and perf
CTF based trace.
- version
The kernel version from stream. In addition to release, this is what
it looks like on a Debian kernel:
release = "3.14-1-amd64";
version = "3.14.0";
[1] http://projects.eclipse.org/projects/tools.tracecompass
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: David Ahern <dsahern@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeremie Galarneau <jgalar@efficios.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1424470628-5969-4-git-send-email-jolsa@kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2015-02-20 22:17:00 +00:00
|
|
|
libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
|
|
|
|
|
2014-12-30 12:11:32 +00:00
|
|
|
libperf-y += scripting-engines/
|
|
|
|
|
2014-12-30 12:30:04 +00:00
|
|
|
libperf-$(CONFIG_PERF_REGS) += perf_regs.o
|
2014-12-30 12:31:12 +00:00
|
|
|
libperf-$(CONFIG_ZLIB) += zlib.o
|
2015-01-29 12:29:39 +00:00
|
|
|
libperf-$(CONFIG_LZMA) += lzma.o
|
2014-12-30 12:30:04 +00:00
|
|
|
|
2014-12-29 16:42:46 +00:00
|
|
|
CFLAGS_config.o += -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
|
|
|
|
CFLAGS_exec_cmd.o += -DPERF_EXEC_PATH="BUILD_STR($(perfexecdir_SQ))" -DPREFIX="BUILD_STR($(prefix_SQ))"
|
|
|
|
|
|
|
|
$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2015-05-14 15:31:48 +00:00
|
|
|
$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
|
2014-12-29 16:42:46 +00:00
|
|
|
|
|
|
|
$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2015-05-14 15:31:48 +00:00
|
|
|
$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
|
2014-12-29 16:42:46 +00:00
|
|
|
|
|
|
|
$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2015-05-14 15:31:48 +00:00
|
|
|
$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
|
2014-12-29 16:42:46 +00:00
|
|
|
|
|
|
|
$(OUTPUT)util/pmu-bison.c: util/pmu.y
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2015-05-14 15:31:48 +00:00
|
|
|
$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
|
2014-12-29 16:42:46 +00:00
|
|
|
|
|
|
|
CFLAGS_parse-events-flex.o += -w
|
|
|
|
CFLAGS_pmu-flex.o += -w
|
2015-04-29 15:55:00 +00:00
|
|
|
CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
|
2014-12-29 16:42:46 +00:00
|
|
|
CFLAGS_pmu-bison.o += -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -w
|
|
|
|
|
|
|
|
$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
|
|
|
|
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
|
|
|
|
|
|
|
|
CFLAGS_find_next_bit.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
|
|
|
|
CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
|
|
|
|
CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
|
|
|
|
CFLAGS_parse-events.o += -Wno-redundant-decls
|
|
|
|
|
|
|
|
$(OUTPUT)util/kallsyms.o: ../lib/symbol/kallsyms.c FORCE
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2014-12-29 16:42:46 +00:00
|
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
|
|
|
|
$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2014-12-29 16:42:46 +00:00
|
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
|
2015-07-06 01:48:21 +00:00
|
|
|
$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2014-12-29 16:42:46 +00:00
|
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
|
2015-07-09 19:27:25 +00:00
|
|
|
$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
|
2014-12-30 17:44:38 +00:00
|
|
|
$(call rule_mkdir)
|
2014-12-29 16:42:46 +00:00
|
|
|
$(call if_changed_dep,cc_o_c)
|