From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757862AbdJKTMd (ORCPT ); Wed, 11 Oct 2017 15:12:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33262 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753094AbdJKTMc (ORCPT ); Wed, 11 Oct 2017 15:12:32 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 187981F56A Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jolsa@redhat.com Date: Wed, 11 Oct 2017 21:12:28 +0200 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , lkml , Ingo Molnar , Namhyung Kim , David Ahern , Peter Zijlstra , Andi Kleen Subject: Re: [PATCH 02/35] perf annotate: Add annotation_line struct Message-ID: <20171011191228.GB18184@krava> References: <20171011150158.11895-1-jolsa@kernel.org> <20171011150158.11895-3-jolsa@kernel.org> <20171011152942.GD3503@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171011152942.GD3503@kernel.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 11 Oct 2017 19:12:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 11, 2017 at 12:29:42PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Oct 11, 2017 at 05:01:25PM +0200, Jiri Olsa escreveu: > > In order to make the annotation support generic, I'm adding > > 'struct annotation_line', which will hold all generic data > > common to any annotation source (it's coming on following > > patches). Having this, we can add different annotation > > line support than objdump disasm. > > Such as? What other "annotation line support" other than "objdump > disasm"? such a python script.. sent in the email earlier jirka --- Percent | Source code & Disassembly of [python_stack] for cycles:ppp (50 samples) [_parse /usr/lib64/python3.6/sre_parse.py] --------------------------------------------------------------------------------------- : # parse a simple pattern 0.00 : 5584195c1600: subpattern = SubPattern(state) : : # precompute constants into local variables 2.00 : 5584195c1608: subpatternappend = subpattern.append 0.00 : 5584195c160e: sourceget = source.get 2.00 : 5584195c1614: sourcematch = source.match 0.00 : 5584195c161a: _len = len 0.00 : 5584195c161e: _ord = ord : 0.00 : 5584195c1622: while True: : 6.00 : 5584195c1626: this = source.next 4.00 : 5584195c162c: if this is None: 0.00 : 5584195c1634: break # end of pattern 2.00 : 5584195c1636: if this in "|)": 0.00 : 5584195c163e: break # end of subpattern 10.00 : 5584195c1640: sourceget() : 4.00 : 5584195c1646: if verbose: : # skip whitespace and comments 4.00 : 5584195c164a: if this in WHITESPACE: ...