From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757894AbdJKTTE (ORCPT ); Wed, 11 Oct 2017 15:19:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:36328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbdJKTTD (ORCPT ); Wed, 11 Oct 2017 15:19:03 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88AF5218CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Date: Wed, 11 Oct 2017 16:18:59 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Jiri Olsa , lkml , Ingo Molnar , Namhyung Kim , David Ahern , Peter Zijlstra , Andi Kleen Subject: Re: [PATCH 00/35] perf annotate: Use generic annotation line Message-ID: <20171011191859.GH3503@kernel.org> References: <20171011150158.11895-1-jolsa@kernel.org> <20171011152709.GC3503@kernel.org> <20171011191057.GA18184@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171011191057.GA18184@krava> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 [.] _call_with_frames_removed+0x0 ▒ > 0.56% python3 [.] _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 [.] _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