linux-stable/tools/perf
Andi Kleen 4b6ac811bc perf script: Handle missing fields with -F +..
When using -F + syntax to add a field the existing defaults are
currently all marked user_set. This can cause errors when some field is
missing in the perf.data

This patch tracks the actually user set fields separately, so that we don't
error out in this case.

Before:

  % perf record true
  % perf script -F +metric
  Samples for 'cycles:ppp' event do not have CPU attribute set. Cannot print 'cpu' field.
  %

After:

  5 perf record true
  % perf script -F +metric
              perf 28936 278636.237688:          1 cycles:ppp:  ffffffff8117da99 perf_event_exec+0x59 (/lib/modules/4.20.0-odilo/build/vmlinux)
  ...
  %

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20190224153722.27020-2-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-02-25 10:58:07 -03:00
..
arch perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
bench perf bench: Add epoll_ctl(2) benchmark 2018-11-21 22:39:55 -03:00
Documentation perf script: Allow +- operator for type specific fields option 2019-02-20 16:15:35 -03:00
examples/bpf perf augmented_syscalls: Convert to bpf_map() 2019-01-25 15:12:11 +01:00
include/bpf perf bpf: Convert pid_map() to bpf_map() 2019-01-25 15:12:10 +01:00
jvmti perf jvmti: Separate jvmti cmlr check 2018-11-21 22:39:58 -03:00
pmu-events perf vendor events power9: General metrics 2019-02-14 13:31:11 -03:00
python
scripts perf scripts python: exported-sql-viewer.py: Add top calls report 2019-02-22 16:52:07 -03:00
tests perf test: Fix failure of 'evsel-tp-sched' test on s390 2019-02-19 13:43:29 -03:00
trace perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
ui perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
util perf data: Add perf_data__open_dir_data function 2019-02-25 10:43:07 -03:00
.gitignore
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
builtin-annotate.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-bench.c perf bench: Add epoll_ctl(2) benchmark 2018-11-21 22:39:55 -03:00
builtin-buildid-cache.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-buildid-list.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-c2c.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-config.c perf config: Show the configuration when no arguments are provided 2018-12-18 12:24:00 -03:00
builtin-data.c
builtin-diff.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-evlist.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-ftrace.c
builtin-help.c perf help: Remove needless use of strncpy() 2018-12-17 14:59:18 -03:00
builtin-inject.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-kallsyms.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
builtin-kmem.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-kvm.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-list.c perf list: Display metric expressions for --details option 2019-02-14 15:18:09 -03:00
builtin-lock.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-mem.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-probe.c perf namespaces: Remove namespaces.h from .h headers 2019-01-25 15:12:09 +01:00
builtin-record.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-report.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-sched.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-script.c perf script: Handle missing fields with -F +.. 2019-02-25 10:58:07 -03:00
builtin-stat.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-timechart.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-top.c perf pmu: Remove set_drv_config API 2019-02-06 10:00:39 -03:00
builtin-trace.c perf data: Add global path holder 2019-02-22 16:52:07 -03:00
builtin-version.c
builtin.h
check-headers.sh tools headers powerpc: Remove unistd.h 2019-01-10 10:42:08 -03:00
command-list.txt perf help: Add missing subcommand version 2018-09-19 14:53:36 -03:00
CREDITS
design.txt perf/doc: Update design.txt for exclude_{host|guest} flags 2019-01-21 11:01:18 +01:00
Makefile perf tools: Disable parallelism for 'make clean' 2018-08-20 08:54:58 -03:00
Makefile.config perf build: Add missing FEATURE_CHECK_LDFLAGS-libcrypto 2019-02-14 15:18:05 -03:00
Makefile.perf perf tools: Rename LIB_FILE to LIBPERF_A 2019-02-14 15:18:08 -03:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-read-vdso.c perf tools: Make find_vdso_map() more modular 2019-01-08 13:28:13 -03:00
perf-sys.h
perf-with-kcore.sh
perf.c
perf.h perf record: Allocate affinity masks 2019-02-06 10:00:39 -03:00