perf/core improvements and fixes:

User visible:
 
 - Enhance the error reporting of tracepoint event parsing, e.g.:
 
     $ oldperf record -e sched:sched_switc usleep 1
     event syntax error: 'sched:sched_switc'
                         \___ unknown tracepoint
     Run 'perf list' for a list of valid events
 
   Now we get the much nicer:
 
     $ perf record -e sched:sched_switc ls
     event syntax error: 'sched:sched_switc'
                          \___ can't access trace events
 
     Error: No permissions to read /sys/kernel/debug/tracing/events/sched/sched_switc
     Hint:  Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'
 
   And after we have those mount point permissions fixed:
 
     $ perf record -e sched:sched_switc ls
     event syntax error: 'sched:sched_switc'
                          \___ unknown tracepoint
 
     Error: File /sys/kernel/debug/tracing/events/sched/sched_switc not found.
     Hint:  Perhaps this kernel misses some CONFIG_ setting to enable this feature?.
 
   Now its just a matter of using what git uses to suggest alternatives when we
   make a typo, i.e. that it is just an 'h' missing :-)
 
   I.e. basically now the event parsing routing uses the strerror_open()
   routines introduced by and used in 'perf trace' work. (Jiri Olsa)
 
 Infrastructure:
 
 - Export init/exit_probe_symbol_maps() from 'perf probe' for use in eBPF
   (Namhyung Kim)
 
 - Free perf_probe_event in cleanup_perf_probe_events() (Namhyung Kim)
 
 - regs_query_register_offset() infrastructure + implementation for x86.
   First user will be the perf/eBPF code (Wang Nan)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV+DhgAAoJENZQFvNTUqpAV5cP/Rxs1T3AULEWpAk65kcooRSz
 Z+LEKSKryR52scTIVgF9ZwxwjtiSWjfSDzBlnmeYWO1/QZ4NTUSmsVu3DOEZ3M+p
 EQ8pUPE5ioK/cLnqDd5IMjhPrtJ/jQn2PdXZ9v7/o4qh10LNA/s7ZQUbpDv+kBZl
 3QJHkzy31EvtPrM+OsjUlCwsS68B/i6aFe8Wt7AbsUPMk0A34qsb7Tb5viXcA2u9
 A7krQ1AE9C4OTvioIV+Zh9br+sVUlQ+1PGwTLJeWjcphOseVfSllap8b8nSCOhR3
 TDuBJ/9RdOi115s8Pm+TPHcgbxcHbzQVTSgukY1bStCJ3u9WA9CKuil7Jzt7c3RD
 zyG/K3zKCCiR454Z++QP9BWo7LBVuK/9thSzphmCsF/Ro9S9wx1Zv905ogzQAE3F
 p7nyBaSdA65vx9srhjPBE91i1jyhSR2hr5PxgeTQRbjhNcW3J6GdgCmysA4RWq/1
 QxKrIwAwYTh2C1wQkidHwa0HewT5dRNJ/4/uIXj4FEGSgv1ZHmo3DLlFELeJupmX
 ejUXBajfAelyDJxWBrfzxsxQE1BnwyW4ew/sZkNMmnwhH09Fb8c/ZdV3cRrt9uYU
 X0JEOC/qFWpFrJC7EUEuyK/AXdGCY8nzX1A123JG0JtbeWp2oAImaNkH6fmlWRsM
 y8IWIn7mNx1nNCW9iNJH
 =Pfiv
 -----END PGP SIGNATURE-----

Merge tag 'perf-core-for-mingo' 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:

User visible changes:

- Enhance the error reporting of tracepoint event parsing, e.g.:

    $ oldperf record -e sched:sched_switc usleep 1
    event syntax error: 'sched:sched_switc'
                         \___ unknown tracepoint
    Run 'perf list' for a list of valid events

  Now we get the much nicer:

    $ perf record -e sched:sched_switc ls
    event syntax error: 'sched:sched_switc'
                         \___ can't access trace events

    Error: No permissions to read /sys/kernel/debug/tracing/events/sched/sched_switc
    Hint:  Try 'sudo mount -o remount,mode=755 /sys/kernel/debug'

  And after we have those mount point permissions fixed:

    $ perf record -e sched:sched_switc ls
    event syntax error: 'sched:sched_switc'
                         \___ unknown tracepoint

    Error: File /sys/kernel/debug/tracing/events/sched/sched_switc not found.
    Hint:  Perhaps this kernel misses some CONFIG_ setting to enable this feature?.

  Now its just a matter of using what git uses to suggest alternatives when we
  make a typo, i.e. that it is just an 'h' missing :-)

  I.e. basically now the event parsing routing uses the strerror_open()
  routines introduced by and used in 'perf trace' work. (Jiri Olsa)

Infrastructure changes:

- Export init/exit_probe_symbol_maps() from 'perf probe' for use in eBPF.
  (Namhyung Kim)

- Free perf_probe_event in cleanup_perf_probe_events(). (Namhyung Kim)

- regs_query_register_offset() infrastructure + implementation for x86.
  First user will be the perf/eBPF code. (Wang Nan)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Ingo Molnar 2015-09-16 09:12:07 +02:00
commit a4d71093e7
21 changed files with 291 additions and 95 deletions