(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tracing)
          op: Equal
          rhs: {(/sys/kernel/debug/tracing)}
          spids: [124]
        )
      ]
      spids: [124]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:flock)
          op: Equal
          rhs: {(/var/tmp/.ftrace-lock)}
          spids: [127]
        )
      ]
      spids: [127]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:bufsize_kb) op:Equal rhs:{(4096)} spids:[130])]
      spids: [130]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_device) op:Equal rhs:{(0)} spids:[133])]
          spids: [133]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:device) op:Equal rhs:{(SQ )} spids:[137])]
          spids: [137]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_iotype) op:Equal rhs:{(0)} spids:[140])]
          spids: [140]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:iotype) op:Equal rhs:{(SQ )} spids:[144])]
          spids: [144]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:opt_timestamp) op:Equal rhs:{(0)} spids:[147])]
      spids: [147]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_interval) op:Equal rhs:{(0)} spids:[150])]
          spids: [150]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:interval) op:Equal rhs:{(1)} spids:[154])]
          spids: [154]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_count) op:Equal rhs:{(0)} spids:[158])]
          spids: [158]
        )
      terminator: <Op_Semi ';'>
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:count) op:Equal rhs:{(0)} spids:[162])]
          spids: [162]
        )
      terminator: <Op_Semi ';'>
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:opt_queue) op:Equal rhs:{(0)} spids:[166])]
      spids: [166]
    )
    (C {(trap)} {(SQ <':'>)} {(INT)} {(QUIT)} {(TERM)} {(PIPE)} {(HUP)})
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(cat)}]
              redirects: [
                (HereDoc
                  op_id: Redir_DLessDash
                  fd: -1
                  body: 
                    {
                      (DQ ('USAGE: iolatency [-hQT] [-d device] [-i iotype] [interval [count]]\n') 
                        ('                 -d device       # device string (eg, ') (Right_DoubleQuote '"') ('202,1)\n') 
                        (
"                 -i iotype       # match type (eg, '*R*' for all reads)\n"
                        ) ('                 -Q              # use queue insert as start time\n') 
                        ('                 -T              # timestamp on output\n') ('                 -h              # this usage message\n') 
                        (
'                 interval        # summary interval, seconds (default 1)\n'
                        ) ('                 count           # number of summaries\n') ('  eg,\n') 
                        ('       iolatency                 # summarize latency every second\n') ('       iolatency -Q              # include block I/O queue time\n') 
                        ('       iolatency 5 2             # 2 x 5 second summaries\n') ("       iolatency -i '*R*'        # trace reads\n") 
                        ('       iolatency -d 202,1        # trace device 202,1 only\n') ('\n') ('See the man page and example file for more info.\n')
                      )
                    }
                  do_expansion: True
                  here_end: END
                  was_filled: True
                  spids: [198]
                )
                (Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[201])
              ]
            )
            (C {(exit)})
          ]
          spids: [193]
        )
      spids: [189 192]
    )
    (FuncDef
      name: warn
      body: 
        (BraceGroup
          children: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (Pipeline children:[(C {(eval)} {(DQ ($ VSub_At '$@'))})] negated:True)
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (SimpleCommand
                      words: [
                        {(echo)}
                        {
                          (DQ ('WARNING: command failed ') 
                            (EscapedLiteralPart
                              token: <Lit_EscapedChar '\\"'>
                            ) ($ VSub_At '$@') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                          )
                        }
                      ]
                      redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[252])]
                    )
                  ]
                  spids: [-1 247]
                )
              ]
              spids: [-1 263]
            )
          ]
          spids: [233]
        )
      spids: [229 232]
    )
    (FuncDef
      name: end
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[281])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ('Ending tracing...'))}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[291])]
            )
            (C {(cd)} {($ VSub_Name '$tracing')})
            (C {(warn)} {(DQ ('echo 0 > events/block/') ($ VSub_Name '$b_start') (/enable))})
            (C {(warn)} {(DQ ('echo 0 > events/block/block_rq_complete/enable'))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_DPipe
                              left: (ArithVarRef name:opt_device)
                              right: (ArithVarRef name:opt_iotype)
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(warn)} {(DQ ('echo 0 > events/block/') ($ VSub_Name '$b_start') (/filter))})
                    (C {(warn)} {(DQ ('echo 0 > events/block/block_rq_complete/filter'))})
                  ]
                  spids: [-1 330]
                )
              ]
              spids: [-1 349]
            )
            (C {(warn)} {(DQ ('echo > trace'))})
            (AndOr
              children: [
                (DParen child:(ArithVarRef name:wroteflock))
                (C {(warn)} {(DQ ('rm ') ($ VSub_Name '$flock'))})
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [272]
        )
      spids: [268 271]
    )
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[387])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [382]
        )
      spids: [378 381]
    )
    (FuncDef
      name: edie
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At '$@'))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[415])]
            )
            (SimpleCommand
              words: [{(exec)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[425])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[428])
              ]
            )
            (C {(end)})
            (C {(exit)} {(1)})
          ]
          spids: [406]
        )
      spids: [402 405]
    )
    (While
      cond: [(C {(getopts)} {(d) (Lit_Other ':') (hi) (Lit_Other ':') (QT)} {(opt)})]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {($ VSub_Name '$opt')}
              arms: [
                (case_arm
                  pat_list: [{(d)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:opt_device)
                              op: Equal
                              rhs: {(1)}
                              spids: [470]
                            )
                          ]
                          spids: [470]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:device)
                          op: Equal
                          rhs: {($ VSub_Name '$OPTARG')}
                          spids: [474]
                        )
                      ]
                      spids: [474]
                    )
                  ]
                  spids: [467 468 477 -1]
                )
                (case_arm
                  pat_list: [{(i)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:opt_iotype)
                              op: Equal
                              rhs: {(1)}
                              spids: [483]
                            )
                          ]
                          spids: [483]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:iotype)
                          op: Equal
                          rhs: {($ VSub_Name '$OPTARG')}
                          spids: [487]
                        )
                      ]
                      spids: [487]
                    )
                  ]
                  spids: [480 481 490 -1]
                )
                (case_arm
                  pat_list: [{(Q)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:opt_queue)
                          op: Equal
                          rhs: {(1)}
                          spids: [496]
                        )
                      ]
                      spids: [496]
                    )
                  ]
                  spids: [493 494 499 -1]
                )
                (case_arm
                  pat_list: [{(T)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:opt_timestamp)
                          op: Equal
                          rhs: {(1)}
                          spids: [505]
                        )
                      ]
                      spids: [505]
                    )
                  ]
                  spids: [502 503 508 -1]
                )
                (case_arm
                  pat_list: [{(h)} {(Lit_Other '?')}]
                  action: [(C {(usage)})]
                  spids: [511 514 518 -1]
                )
              ]
              spids: [460 464 521]
            )
          ]
          spids: [457 523]
        )
    )
    (C {(shift)} 
      {
        (ArithSubPart
          anode: 
            (ArithBinary
              op_id: Arith_Minus
              left: (ArithWord w:{($ VSub_Name '$OPTIND')})
              right: (ArithWord w:{(Lit_Digits 1)})
            )
          spids: [527 536]
        )
      }
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:opt_interval) op:Equal rhs:{(1)} spids:[551])]
              spids: [551]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:interval)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [555]
                )
              ]
              spids: [555]
            )
            (C {(shift)})
          ]
          spids: [-1 548]
        )
      ]
      spids: [-1 561]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:opt_count) op:Equal rhs:{(1)} spids:[576])]
              spids: [576]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:count)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                  spids: [580]
                )
              ]
              spids: [580]
            )
          ]
          spids: [-1 573]
        )
      ]
      spids: [-1 583]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_device))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:major)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name device>
                        suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(',*')})
                        spids: [599 603]
                      )
                    }
                  spids: [598]
                )
              ]
              spids: [598]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:minor)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name device>
                        suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('*,')})
                        spids: [607 611]
                      )
                    }
                  spids: [606]
                )
              ]
              spids: [606]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dev)
                  op: Equal
                  rhs: 
                    {
                      (ArithSubPart
                        anode: 
                          (ArithBinary
                            op_id: Arith_Plus
                            left: 
                              (ArithBinary
                                op_id: Arith_DLess
                                left: (ArithVarRef name:major)
                                right: (ArithWord w:{(Lit_Digits 20)})
                              )
                            right: (ArithVarRef name:minor)
                          )
                        spids: [615 630]
                      )
                    }
                  spids: [614]
                )
              ]
              spids: [614]
            )
          ]
          spids: [-1 595]
        )
      ]
      spids: [-1 632]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_queue)) terminator:<Op_Semi ';'>)]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:b_start)
                  op: Equal
                  rhs: {(block_rq_insert)}
                  spids: [647]
                )
              ]
              spids: [647]
            )
          ]
          spids: [-1 644]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:b_start)
              op: Equal
              rhs: {(block_rq_issue)}
              spids: [653]
            )
          ]
          spids: [653]
        )
      ]
      spids: [650 656]
    )
    (AndOr
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(/usr/bin/mawk)}))
        (AndOr
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:awk)
                  op: Equal
                  rhs: {(SQ <'mawk -W interactive'>)}
                  spids: [672]
                )
              ]
              spids: [672]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:awk) op:Equal rhs:{(awk)} spids:[679])]
              spids: [679]
            )
          ]
          op_id: Op_DPipe
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (C {(cd)} {($ VSub_Name '$tracing')})
        (C {(die)} 
          {
            (DQ ('ERROR: accessing tracing. Root user? Kernel has FTRACE?\n') 
              ('    debugfs mounted? (mount -t debugfs debugfs /sys/kernel/debug)')
            )
          }
        )
      ]
      op_id: Op_DPipe
    )
    (AndOr
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_e child:{($ VSub_Name '$flock')}))
        (C {(die)} 
          {
            (DQ ('ERROR: ftrace may be in use by PID ') 
              (CommandSubPart
                command_list: (CommandList children:[(C {(cat)} {($ VSub_Name '$flock')})])
                left_token: <Left_CommandSub '$('>
                spids: [717 721]
              ) (' ') ($ VSub_Name '$flock')
            )
          }
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (SimpleCommand
          words: [{(echo)} {($ VSub_Dollar '$$')}]
          redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{($ VSub_Name '$flock')} spids:[730])]
        )
        (C {(die)} {(DQ ('ERROR: unable to write ') ($ VSub_Name '$flock') (.))})
      ]
      op_id: Op_DPipe
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:wroteflock) op:Equal rhs:{(1)} spids:[744])]
      spids: [744]
    )
    (C {(warn)} {(DQ ('echo nop > current_tracer'))})
    (C {(warn)} {(DQ ('echo ') ($ VSub_Name '$bufsize_kb') (' > buffer_size_kb'))})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:filter) op:Equal rhs:{(SQ )} spids:[765])]
      spids: [765]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_iotype))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:filter)
                  op: Equal
                  rhs: 
                    {
                      (DQ ('rwbs ~ ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                        ($ VSub_Name '$iotype') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>)
                      )
                    }
                  spids: [780]
                )
              ]
              spids: [780]
            )
          ]
          spids: [-1 777]
        )
      ]
      spids: [-1 788]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_device))
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (AndOr
              children: [
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{(DQ ($ VSub_Name '$filter'))} right:{(DQ )})
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:filter)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name '$filter') (' && '))}
                      spids: [818]
                    )
                  ]
                  spids: [818]
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:filter)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name filter) ('dev == ') ($ VSub_Name '$dev'))}
                  spids: [825]
                )
              ]
              spids: [825]
            )
          ]
          spids: [-1 800]
        )
      ]
      spids: [-1 834]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DParen
                  child: 
                    (ArithBinary
                      op_id: Arith_DPipe
                      left: (ArithVarRef name:opt_iotype)
                      right: (ArithVarRef name:opt_device)
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (AndOr
                      children: [
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: -1
                                  arg_word: {(events/block/) ($ VSub_Name '$b_start') (/filter)}
                                  spids: [863]
                                )
                              ]
                            )
                          ]
                          negated: True
                        )
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: -1
                                  arg_word: {(events/block/block_rq_complete/filter)}
                                  spids: [881]
                                )
                              ]
                            )
                          ]
                          negated: True
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  action: [(C {(edie)} {(DQ ('ERROR: setting -d or -t filter. Exiting.'))})]
                  spids: [-1 886]
                )
              ]
              spids: [-1 896]
            )
          ]
          spids: [-1 850]
        )
      ]
      spids: [-1 898]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (AndOr
                  children: [
                    (Pipeline
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(events/block/) ($ VSub_Name '$b_start') (/enable)}
                              spids: [908]
                            )
                          ]
                        )
                      ]
                      negated: True
                    )
                    (Pipeline
                      children: [
                        (SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(events/block/block_rq_complete/enable)}
                              spids: [924]
                            )
                          ]
                        )
                      ]
                      negated: True
                    )
                  ]
                  op_id: Op_DPipe
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [(C {(edie)} {(DQ ('ERROR: enabling block I/O tracepoints. Exiting.'))})]
          spids: [-1 929]
        )
      ]
      spids: [-1 938]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:etext) op:Equal rhs:{(SQ )} spids:[940])]
      spids: [940]
    )
    (AndOr
      children: [
        (DParen child:(ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_count)))
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:etext)
              op: Equal
              rhs: {(DQ (' Ctrl-C to end.'))}
              spids: [952]
            )
          ]
          spids: [952]
        )
      ]
      op_id: Op_DAmp
    )
    (C {(echo)} 
      {
        (DQ ('Tracing block I/O. Output every ') ($ VSub_Name '$interval') (' seconds.') 
          ($ VSub_Name '$etext')
        )
      }
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:offset)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (C {($ VSub_Name '$awk')} 
                        {
                          (SQ <'BEGIN { o = 0; }\n'> 
                            <'\t$1 == "#" && $2 ~ /TASK/ && NF == 6 { o = 1; }\n'> <'\t$2 ~ /TASK/ { print o; exit }'>
                          )
                        } {(trace)}
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [989 999]
              )
            }
          spids: [988]
        )
      ]
      spids: [988]
    )
    (C {(warn)} {(DQ ('echo > trace'))})
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[1011])]
      spids: [1011]
    )
    (Pipeline
      children: [
        (While
          cond: [
            (Sentence
              child: 
                (DParen
                  child: 
                    (ArithBinary
                      op_id: Arith_DPipe
                      left: (ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_count))
                      right: 
                        (ArithBinary
                          op_id: Arith_Less
                          left: (ArithVarRef name:i)
                          right: (ArithVarRef name:count)
                        )
                    )
                )
              terminator: <Op_Semi ';'>
            )
          ]
          body: 
            (DoGroup
              children: [
                (DParen
                  child: (UnaryAssign op_id:Node_PostDPlus child:(LhsName name:i))
                )
                (C {(sleep)} {($ VSub_Name '$interval')})
                (If
                  arms: [
                    (if_arm
                      cond: [
                        (Sentence
                          child: (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(snapshot)}))
                          terminator: <Op_Semi ';'>
                        )
                      ]
                      action: [
                        (SimpleCommand
                          words: [{(echo)} {(1)}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(snapshot)}
                              spids: [1075]
                            )
                          ]
                        )
                        (SimpleCommand
                          words: [{(echo)}]
                          redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(trace)} spids:[1082])]
                        )
                        (C {(cat)} {(snapshot)})
                      ]
                      spids: [-1 1068]
                    )
                  ]
                  else_action: [
                    (C {(cat)} {(trace)})
                    (SimpleCommand
                      words: [{(echo)}]
                      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(trace)} spids:[1102])]
                    )
                  ]
                  spids: [1092 1107]
                )
                (AndOr
                  children: [
                    (DParen child:(ArithVarRef name:opt_timestamp))
                    (C {(printf)} 
                      {(DQ ('time %(%H:%M:%S)T:') (EscapedLiteralPart token:<Lit_EscapedChar '\\n'>))} {(-1)}
                    )
                  ]
                  op_id: Op_DAmp
                )
                (C {(echo)} {(DQ (tick))})
              ]
              spids: [1035 1136]
            )
        )
        (C {($ VSub_Name '$awk')} {(-v)} {(Lit_VarLike 'o=') ($ VSub_Name '$offset')} {(-v)} 
          {(Lit_VarLike 'opt_timestamp=') ($ VSub_Name '$opt_timestamp')} {(-v)} {(Lit_VarLike 'b_start=') ($ VSub_Name '$b_start')} 
          {
            (SQ <'\n'> <'\tfunction star(sval, smax, swidth) {\n'> <'\t\tstars = ""\n'> 
              <'\t\tif (smax == 0) return ""\n'> <'\t\tfor (si = 0; si < (swidth * sval / smax); si++) {\n'> <'\t\t\tstars = stars "#"\n'> <'\t\t}\n'> 
              <'\t\treturn stars\n'> <'\t}\n'> <'\n'> <'\tBEGIN { max_i = 0 }\n'> <'\n'> <'\t# common fields\n'> <'\t$1 != "#" {\n'> 
              <'\t\ttime = $(3+o); sub(":", "", time)\n'> <'\t\tdev = $(5+o)\n'> <'\t}\n'> <'\n'> <'\t# block I/O request\n'> <'\t$1 != "#" && $0 ~ b_start {\n'> 
              <'\t\t#\n'> <'\t\t# example: (fields1..4+o) 202,1 W 0 () 12862264 + 8 [tar]\n'> 
              <'\t\t# The cmd field "()" might contain multiple words (hex),\n'> <'\t\t# hence stepping from the right (NF-3).\n'> <'\t\t#\n'> <'\t\tloc = $(NF-3)\n'> 
              <'\t\tstarts[dev, loc] = time\n'> <'\t\tnext\n'> <'\t}\n'> <'\n'> <'\t# block I/O completion\n'> <'\t$1 != "#" && $0 ~ /rq_complete/ {\n'> 
              <'\t\t#\n'> <'\t\t# example: (fields1..4+o) 202,1 W () 12862256 + 8 [0]\n'> <'\t\t#\n'> <'\t\tdir = $(6+o)\n'> 
              <'\t\tloc = $(NF-3)\n'> <'\n'> <'\t\tif (starts[dev, loc] > 0) {\n'> <'\t\t\tlatency_ms = 1000 * (time - starts[dev, loc])\n'> 
              <'\t\t\ti = 0\n'> <'\t\t\tfor (ms = 1; latency_ms > ms; ms *= 2) { i++ }\n'> <'\t\t\thist[i]++\n'> 
              <'\t\t\tif (i > max_i)\n'> <'\t\t\t\tmax_i = i\n'> <'\t\t\tdelete starts[dev, loc]\n'> <'\t\t}\n'> <'\t\tnext\n'> <'\t}\n'> <'\n'> 
              <'\t# timestamp\n'> <'\t$1 == "time" {\n'> <'\t\tlasttime = $2\n'> <'\t}\n'> <'\n'> <'\t# print summary\n'> 
              <'\t$1 == "tick" {\n'> <'\t\tprint ""\n'> <'\t\tif (opt_timestamp)\n'> <'\t\t\tprint lasttime\n'> <'\n'> 
              <'\t\t# find max value\n'> <'\t\tmax_v = 0\n'> <'\t\tfor (i = 0; i <= max_i; i++) {\n'> <'\t\t\tif (hist[i] > max_v)\n'> 
              <'\t\t\t\tmax_v = hist[i]\n'> <'\t\t}\n'> <'\n'> <'\t\t# print histogram\n'> 
              <'\t\tprintf "%8s .. %-8s: %-8s |%-38s|\\n", ">=(ms)", "<(ms)",\n'> <'\t\t    "I/O", "Distribution"\n'> <'\t\tms = 1\n'> <'\t\tfrom = 0\n'> 
              <'\t\tfor (i = 0; i <= max_i; i++) {\n'> <'\t\t\tprintf "%8d -> %-8d: %-8d |%-38s|\\n", from, ms,\n'> 
              <'\t\t\t    hist[i], star(hist[i], max_v, 38)\n'> <'\t\t\tfrom = ms\n'> <'\t\t\tms *= 2\n'> <'\t\t}\n'> <'\t\tfflush()\n'> <'\t\tdelete hist\n'> 
              <'\t\tdelete starts\t# invalid if events missed between snapshots\n'> <'\t\tmax_i = 0\n'> <'\t}\n'> <'\n'> 
              <'\t$0 ~ /LOST.*EVENTS/ { print "WARNING: " $0 > "/dev/stderr" }\n'>
            )
          }
        )
      ]
      negated: False
    )
    (C {(end)})
  ]
)