[Mesa-dev] [PATCH 0/7] Support JSON output in aubinator

Jordan Justen jordan.l.justen at intel.com
Tue Jan 10 01:22:11 UTC 2017


git://people.freedesktop.org/~jljusten/mesa aubinator-json

I was recently trying to compare the output from aubinator on two
different aub files. After manually examining the output for a while,
and, unfortunately, making little progress I thought it might be
useful to be able to programically analyze the aubinator output. JSON
seemed to be the natural choice to enable this.

I've still not solved the original issue, but I think this is still a
useful feature.

Since getting the JSON output working, I found the great 'jq' tool for
filtering JSON. Here's two quick example uses:

Print all the unique aub packet types used in the trace:

$ aubinator --gen=bdw mesa.aub --json|jq '[.[] | .Type] |unique'

Print all the unique 3DPRIMITIVE commands:

$ aubinator --gen=bdw mesa.aub --json|jq '[.[] | select(.Type | contains("PRIM"))] | unique'

Aside from this, there is also the potential to build a simple tool to
perform other more targeted analysis of aub output.

Jordan Justen (7):
  i965: Add brw_disassemble_inst_str to disassemble into a string
  i965: Add function to disassemble a program into a string buffer
  intel/tools: Use brw_disassemble_prog in gen_disasm_disassemble
  intel/aubinator: Print disassembly by generating a string
  intel/tools: Support decoding SFIXED items to a float
  intel/tools: Support json format in decoder
  intel/aubinator: Support json output

 src/intel/tools/aubinator.c             | 578 ++++++++++++++++++++++----
 src/intel/tools/decoder.c               |  17 +-
 src/intel/tools/decoder.h               |   4 +-
 src/intel/tools/disasm.c                |  54 +--
 src/intel/tools/gen_disasm.h            |   2 +-
 src/mesa/drivers/dri/i965/brw_context.h |   4 +
 src/mesa/drivers/dri/i965/brw_disasm.c  | 711 +++++++++++++++++++-------------
 7 files changed, 932 insertions(+), 438 deletions(-)

-- 
2.11.0



More information about the mesa-dev mailing list