perf/urgent improvements and fixes:

- Fixes dealing with the removal of the fallback to looking up samples
  marked as userspace in the kernel maps, done recently:

  - For intel-pt, that was setting the synthesized header misc field
    as PERF_RECORD_MISC_USER, depending thus on the fallback to take
    place, now it sets as USER or KERNEL according to x86 specific
    knowledge. Also now it inserts the PERF_CONTEXT_{USER,KERNEL} into
    the PERF_SAMPLE_CALLCHAINs it synthesizes from hw traces (Adrian Hunter)

  - Similar fixes for the cs-etm ARM HW trace code, that used the Intel PT
    model as a starting point (Leo Yan)

  - For the "caller" callchain order, where the callchain returned by the
    kernel was simply reversed without taking into account the
    PERF_CONTEXT_{USER,KERNEL,etc} markers from where to define if an entry
    was for kernel or userspace, working just because the map lookup fallback
    was in place (David S. Miller)

- Allow for selecting if 'overwrite' mode should be used in 'perf top' and
  make the default for it not to be used. This is due to problems with the
  current implementation where the pausing used ends up making 'perf top'
  miss PERF_RECORD_{MMAP,FORK,EXEC,etc} events, which with short lifetime
  threads workloads leads quickly to many "unknown" maps (and thus symbols)
  to appear in the UI. Workloads with long thread lifetimes and with few
  metadata events can still use --overwrite to take advantage of the
  overwrite mode (Arnaldo Carvalho de Melo)

- Start 'perf top''s display thread earlier, so that the screen doesn't
  remain blank for too long at tool start (David S. Miller)

- Don't clone maps from parent when synthesizing forks, to avoid the inevitable
  flurry of overlapping maps as we process the synthesized MMAP2 events that get
  delivered shortly thereafter. (David S. Miller)

- Take pgoff into account when reporting elf to libdwfl, now the unwinding
  results are the same with elfutils's libdwfl and libunwind (Milian Wolff)

- Update lotsa kernel ABI headers (Arnaldo Carvalho de Melo)

- 'perf trace' syscall arg beautification improvements to allow for
  handling args such as mount's 'flags', where maks have to be ignored
  before considering what is left, that, if only zeroes, is suppressed
  like other args without such masks (Arnaldo Carvalho de Melo)

- Beautify mount's 'source' and 'flags' args (Arnaldo Carvalho de Melo)

- Generate mmap's flags bit constants from linux/mman.h and all the
  arch specific mman.h files, so that no changes in the main 'perf trace'
  source files is required when new flags get added (Arnaldo Carvalho de Melo)

- Consider syscall aliases, so that 'perf trace -e umount' works and we don't
  have to use 'umount2' (that works as well, just not required) (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
perf intel-pt/bts: Calculate cpumode for synthesized samples

In the absence of a fallback, samples must provide a correct cpumode for
the 'ip'. Do that now there is no fallback.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: stable@vger.kernel.org # 4.19
Link: http://lkml.kernel.org/r/20181031091043.23465-6-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2 files changed