linux-stable/tools/perf
Arnaldo Carvalho de Melo 3ea223adcb perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples
In 473398a21d ("perf tools: Add cpumode to struct perf_sample"), I
missed some places where perf_sample fields are directly initialized in
addition to what is done in perf_evsel__parse_sample(), namely when
synthesizing PERF_RECORD_{MMAP*,COMM,FORK,EXIT} for pre-existing threads
and also in intel_pt and intel_bts when synthesizing events from
processor trace, the jitdump code also was affected, fix it.

The problem was noticed with running:

  # perf record -e intel_pt//u true
  # perf script

Where the samples wouldn't get resolved because perf_sample.cpumode
would be left as zero, i.e. PERF_RECORD_MISC_CPUMODE_UNKNOWN, not
resolving as kernel, hypervisor or user cpu modes.

Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 473398a21d ("perf tools: Add cpumode to struct perf_sample")
Link: http://lkml.kernel.org/n/tip-n5sdauxgk24d5nun8kuuu2mh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-03-29 20:03:56 -03:00
..
Documentation perf list: Fix documentation of :ppp 2016-03-22 10:01:45 -03:00
arch perf tools: Fix build break on powerpc 2016-03-28 17:46:20 -03:00
bench perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
config tools: Move utilities.mak from perf to tools/scripts/ 2016-03-18 13:57:20 -03:00
jvmti perf jvmti: improve error message in Makefile 2016-02-25 10:43:28 -03:00
python perf python: Support the PERF_RECORD_SWITCH event 2015-10-07 19:41:50 -03:00
scripts perf python scripting: Append examples to err msg about audit-libs-python 2016-02-12 11:30:27 -03:00
tests perf tests: Fix tarpkg build test error output redirection 2016-03-24 12:26:41 -03:00
trace/strace/groups perf trace: Add read/write to the file group 2015-09-04 13:22:06 -03:00
ui perf tools: Remove misplaced __maybe_unused 2016-03-23 12:03:04 -03:00
util perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples 2016-03-29 20:03:56 -03:00
.gitignore perf tools: Add Intel PT instruction decoder 2015-08-17 11:11:36 -03:00
Build perf tools: Set and pass DOCDIR to builtin-report.c 2016-01-12 12:42:07 -03:00
CREDITS
MANIFEST perf bench: Fix detached tarball building due to missing 'perf bench memcpy' headers 2016-03-24 12:28:57 -03:00
Makefile perf build tests: Do parallell builds with 'build-test' 2016-02-04 15:57:00 -03:00
Makefile.perf tools: Move utilities.mak from perf to tools/scripts/ 2016-03-18 13:57:20 -03:00
builtin-annotate.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-bench.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-buildid-cache.c perf tools: Move timestamp creation to util 2016-01-29 17:30:06 -03:00
builtin-buildid-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-config.c perf config: Add '--system' and '--user' options to select which config file is used 2016-02-12 10:54:46 -03:00
builtin-data.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-diff.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-evlist.c perf evlist: Add --trace-fields option to show trace fields 2016-01-08 14:23:02 -03:00
builtin-help.c perf help: Use asprintf instead of adhoc equivalents 2016-03-23 16:36:07 -03:00
builtin-inject.c perf tools: Add cpumode to struct perf_sample 2016-03-23 12:03:07 -03:00
builtin-kmem.c perf config: Bring perf_default_config to the very beginning at main() 2016-02-26 19:49:16 -03:00
builtin-kvm.c perf kvm/powerpc: Port perf kvm stat to powerpc 2016-01-29 17:49:54 -03:00
builtin-list.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-lock.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-mem.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-probe.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-record.c perf record: Ensure return non-zero rc when mmap fail 2016-03-03 11:10:36 -03:00
builtin-report.c perf tools: Do not include stringify.h from the kernel sources 2016-03-23 15:21:15 -03:00
builtin-sched.c perf subcmd: Create subcmd library 2015-12-17 14:27:14 -03:00
builtin-script.c perf script: Remove lots of unused arguments 2016-03-23 12:11:03 -03:00
builtin-stat.c perf stat: Add --metric-only support for -A 2016-03-10 16:50:47 -03:00
builtin-timechart.c perf machine: Rename perf_event__preprocess_sample to machine__resolve 2016-03-23 12:03:08 -03:00
builtin-top.c perf tools: Do not include stringify.h from the kernel sources 2016-03-23 15:21:15 -03:00
builtin-trace.c perf tools: Add cpumode to struct perf_sample 2016-03-23 12:03:07 -03:00
builtin-version.c perf tools: Move cmd_version() to builtin-version.c 2015-12-09 13:42:03 -03:00
builtin.h perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
command-list.txt perf tools: Do not show trace command if it's not compiled in 2016-01-08 12:46:17 -03:00
design.txt
perf-archive.sh
perf-completion.sh perf tools: Avoid confusion with preloaded bash function for perf bash completion 2015-03-19 13:53:27 -03:00
perf-read-vdso.c perf tools: Build programs to copy 32-bit compatibility 2014-10-29 10:32:48 -02:00
perf-sys.h perf tools: Move generic barriers out of perf-sys.h 2015-05-08 16:05:08 -03:00
perf-with-kcore.sh perf tools: Fix perf-with-kcore handling of arguments containing spaces 2015-08-06 16:48:27 -03:00
perf.c perf config: Bring perf_default_config to the very beginning at main() 2016-02-26 19:49:16 -03:00
perf.h perf record: Add --all-user/--all-kernel options 2016-02-18 10:48:44 -03:00