linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>, lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Andi Kleen <andi@firstfloor.org>
Subject: Re: [PATCH 00/35] perf annotate: Use generic annotation line
Date: Wed, 11 Oct 2017 16:18:59 -0300	[thread overview]
Message-ID: <20171011191859.GH3503@kernel.org> (raw)
In-Reply-To: <20171011191057.GA18184@krava>

Em Wed, Oct 11, 2017 at 09:10:57PM +0200, Jiri Olsa escreveu:
> On Wed, Oct 11, 2017 at 12:27:09PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Oct 11, 2017 at 05:01:23PM +0200, Jiri Olsa escreveu:
> > > hi,
> > > I'm working on script profiling support and came up
> > 
> > Can you describe what you mean by "script profiling" and "script
> > annotation"?
> 
> I have some prototype code that allows to get the
> internal script stack to the sample and display

What is an "internal script stack"? Ah, looking further below you mean
"python scripts", I see!

Please try to state what you want to achieve in a detailed way as you go
writing the patches, that eases reviewing, not requiring us to go
looking at _all_ the patches in a series to then figure out and restart
reviewing patch by patch...

Anyway, great stuff, with that in mind I think I'll restart reviewing
:-)

The first one was obvious, thanks por putting it at the front of the
series, already merged.

Thanks for working on this!

- Arnaldo

> it later on in report:
> 
> Samples: 20K of event 'cycles:ppp', Event count (approx.): 10598322780
> Overhead  Command  Script File                                                                Symbol                                                                                                                   ▒
>   42.29%  python3  /usr/lib64/python3.6/site-packages/hawkey/__init__.py                      [.] union+0xe                                                                                                            ◆
>   17.17%  python3  /usr/lib64/python3.6/site-packages/hawkey/__init__.py                      [.] run+0x0                                                                                                              ▒
>   16.80%  python3  /usr/lib/python3.6/site-packages/dnf/cli/output.py                         [.] _skipped_packages+0x1e                                                                                               ▒
>   13.64%  python3  N/A                                                                        [.] 0x00007f9a96e655a2                                                                                                   ▒
>    1.48%  python3  N/A                                                                        [.] 0x00005584196c4844                                                                                                   ▒
>    0.71%  python3  <frozen importlib._bootstrap>                                              [.] _call_with_frames_removed+0x0                                                                                        ▒
>    0.56%  python3  <frozen importlib._bootstrap_external>                                     [.] _compile_bytecode+0x0                                                                                                ▒
>    0.55%  python3  /usr/lib64/python3.6/site-packages/hawkey/__init__.py                      [.] run+0x0                                                                                                              ▒
>    0.23%  python3  /usr/lib64/python3.6/sre_parse.py                                          [.] _parse+0x288                                                                                                         ▒
>    0.20%  python3  /usr/lib64/python3.6/collections/__init__.py                               [.] namedtuple+0x174                                                                                                     ▒
>    0.16%  python3  N/A                                                                        [.] 0x00007f9a89e9bc12                                                                                                   ▒
>    0.16%  python3  <frozen importlib._bootstrap_external>                                     [.] _path_stat+0x0                                                                                                       ▒
> 
> 
> and annotate:
> 
> Percent│         # parse a simple pattern
>        │       471:     subpattern = SubPattern(state)                                                                                                                                                                 ◆
>        │
>        │         # precompute constants into local variables
>   2.00 │       474:     subpatternappend = subpattern.append                                                                                                                                                           ▒
>        │       475:     sourceget = source.get                                                                                                                                                                         ▒
>   2.00 │       476:     sourcematch = source.match                                                                                                                                                                     ▒
>        │       477:     _len = len                                                                                                                                                                                     ▒
>        │       478:     _ord = ord                                                                                                                                                                                     ▒
>        │
>        │       480:     while True:                                                                                                                                                                                    ▒
>        │
>   6.00 │       482:         this = source.next                                                                                                                                                                         ▒
>   4.00 │       483:         if this is None:                                                                                                                                                                           ▒
>        │       484:             break # end of pattern                                                                                                                                                                 ▒
>   2.00 │       485:         if this in "|)":                                                                                                                                                                           ▒
>        │       486:             break # end of subpattern                                                                                                                                                              ▒
>  10.00 │       487:         sourceget()                                                                                                                                                                                ▒
>        │
>   4.00 │       489:         if verbose:                                                                                                                                                                                ▒
>        │                 # skip whitespace and comments
>   4.00 │       491:             if this in WHITESPACE:                                                                                                                                                                 ▒
>        │       492:                 continue                                                                                                                                                                           ▒
>        │       493:             if this == "#":                                                                                                                                                                        ▒
>        │       494:                 while True:                                                                                                                                                                        ▒
>   2.00 │       495:                     this = sourceget()                                                                                                                                                             ▒
>   2.00 │ 64:   496:                     if this is None or this == "\n":                                                                                                                                               ▒
>        │       497:                         break                                                                                                                                                                      ▒
>        │       498:                 continue                                                                                                                                                                           ▒
>        │
>   6.00 │       500:         if this[0] == "\\":                                                                                                                                                                        ▒
>   2.00 │       501:             code = _escape(source, this, state)                                                                                                                                                    ▒
> 
> 
> it so far for python.. I plan to post it next week
> 
> jirka

  reply	other threads:[~2017-10-11 19:19 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 15:01 [PATCH 00/35] perf annotate: Use generic annotation line Jiri Olsa
2017-10-11 15:01 ` [PATCH 01/35] perf annotate: Remove arch::cpuid_parse callback Jiri Olsa
2017-10-24 10:14   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 02/35] perf annotate: Add annotation_line struct Jiri Olsa
2017-10-11 15:29   ` Arnaldo Carvalho de Melo
2017-10-11 19:12     ` Jiri Olsa
2017-11-18  8:10   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 03/35] perf annotate: Move line/offset into " Jiri Olsa
2017-11-18  8:11   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 04/35] perf annotate: Move ipc/cycles " Jiri Olsa
2017-11-18  8:11   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 05/35] perf annotate: Add symbol__annotate function Jiri Olsa
2017-11-18  8:12   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 06/35] perf annotate: Add struct annotate_args Jiri Olsa
2017-11-18  8:12   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 07/35] perf annotate: Add arch into " Jiri Olsa
2017-11-18  8:13   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 08/35] perf annotate: Add map " Jiri Olsa
2017-11-18  8:13   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 09/35] perf annotate: Add offset/line/line_nr " Jiri Olsa
2017-11-18  8:13   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 10/35] perf annotate: Add evsel into struct annotation_line_args Jiri Olsa
2017-11-18  8:14   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 11/35] perf annotate: Add annotation_line__next function Jiri Olsa
2017-11-18  8:14   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 12/35] perf annotate: Add annotation_line__add function Jiri Olsa
2017-11-18  8:15   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 13/35] perf annotate: Move rb_node into struct annotation_line Jiri Olsa
2017-11-18  8:15   ` [tip:perf/core] perf annotate: Move rb_node to " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 14/35] perf annotate: Add annotation_line__(new|free) functions Jiri Olsa
2017-11-18  8:15   ` [tip:perf/core] perf annotate: Add annotation_line__(new|delete) functions tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 15/35] perf annotate: Add annotated_source__purge function Jiri Olsa
2017-11-18  8:16   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 16/35] perf annotate: Add samples into struct annotation_line Jiri Olsa
2017-11-13 15:46   ` Ravi Bangoria
2017-11-13 20:14     ` Jiri Olsa
2017-11-14  9:31       ` Jiri Olsa
2017-11-14 10:15         ` Ravi Bangoria
2017-11-14 10:29           ` Jiri Olsa
2017-11-15 14:04             ` Jiri Olsa
2017-11-16  4:27               ` Ravi Bangoria
2017-11-18  8:16   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 17/35] perf annotate: Add symbol__calc_percent function Jiri Olsa
2017-11-18  8:17   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 18/35] perf annotate: Add symbol__calc_lines function Jiri Olsa
2017-11-18  8:17   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 19/35] perf annotate: Remove disasm__calc_percent from disasm_line__print Jiri Olsa
2017-11-18  8:17   ` [tip:perf/core] perf annotate: Remove disasm__calc_percent() from disasm_line__print() tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 20/35] perf annotate: Remove disasm__calc_percent from annotate_browser__calc_percent Jiri Olsa
2017-11-18  8:18   ` [tip:perf/core] perf annotate: Remove disasm__calc_percent() from annotate_browser__calc_percent() tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 21/35] perf annotate: Remove disasm__calc_percent function Jiri Olsa
2017-11-18  8:18   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 22/35] perf annotate: Remove struct source_line Jiri Olsa
2017-11-18  8:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 23/35] perf annotate: Add annotation_line__print function Jiri Olsa
2017-11-18  8:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 24/35] perf annotate: Factor annotation_line__print from disasm_line__print Jiri Olsa
2017-11-18  8:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 25/35] perf annotate browser: Use samples data from struct annotation_line Jiri Olsa
2017-11-18  8:20   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 26/35] perf annotate browser: Do not pass nr_events in disasm_rb_tree__insert Jiri Olsa
2017-11-18  8:20   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 27/35] perf annotate browser: Rename struct browser_disasm_line to browser_line Jiri Olsa
2017-11-06 10:55   ` [PATCHv2 " Jiri Olsa
2017-11-18  8:21     ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 28/35] perf annotate browser: Rename disasm_line__browser " Jiri Olsa
2017-11-06 10:55   ` [PATCHv2 " Jiri Olsa
2017-11-18  8:21     ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 29/35] perf annotate browser: Change selection to struct annotation_line Jiri Olsa
2017-11-06 10:56   ` [PATCHv2 " Jiri Olsa
2017-11-18  8:21     ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 30/35] perf annotate browser: Change offsets " Jiri Olsa
2017-11-18  8:22   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 31/35] perf annotate browser: Use struct annotation_line in browser_line Jiri Olsa
2017-11-18  8:22   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 32/35] perf annotate browser: Use struct annotation_line in find functions Jiri Olsa
2017-11-18  8:23   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 33/35] perf annotate browser: Use struct annotation_line in browser top Jiri Olsa
2017-11-18  8:23   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 34/35] perf annotate browser: Add disasm_line__write function Jiri Olsa
2017-11-18  8:23   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:01 ` [PATCH 35/35] perf annotate: Align source and offset lines Jiri Olsa
2017-11-07 14:10   ` Arnaldo Carvalho de Melo
2017-11-07 14:50     ` Jiri Olsa
2017-11-18  8:24   ` [tip:perf/core] " tip-bot for Jiri Olsa
2017-10-11 15:27 ` [PATCH 00/35] perf annotate: Use generic annotation line Arnaldo Carvalho de Melo
2017-10-11 19:10   ` Jiri Olsa
2017-10-11 19:18     ` Arnaldo Carvalho de Melo [this message]
2017-10-11 19:30       ` Jiri Olsa
2017-10-11 19:43         ` Arnaldo Carvalho de Melo
2017-11-02 12:16 ` Jiri Olsa
2017-11-03 16:59   ` Arnaldo Carvalho de Melo
2017-11-04 10:29     ` Jiri Olsa
2017-11-06 10:56       ` Jiri Olsa

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=20171011191859.GH3503@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=andi@firstfloor.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@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;
as well as URLs for NNTP newsgroup(s).