Re: [PATCH RFC 1/6] perf/x86: Add perf text poke event

From: Peter Zijlstra
Date: Fri Nov 01 2019 - 06:06:20 EST


On Thu, Oct 31, 2019 at 12:29:15PM +0000, Mike Leach wrote:
> On Thu, 31 Oct 2019 at 07:31, Leo Yan <leo.yan@xxxxxxxxxx> wrote:

> > > Since all instructions (with the possible exception of RET) are
> > > unconditional branch instructions: NOP, JMP, CALL. It makes no read
> > > difference to the argument below.
> > >
> > > ( I'm thinking RET might be special in that it reads the return address
> > > from the stack and therefore must emit the whole IP into the stream, as
> > > we cannot know the stack state )
> >
> > To be honest, I don't have knowledge what's the exactly format for 'ret'
> > in CoreSight trace; so would like to leave this to Mike.
> >
>
> For ETM trace we do not have to output the entire address into he stream if:
> - address compression allows us to emit only the changed ls bit from the
> last address.
> - the address is identical to one of the last three addresses emitted ( we
> just emit a âsame address encodingâ
> - we are using return stack compression and the address is top of the
> return stack (we emit nothing and the decoder gets the address from its own
> mode, of the return stack)

Cute. I don't actually know what PT does, but I figured there had to at
least be the option to provide more information.