mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: acme@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: Add Sparc annotate support.
Date: Wed, 17 Oct 2018 09:42:32 -0700 (PDT)	[thread overview]
Message-ID: <20181017.094232.2240871178683881504.davem@davemloft.net> (raw)
In-Reply-To: <20181017123902.GA4041@redhat.com>

From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Wed, 17 Oct 2018 09:39:02 -0300

> Em Tue, Oct 16, 2018 at 08:55:55PM -0700, David Miller escreveu:
> 
> Great!
> 
> Could you try something like:
> 
> # perf record some_workload
> # perf annotate --stdio2 hot_function
> 
> So that we can see this thing in action, i.e. sparc assembly annotated?
> :-)
> 
> With 'perf annotate --tui hot_function' or 'perf top' 'A' you can
> navigate, but for showing it in action in a git changelog comment
> example --stdio is more convenient :-)

Sure :-)

This is run on __gettimeofday when running perf record on your "gtod"
test.  (Still working on getting glibc to use the VDSO properly on
sparc :-( )

Samples: 7K of event 'cycles:ppp', 4000 Hz, Event count (approx.): 3086733887                                   
__gettimeofday  /lib32/libc-2.27.so [Percent: local period]                                                     
Percent│
       │
       │
       │    Disassembly of section .text:
       │
       │    000a6fa0 <__gettimeofday@@GLIBC_2.0>:
  0.47 │      save   %sp, -96, %sp
  0.73 │      sethi  %hi(0xe9000), %l7
       │    → call   __frame_state_for@@GLIBC_2.0+0x480
  0.30 │      add    %l7, 0x58, %l7     ! e9058 <nftw64@@GLIBC_2.3.3+0x818>
  1.33 │      mov    %i0, %o0
       │      mov    %i1, %o1
  0.43 │      mov    0x74, %g1
       │      ta     0x10
 88.92 │    ↓ bcc    30
  2.95 │      clr    %g1
       │      neg    %o0
       │      mov    1, %g1
  0.31 │30:   cmp    %g1, 0
       │      bne,pn %icc, a6fe4 <__gettimeofday@@GLIBC_2.0+0x44>
       │      mov    %o0, %i0
  1.96 │    ← return %i7 + 8
  2.62 │      nop
       │      sethi  %hi(0), %g1
       │      neg    %o0, %g2
       │      add    %g1, 0x160, %g1
       │      ld     [ %l7 + %g1 ], %g1
       │      st     %g2, [ %g7 + %g1 ]
       │    ← return %i7 + 8
       │      mov    -1, %o0

  reply	other threads:[~2018-10-17 16:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  3:55 David Miller
2018-10-17 12:39 ` Arnaldo Carvalho de Melo
2018-10-17 16:42   ` David Miller [this message]
2018-10-26  7:28 ` [tip:perf/urgent] perf annotate: Add Sparc support tip-bot for David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181017.094232.2240871178683881504.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®