Re: [GIT PULL 0/8] perf/core improvements and fixes
From: Ingo Molnar
Date: Wed Sep 16 2015 - 03:25:52 EST
* Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> Hi Ingo,
>
> Please consider pulling,
>
> - Arnaldo
>
> The following changes since commit 9059b284caecb628fac826c2c5cc8ee85708eec1:
>
> Merge tag 'perf-core-for-mingo-2' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2015-09-15 08:50:59 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
So your perf/urgent bits now conflict with the latest perf/core, in
tools/perf/ui/browsers/hists.c. I have merged perf/urgent into perf/core - please
double check my resolution (d71b0ad8d309).
>
> for you to fetch changes up to bbbe6bf6037d77816c4a19aaf35f4cecf662b49a:
>
> perf tools: Introduce regs_query_register_offset() for x86 (2015-09-15 09:48:33 -0300)
>
> ----------------------------------------------------------------
> 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 :-)
Nice changes!
Btw., wouldn't it be even better to allow partial matches? Not allowing
'sched:sched_switc' is unnecessarily pedantic IMHO.
For example 'perf list' allows partial matches as well. As long as the resulting
event is unique, we should allow partial matches. If it's not unique, we should
print the first 3 matching entries or so.
There's a real UI advantage as well: I could abbreviate the command line with:
-e sched_sw
instead of always being forced to type out the full tracepoint name.
(Programmatic tracepoint usage and portable scripts should naturally always spell
out the full event, to make sure new tracepoints don't cause overlaps - but ad-hoc
usage can do abbreviations just fine.)
> 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@xxxxxxxxxx>
>
> ----------------------------------------------------------------
> Jiri Olsa (4):
> tools: Add err.h with ERR_PTR PTR_ERR interface
> perf tools: Propagate error info for the tracepoint parsing
> perf evsel: Propagate error info from tp_format
> perf tools: Enhance parsing events tracepoint error output
>
> Namhyung Kim (2):
> perf probe: Free perf_probe_event in cleanup_perf_probe_events()
> perf probe: Export init/exit_probe_symbol_maps()
>
> Wang Nan (2):
> perf tools: regs_query_register_offset() infrastructure
> perf tools: Introduce regs_query_register_offset() for x86
>
> tools/include/linux/err.h | 49 +++++++++++
> tools/perf/arch/x86/Makefile | 1 +
> tools/perf/arch/x86/util/dwarf-regs.c | 122 ++++++++++++++++++++--------
> tools/perf/builtin-probe.c | 5 ++
> tools/perf/builtin-trace.c | 19 +++--
> tools/perf/config/Makefile | 4 +
> tools/perf/tests/evsel-tp-sched.c | 10 ++-
> tools/perf/tests/mmap-basic.c | 3 +-
> tools/perf/tests/openat-syscall-all-cpus.c | 3 +-
> tools/perf/tests/openat-syscall-tp-fields.c | 3 +-
> tools/perf/tests/openat-syscall.c | 3 +-
> tools/perf/util/evlist.c | 3 +-
> tools/perf/util/evsel.c | 16 +++-
> tools/perf/util/evsel.h | 3 +
> tools/perf/util/include/dwarf-regs.h | 8 ++
> tools/perf/util/parse-events.c | 66 +++++++++++----
> tools/perf/util/parse-events.h | 3 +-
> tools/perf/util/parse-events.y | 16 ++--
> tools/perf/util/probe-event.c | 32 ++++----
> tools/perf/util/probe-event.h | 2 +
> tools/perf/util/trace-event.c | 15 +++-
> 21 files changed, 291 insertions(+), 95 deletions(-)
> create mode 100644 tools/include/linux/err.h
Pulled, thanks a lot Arnaldo!
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/