ACID(1)                                                   ACID(1)



NAME
       acid - TT6E instruction trace analyzer; version 2.1

SYNOPSIS
       acid [ -i filename ]
            [ -o filename ]
            [ -x filename ]
            [ -n number ]
            [ -k number ]
            [ -e number ]
            [ -r number ]
            [ -y address ]
            [ -z address ]
            [ -a ] [ -A ] [ -b ] [ -d ] [ -f ] [ -s ] [ -t ]

DESCRIPTION
       This manual page describes acid, which is part of the Com-
       puter Hardware Understanding Toolkit (CHUD). Acid analyzes
       TT6E  instruction  traces  generated  by  amber  or  other
       instruction tracing programs. Characteristics of the trace
       such  as  instruction  mix, address accesses, and load-use
       distance are output. Acid can also detect potentially  bad
       instructions  sequences,  where  bad  is defined as having
       misaligned operands, data dependency  stalls,  or  spilled
       loads.  Acid  can  also  be used to disassemble a trace or
       prune a trace into a subset of the original trace.

OPTIONS
       -i filename
                 The name of the input file to analyze. If
                 no  input  file  is  specified,  stdin is
                 used.

       -o filename
                 The name of the file to send  output  to.
                 If  no file is specified, results will go
                 to stdout.

       -x filename
                 The name of the file to  write  a  subset
                 trace to. This option can be used with -n
                 and -k to get an exact subset of instruc-
                 tions. It can also be used with -y and -z
                 to remove functions. When used  with  -t,
                 this  is  the name of the TT6 output file
                 which can be fed to simg4.

       -n number Analyze 'number' of instructions or less.

       -k number Skip 'number' instructions before analyz-
                 ing.

       -e number Show  addresses  accessed  at  '2^number'
                 bytes  of  address granularity. For exam-
                 ple,  '-e  10'  will  show  addresses  in
                 blocks of 1024 bytes. The default setting
                 is '-e 12', so addresses will be  grouped
                 by 4KB segments (4KB = one PowerPC page).
                 Using smaller granularities may  increase
                 processing time.

       -r number Show  address  accesses every 'number' of
                 instructions.  This  option  creates  two
                 files  (instruction  and  data  accesses)
                 that can be fed  into  gnuplot.  You  can
                 detect  access  patterns  over  time with
                 this option.

       -y address
                 Replace the instruction at 'address' with
                 the   instruction  at  the  'z'  address.
                 Address should be a  hexadecimal  number.
                 The  'y'  and  'z' options can be used to
                 stub a function  call  by  replacing  the
                 first  instruction  in  the function with
                 the last instruction (usually a 'blr').

       -z address
                 Replace  the  instruction  at   the   'y'
                 address    with    the   instruction   at
                 'address'. Address should be a  hexadeci-
                 mal  number.  The 'y' and 'z' options can
                 be  used  to  stub  a  function  call  by
                 replacing  the  first  instruction in the
                 function with the last instruction  (usu-
                 ally a 'blr').

       -a        Show  instructions  in  assembly language
                 form,  display   potential   stalls   for
                 PPC7410  and  PPC7450  class  processors,
                 show  misaligned  operands,   serializing
                 instructions, and load spills. The format
                 for the  output  columns  is  instruction
                 number,   program   counter  (instruction
                 address), stalls on PPC7410 and  PPC7450,
                 and  disassembly.  Execution time will be
                 substantially  longer  when  using   this
                 option  and  the output file will be much
                 larger.

       -A        Show instructions as in -a, but add  sev-
                 eral other facts about the code. The for-
                 mat for the output is instruction number,
                 program  counter  (instruction  address),
                 branch target address (if branch instruc-
                 tion),  data  address  (if  load or store
                 instruction),  extra  information   (byte
                 count  for  load/store string or RB for a
                 dst), target to use distance, update reg-
                 ister   to  use  distance  (for  updating
                 load/store  instructions),  use  distance
                 for   the   condition   register  if  the
                 instruction sets the CR, use distance for
                 the link register if the instruction sets
                 the LR, stalls on  PPC7410  and  PPC7450,
                 and  disassembly.  The size of the output
                 file will be approximately 20x  the  size
                 of  the  input  file,  so  the  user must
                 ensure that there is enough disk space to
                 hold the output file. Execution time will
                 be substantially longer when  using  this
                 option.

       -b        Disassemble  based  on  program  counter.
                 This output mode will print  instructions
                 and   frequency  ordered  by  instruction
                 address rather than simply  printing  out
                 instructions in sequential order. This is
                 a quick way to detect code loops and  hot
                 spots in the trace.

       -d        Output   data   access   addresses  only.
                 Accesses are labeled with 'r', 'w',  's',
                 'S',  'f',  'T', 'a', 'z', 'I', 'd', 'D',
                 or 'k' for load,  store,  dcbst,  dcbtst,
                 dcbf,  dcbt,  dcba, dcbz, dcbi, dst/dstt,
                 dstst/dststt,  dss/dssall   respectively.
                 This  option can be used to feed a memory
                 access driven model.

       -f        Fast mode. Only outputs  instruction  mix
                 statistics.  Executes  2-3x  faster  than
                 regular mode.

       -s        Print results to stderr. Default is  out-
                 put file or stdout.

       -t        Convert TT6E trace file to TT6 format for
                 input to simg4. Specify the output  trace
                 file  name  using -x. TT6 format does not
                 contain an effective  address  specifica-
                 tion for DCB* instructions.