Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1665379 > unrolled thread

[PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate

Started byJin Yao <yao.jin@linux.intel.com>
First post2017-06-14 05:00 +0200
Last post2017-06-16 18:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate Jin Yao <yao.jin@linux.intel.com> - 2017-06-14 05:00 +0200
    Re: [PATCH v1 0/2] perf report: Implement visual marker for macro  fusion in annotate Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-16 18:20 +0200
    Re: [PATCH v1 0/2] perf report: Implement visual marker for macro  fusion in annotate Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-16 18:20 +0200

#1665379 — [PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate

FromJin Yao <yao.jin@linux.intel.com>
Date2017-06-14 05:00 +0200
Subject[PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate
Message-ID<tS6Hf-7QQ-7@gated-at.bofh.it>
Macro fusion merges two instructions to a single micro-op. Intel
core platform performs this hardware optimization under limited
circumstances. For example, CMP + JCC can be "fused" and executed
/retired together. While with sampling this can result in the
sample sometimes being on the JCC and sometimes on the CMP.
So for the fused instruction pair, they could be considered
together.

In general, the fused instruction pairs are:

cmp/test/add/sub/and/inc/dec + jcc.

This patch series marks the case clearly by joining the fused
instruction pair in the arrow of the jump.

For example:

       │   ┌──cmpl   $0x0,argp_program_version_hook
 81.93 │   │──je     20
       │   │  lock   cmpxchg %esi,0x38a9a4(%rip)
       │   │↓ jne    29
       │   │↓ jmp    43
 11.47 │20:└─→cmpxch %esi,0x38a999(%rip)

Jin Yao (2):
  perf report: Check for fused instruction pair
  perf report: Implement visual marker for macro fusion in annotate

 tools/perf/arch/x86/util/Build    |  1 +
 tools/perf/arch/x86/util/fused.c  | 20 ++++++++++++++++++++
 tools/perf/ui/browser.c           | 27 +++++++++++++++++++++++++++
 tools/perf/ui/browser.h           |  2 ++
 tools/perf/ui/browsers/annotate.c | 30 ++++++++++++++++++++++++++++++
 tools/perf/util/Build             |  1 +
 tools/perf/util/annotate.c        |  5 +++++
 tools/perf/util/annotate.h        |  1 +
 tools/perf/util/fused.c           | 11 +++++++++++
 tools/perf/util/fused.h           |  8 ++++++++
 10 files changed, 106 insertions(+)
 create mode 100644 tools/perf/arch/x86/util/fused.c
 create mode 100644 tools/perf/util/fused.c
 create mode 100644 tools/perf/util/fused.h

-- 
2.7.4

[toc] | [next] | [standalone]


#1667868 — Re: [PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-06-16 18:20 +0200
SubjectRe: [PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate
Message-ID<tT28x-2qw-9@gated-at.bofh.it>
In reply to#1665379
Em Fri, Jun 16, 2017 at 01:16:55PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Jun 14, 2017 at 10:53:39AM +0800, Jin Yao escreveu:
> > Macro fusion merges two instructions to a single micro-op. Intel
> > core platform performs this hardware optimization under limited
> > circumstances. For example, CMP + JCC can be "fused" and executed
> > /retired together. While with sampling this can result in the
> > sample sometimes being on the JCC and sometimes on the CMP.
> > So for the fused instruction pair, they could be considered
> > together.
> > 
> > In general, the fused instruction pairs are:
> > 
> > cmp/test/add/sub/and/inc/dec + jcc.
> > 
> > This patch series marks the case clearly by joining the fused
> > instruction pair in the arrow of the jump.
> > 
> > For example:
> > 
> >        │   ┌──cmpl   $0x0,argp_program_version_hook
> >  81.93 │   │──je     20
> >        │   │  lock   cmpxchg %esi,0x38a9a4(%rip)
> >        │   │↓ jne    29
> >        │   │↓ jmp    43
> >  11.47 │20:└─→cmpxch %esi,0x38a999(%rip)
> 
> Try to have these example outputs in the changesets, not just in the
> patch series header.

Ok, I went trigger happy, sorry, it is in the second patch, I had looked
just at the first :-\

- Arnaldo
 
> - Arnaldo
>  
> > Jin Yao (2):
> >   perf report: Check for fused instruction pair
> >   perf report: Implement visual marker for macro fusion in annotate
> > 
> >  tools/perf/arch/x86/util/Build    |  1 +
> >  tools/perf/arch/x86/util/fused.c  | 20 ++++++++++++++++++++
> >  tools/perf/ui/browser.c           | 27 +++++++++++++++++++++++++++
> >  tools/perf/ui/browser.h           |  2 ++
> >  tools/perf/ui/browsers/annotate.c | 30 ++++++++++++++++++++++++++++++
> >  tools/perf/util/Build             |  1 +
> >  tools/perf/util/annotate.c        |  5 +++++
> >  tools/perf/util/annotate.h        |  1 +
> >  tools/perf/util/fused.c           | 11 +++++++++++
> >  tools/perf/util/fused.h           |  8 ++++++++
> >  10 files changed, 106 insertions(+)
> >  create mode 100644 tools/perf/arch/x86/util/fused.c
> >  create mode 100644 tools/perf/util/fused.c
> >  create mode 100644 tools/perf/util/fused.h
> > 
> > -- 
> > 2.7.4

[toc] | [prev] | [next] | [standalone]


#1667869 — Re: [PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2017-06-16 18:20 +0200
SubjectRe: [PATCH v1 0/2] perf report: Implement visual marker for macro fusion in annotate
Message-ID<tT28x-2qw-11@gated-at.bofh.it>
In reply to#1665379
Em Wed, Jun 14, 2017 at 10:53:39AM +0800, Jin Yao escreveu:
> Macro fusion merges two instructions to a single micro-op. Intel
> core platform performs this hardware optimization under limited
> circumstances. For example, CMP + JCC can be "fused" and executed
> /retired together. While with sampling this can result in the
> sample sometimes being on the JCC and sometimes on the CMP.
> So for the fused instruction pair, they could be considered
> together.
> 
> In general, the fused instruction pairs are:
> 
> cmp/test/add/sub/and/inc/dec + jcc.
> 
> This patch series marks the case clearly by joining the fused
> instruction pair in the arrow of the jump.
> 
> For example:
> 
>        │   ┌──cmpl   $0x0,argp_program_version_hook
>  81.93 │   │──je     20
>        │   │  lock   cmpxchg %esi,0x38a9a4(%rip)
>        │   │↓ jne    29
>        │   │↓ jmp    43
>  11.47 │20:└─→cmpxch %esi,0x38a999(%rip)

Try to have these example outputs in the changesets, not just in the
patch series header.

- Arnaldo
 
> Jin Yao (2):
>   perf report: Check for fused instruction pair
>   perf report: Implement visual marker for macro fusion in annotate
> 
>  tools/perf/arch/x86/util/Build    |  1 +
>  tools/perf/arch/x86/util/fused.c  | 20 ++++++++++++++++++++
>  tools/perf/ui/browser.c           | 27 +++++++++++++++++++++++++++
>  tools/perf/ui/browser.h           |  2 ++
>  tools/perf/ui/browsers/annotate.c | 30 ++++++++++++++++++++++++++++++
>  tools/perf/util/Build             |  1 +
>  tools/perf/util/annotate.c        |  5 +++++
>  tools/perf/util/annotate.h        |  1 +
>  tools/perf/util/fused.c           | 11 +++++++++++
>  tools/perf/util/fused.h           |  8 ++++++++
>  10 files changed, 106 insertions(+)
>  create mode 100644 tools/perf/arch/x86/util/fused.c
>  create mode 100644 tools/perf/util/fused.c
>  create mode 100644 tools/perf/util/fused.h
> 
> -- 
> 2.7.4

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web