Re: [PATCH V7 00/15] perf/x86: Add perf text poke events

From: Arnaldo Carvalho de Melo
Date: Tue May 19 2020 - 21:40:08 EST


Em Sun, May 17, 2020 at 04:16:50PM +0300, Adrian Hunter escreveu:
> On 12/05/20 3:19 pm, Adrian Hunter wrote:
> > Hi
> >
> > Here are patches to add a text poke event to record changes to kernel text
> > (i.e. self-modifying code) in order to support tracers like Intel PT
> > decoding through jump labels, kprobes and ftrace trampolines.
> >
> > The first 8 patches make the kernel changes and the subsequent patches are
> > tools changes.
> >
> > The next 4 patches add support for updating perf tools' data cache
> > with the changed bytes.
> >
> > The next patch is an Intel PT specific tools change.
> >
> > The final 2 patches add perf script --show-text-poke-events option
> >
> > Patches also here:
> >
> > git://git.infradead.org/users/ahunter/linux-perf.git text_poke
> >
> > Changes in V7
> >
> > perf: Add perf text poke event
> > perf/x86: Add support for perf text poke event for text_poke_bp_batch() callers
> > kprobes: Add symbols for kprobe insn pages
> > kprobes: Add perf ksymbol events for kprobe insn pages
> > perf/x86: Add perf text poke events for kprobes
> > ftrace: Add symbols for ftrace trampolines
> > ftrace: Add perf ksymbol events for ftrace trampolines
> > ftrace: Add perf text poke events for ftrace trampolines
> >
> > Added Peter's Ack
> > Improved commit message for text_poke events for ftrace trampolines
> >
> > perf kcore_copy: Fix module map when there are no modules loaded
> > perf evlist: Disable 'immediate' events last
> > perf tools: Add support for PERF_RECORD_TEXT_POKE
> > perf tools: Add support for PERF_RECORD_KSYMBOL_TYPE_OOL
> > perf intel-pt: Add support for text poke events
> > perf script: Add option --show-text-poke-events
> > perf script: Show text poke address symbol
> >
> > Re-based on Arnaldo's perf/core branch
> >
>
> Arnaldo, any comments on the tools patches?

I couldn't get to this yet, sorry, but from a quick look I saw just the
ordering of some args to perf_event__ functions, and I can quickly fix
it.

PeterZ, from what we discussed for the next merge Window, perhaps we
should route the kernel bits via the tip tree while I will push the
tooling bits on my 5.8 merge request to Linus, Ok?

- Arnaldo