Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Dylan Baker
Quoting Robert Bragg (2017-03-01 08:58:09) > On Wed, Mar 1, 2017 at 3:57 PM, Robert Bragg wrote: > > On Mon, Feb 27, 2017 at 8:01 PM, Dylan Baker wrote: > > >>> +def output_rpn_equation_code(set, counter, equation, counter_vars): > >>> +c("/* RPN

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Robert Bragg
On Wed, Mar 1, 2017 at 4:56 PM, Matt Turner wrote: > On Wed, Mar 1, 2017 at 8:49 AM, Robert Bragg wrote: >> On Fri, Feb 24, 2017 at 2:50 PM, Emil Velikov >> wrote: >>> Hi Robert, >>> >>> There's a few minor comments below.

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Dylan Baker
Quoting Robert Bragg (2017-03-01 07:57:57) [snip] > >> +import xml.etree.ElementTree as ET > > > > use cElementTree, and please import as "et" instead of "ET", ET suggests to > > me > > as a pythonista that this is a class not a module. (I know ElementTree is > > capitalized, but that's a legacy

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Robert Bragg
On Wed, Mar 1, 2017 at 3:57 PM, Robert Bragg wrote: > On Mon, Feb 27, 2017 at 8:01 PM, Dylan Baker wrote: >>> +def output_rpn_equation_code(set, counter, equation, counter_vars): >>> +c("/* RPN equation: " + equation + " */") >>> +tokens =

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Matt Turner
On Wed, Mar 1, 2017 at 8:49 AM, Robert Bragg wrote: > On Fri, Feb 24, 2017 at 2:50 PM, Emil Velikov > wrote: >> Hi Robert, >> >> There's a few minor comments below. Feel free to address here or as >> follow-up, if applicable. >> >> On 24 February

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Robert Bragg
On Fri, Feb 24, 2017 at 2:50 PM, Emil Velikov wrote: > Hi Robert, > > There's a few minor comments below. Feel free to address here or as > follow-up, if applicable. > > On 24 February 2017 at 13:58, Robert Bragg wrote: >> Avoiding lots of error

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-03-01 Thread Robert Bragg
On Mon, Feb 27, 2017 at 8:01 PM, Dylan Baker wrote: > I have some comments below, some of them are a bit of work, some of them > should > be pretty easy. > > Dylan > > Quoting Robert Bragg (2017-02-24 05:58:00) >> --- /dev/null >> +++ b/src/mesa/drivers/dri/i965/brw_oa.py >>

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-02-28 Thread Robert Bragg
On Mon, Feb 27, 2017 at 5:38 PM, Lionel Landwerlin < lionel.g.landwer...@intel.com> wrote: > Hey Rob, > > Your series look pretty good. Just a tiny nit on this patch below. > > As we've discussed in the office, I think it would be nice to have part of > this work factored out in src/intel. > But

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-02-27 Thread Dylan Baker
I have some comments below, some of them are a bit of work, some of them should be pretty easy. Dylan Quoting Robert Bragg (2017-02-24 05:58:00) > --- /dev/null > +++ b/src/mesa/drivers/dri/i965/brw_oa.py > @@ -0,0 +1,543 @@ > +#!/usr/bin/env python2 > +# > +# Copyright (c) 2015 Intel

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-02-27 Thread Lionel Landwerlin
Hey Rob, Your series look pretty good. Just a tiny nit on this patch below. As we've discussed in the office, I think it would be nice to have part of this work factored out in src/intel. But that can be done later on. Also, I found it a bit disturbing to have the equations in polish

Re: [Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-02-24 Thread Emil Velikov
Hi Robert, There's a few minor comments below. Feel free to address here or as follow-up, if applicable. On 24 February 2017 at 13:58, Robert Bragg wrote: > Avoiding lots of error prone boilerplate and easing our ability to add + > maintain support for multiple OA

[Mesa-dev] [PATCH 5/8] i965: Add script to gen code for OA counter queries

2017-02-24 Thread Robert Bragg
Avoiding lots of error prone boilerplate and easing our ability to add + maintain support for multiple OA performance counter queries for each generation: This adds a python script to generate code for building up performance_queries from the metric sets and counters described in brw_oa_hsw.xml