bcc84ec65a
This patch modifies the -I/--int-regs option to enablepassing the name of the registers to sample on interrupt. Registers can be specified by their symbolic names. For instance on x86, --intr-regs=ax,si. The motivation is to reduce the size of the perf.data file and the overhead of sampling by only collecting the registers useful to a specific analysis. For instance, for value profiling, sampling only the registers used to passed arguements to functions. With no parameter, the --intr-regs still records all possible registers based on the architecture. To name registers, it is necessary to use the long form of the option, i.e., --intr-regs: $ perf record --intr-regs=si,di,r8,r9 ..... To record any possible registers: $ perf record -I ..... $ perf report --intr-regs ... To display the register, one can use perf report -D To list the available registers: $ perf record --intr-regs=\? available registers: AX BX CX DX SI DI BP SP IP FLAGS CS SS R8 R9 R10 R11 R12 R13 R14 R15 Signed-off-by: Stephane Eranian <eranian@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1441039273-16260-4-git-send-email-eranian@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
156 lines
4.7 KiB
Text
156 lines
4.7 KiB
Text
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
|
|
libperf-y += llvm-utils.o
|
|
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
|
|
libperf-y += counts.o
|
|
libperf-y += stat.o
|
|
libperf-y += stat-shadow.o
|
|
libperf-y += record.o
|
|
libperf-y += srcline.o
|
|
libperf-y += data.o
|
|
libperf-$(CONFIG_X86) += tsc.o
|
|
libperf-$(CONFIG_AUXTRACE) += tsc.o
|
|
libperf-y += cloexec.o
|
|
libperf-y += thread-stack.o
|
|
libperf-$(CONFIG_AUXTRACE) += auxtrace.o
|
|
libperf-$(CONFIG_AUXTRACE) += intel-pt-decoder/
|
|
libperf-$(CONFIG_AUXTRACE) += intel-pt.o
|
|
libperf-$(CONFIG_AUXTRACE) += intel-bts.o
|
|
libperf-y += parse-branch-options.o
|
|
libperf-y += parse-regs-options.o
|
|
|
|
libperf-$(CONFIG_LIBELF) += symbol-elf.o
|
|
libperf-$(CONFIG_LIBELF) += probe-file.o
|
|
libperf-$(CONFIG_LIBELF) += probe-event.o
|
|
|
|
ifndef CONFIG_LIBELF
|
|
libperf-y += symbol-minimal.o
|
|
endif
|
|
|
|
libperf-$(CONFIG_DWARF) += probe-finder.o
|
|
libperf-$(CONFIG_DWARF) += dwarf-aux.o
|
|
|
|
libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o
|
|
libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o
|
|
|
|
libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o
|
|
|
|
libperf-y += scripting-engines/
|
|
|
|
libperf-$(CONFIG_PERF_REGS) += perf_regs.o
|
|
libperf-$(CONFIG_ZLIB) += zlib.o
|
|
libperf-$(CONFIG_LZMA) += lzma.o
|
|
|
|
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
|
|
$(call rule_mkdir)
|
|
$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) util/parse-events.l
|
|
|
|
$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
|
|
$(call rule_mkdir)
|
|
$(Q)$(call echo-cmd,bison)$(BISON) -v util/parse-events.y -d $(PARSER_DEBUG_BISON) -o $@ -p parse_events_
|
|
|
|
$(OUTPUT)util/pmu-flex.c: util/pmu.l $(OUTPUT)util/pmu-bison.c
|
|
$(call rule_mkdir)
|
|
$(Q)$(call echo-cmd,flex)$(FLEX) -o $@ --header-file=$(OUTPUT)util/pmu-flex.h util/pmu.l
|
|
|
|
$(OUTPUT)util/pmu-bison.c: util/pmu.y
|
|
$(call rule_mkdir)
|
|
$(Q)$(call echo-cmd,bison)$(BISON) -v util/pmu.y -d -o $@ -p perf_pmu_
|
|
|
|
CFLAGS_parse-events-flex.o += -w
|
|
CFLAGS_pmu-flex.o += -w
|
|
CFLAGS_parse-events-bison.o += -DYYENABLE_NLS=0 -w
|
|
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
|
|
$(call rule_mkdir)
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
$(OUTPUT)util/find_next_bit.o: ../lib/util/find_next_bit.c FORCE
|
|
$(call rule_mkdir)
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
$(OUTPUT)util/rbtree.o: ../lib/rbtree.c FORCE
|
|
$(call rule_mkdir)
|
|
$(call if_changed_dep,cc_o_c)
|
|
|
|
$(OUTPUT)util/hweight.o: ../lib/hweight.c FORCE
|
|
$(call rule_mkdir)
|
|
$(call if_changed_dep,cc_o_c)
|