Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f913f3a6 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo-4.11-20170111' of...

Merge tag 'perf-core-for-mingo-4.11-20170111' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/core

Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:

New features:

- Add more triggers to switch the output file (perf.data.TIMESTAMP).

  Now, in addition to switching to a different output file when
  receiving a SIGUSR2, one can also specify file size and time based
  triggers:

       perf record -a --switch-output=signal

  is equivalent to what we had before:

       perf record -a --switch-output

  While we can also ask for the file to be "sliced" by size, taking
  into account that that will happen only when we get woken up by
  the kernel, i.e. one has to take into account the --mmap-pages (the
  size of the perf mmap ring buffer):

       perf record -a --switch-output=2G

  will break the perf.data output into multiple files limited to 2GB
  of samples, right when generating the output.

  For time based samples, alert() will be used, so to have 1 minute
  limited perf.data output files:

      perf record -a --switch-output=1m

  (Jiri Olsa)

- Remove the need to use -e only for syscalls and --event only for
  tracepoints/HW/SW/etc events, i.e. now one can use:

      perf trace -e nanosleep,futex,sched:sched_switch ./workload

  or:

      perf trace --event nanosleep,futex,sched:sched_switch ./workload

  And have it tracing raw_syscalls:sys_{enter,exit} for the nanosleep
  and futex syscalls, formatting those as strace does while also
  tracing sched:sched_switch, ordering it all into one strace like
  output.

  Using '!' as the first character in the -e/--event argument remains
  a way to negate the list of syscalls, i.e. all syscalls except for
  the ones specified, doesn't affect the other kinds of events.

  E.g:

  [root@jouet ~] # perf trace -e sched:sched_switch,nanosleep usleep 1
     0.000 ( 0.028 ms): usleep/28150 nanosleep(rqtp: 0x7ffe4201b9f0) ...
     0.028 (         ): sched:sched_switch:usleep:28150 [120] S ==> swapper/0:0 [120])
     0.000 ( 0.065 ms): usleep/28150  ... [continued]: nanosleep()) = 0
  [root@jouet ~]#

  (Arnaldo Carvalho de Melo)

- 'perf kallsyms' toy tool to look for extended symbol information on
  the running kernel and demonstrate the machine/thread/symbol APIs for
  use in other tools, such as 'perf probe' (Arnaldo Carvalho de Melo)

Infrastructure improvements:

- Add missing linux/kernel.h include to subcmd.h (Arnaldo Carvalho de Melo)
  tools: Sync x86's vmx.h with the kernel

- Create libdir directory before installing libperf-jvmti.so (Laura Abbott)

- Fix typo in perf_evlist__start_workload() (Soramichi Akiyama)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents ad5013d5 675f52b2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -65,6 +65,8 @@
#define EXIT_REASON_TPR_BELOW_THRESHOLD 43
#define EXIT_REASON_APIC_ACCESS         44
#define EXIT_REASON_EOI_INDUCED         45
#define EXIT_REASON_GDTR_IDTR           46
#define EXIT_REASON_LDTR_TR             47
#define EXIT_REASON_EPT_VIOLATION       48
#define EXIT_REASON_EPT_MISCONFIG       49
#define EXIT_REASON_INVEPT              50
@@ -113,6 +115,8 @@
	{ EXIT_REASON_MCE_DURING_VMENTRY,    "MCE_DURING_VMENTRY" }, \
	{ EXIT_REASON_TPR_BELOW_THRESHOLD,   "TPR_BELOW_THRESHOLD" }, \
	{ EXIT_REASON_APIC_ACCESS,           "APIC_ACCESS" }, \
	{ EXIT_REASON_GDTR_IDTR,	     "GDTR_IDTR" }, \
	{ EXIT_REASON_LDTR_TR,		     "LDTR_TR" }, \
	{ EXIT_REASON_EPT_VIOLATION,         "EPT_VIOLATION" }, \
	{ EXIT_REASON_EPT_MISCONFIG,         "EPT_MISCONFIG" }, \
	{ EXIT_REASON_INVEPT,                "INVEPT" }, \
@@ -129,6 +133,7 @@
	{ EXIT_REASON_XRSTORS,               "XRSTORS" }

#define VMX_ABORT_SAVE_GUEST_MSR_FAIL        1
#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL       2
#define VMX_ABORT_LOAD_HOST_MSR_FAIL         4

#endif /* _UAPIVMX_H */
+1 −0
Original line number Diff line number Diff line
#ifndef __SUBCMD_PARSE_OPTIONS_H
#define __SUBCMD_PARSE_OPTIONS_H

#include <linux/kernel.h>
#include <stdbool.h>
#include <stdint.h>

+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ perf-y += builtin-help.o
perf-y += builtin-sched.o
perf-y += builtin-buildid-list.o
perf-y += builtin-buildid-cache.o
perf-y += builtin-kallsyms.o
perf-y += builtin-list.o
perf-y += builtin-record.o
perf-y += builtin-report.o
+24 −0
Original line number Diff line number Diff line
perf-kallsyms(1)
==============

NAME
----
perf-kallsyms - Searches running kernel for symbols

SYNOPSIS
--------
[verse]
'perf kallsyms <options> symbol_name[,symbol_name...]'

DESCRIPTION
-----------
This command searches the running kernel kallsyms file for the given symbol(s)
and prints information about it, including the DSO, the kallsyms begin/end
addresses and the addresses in the ELF kallsyms symbol table (for symbols in
modules).

OPTIONS
-------
-v::
--verbose=::
	Increase verbosity level, showing details about symbol table loading, etc.
+12 −2
Original line number Diff line number Diff line
@@ -421,9 +421,19 @@ Configure all used events to run in user space.
--timestamp-filename
Append timestamp to output file name.

--switch-output::
--switch-output[=mode]::
Generate multiple perf.data files, timestamp prefixed, switching to a new one
when receiving a SIGUSR2.
based on 'mode' value:
  "signal" - when receiving a SIGUSR2 (default value) or
  <size>   - when reaching the size threshold, size is expected to
             be a number with appended unit character - B/K/M/G
  <time>   - when reaching the time threshold, size is expected to
             be a number with appended unit character - s/m/h/d

             Note: the precision of  the size  threshold  hugely depends
             on your configuration  - the number and size of  your  ring
             buffers (-m). It is generally more precise for higher sizes
             (like >5M), for lower values expect different sizes.

A possible use case is to, given an external event, slice the perf.data file
that gets then processed, possibly via a perf script, to decide if that
Loading