(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:tracing)
          op: Equal
          rhs: {(/sys/kernel/debug/tracing)}
          spids: [163]
        )
      ]
      spids: [163]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:flock)
          op: Equal
          rhs: {(/var/tmp/.ftrace-lock)}
          spids: [166]
        )
      ]
      spids: [166]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:bufsize_kb) op:Equal rhs:{(4096)} spids:[169])]
      spids: [169]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_duration) op:Equal rhs:{(0)} spids:[172])]
          spids: [172]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:duration) op:Equal rhs:{(SQ )} spids:[176])]
          spids: [176]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_name) op:Equal rhs:{(0)} spids:[179])]
          spids: [179]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:name) op:Equal rhs:{(SQ )} spids:[183])]
          spids: [183]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_pid) op:Equal rhs:{(0)} spids:[186])]
          spids: [186]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:pid) op:Equal rhs:{(SQ )} spids:[190])]
          spids: [190]
        )
      terminator: <Op_Semi ";">
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:ftext) op:Equal rhs:{(SQ )} spids:[193])]
      spids: [193]
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_start) op:Equal rhs:{(0)} spids:[195])]
          spids: [195]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_end) op:Equal rhs:{(0)} spids:[199])]
          spids: [199]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_device) op:Equal rhs:{(0)} spids:[203])]
          spids: [203]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:device) op:Equal rhs:{(SQ )} spids:[207])]
          spids: [207]
        )
      terminator: <Op_Semi ";">
    )
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [(assign_pair lhs:(LhsName name:opt_iotype) op:Equal rhs:{(0)} spids:[210])]
          spids: [210]
        )
      terminator: <Op_Semi ";">
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:iotype) op:Equal rhs:{(SQ )} spids:[214])]
      spids: [214]
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:opt_queue) op:Equal rhs:{(0)} spids:[216])]
      spids: [216]
    )
    (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: iosnoop [-hQst] [-d device] [-i iotype] [-p PID] [-n name]\n") 
                        ("               [duration]\n") ("                 -d device       # device string (eg, ") (Right_DoubleQuote "\"") ("202,1)\n") 
                        (
"                 -i iotype       # match type (eg, '*R*' for all reads)\n"
                        ) ("                 -n name         # process name to match on I/O issue\n") 
                        ("                 -p PID          # PID to match on I/O issue\n") ("                 -Q              # use queue insert as start time\n") 
                        ("                 -s              # include start time of I/O (s)\n") ("                 -t              # include completion time of I/O (s)\n") 
                        ("                 -h              # this usage message\n") ("                 duration        # duration seconds, and use buffers\n") ("  eg,\n") 
                        ("       iosnoop                   # watch block I/O live (unbuffered)\n") ("       iosnoop 1                 # trace 1 sec (buffered)\n") 
                        ("       iosnoop -Q                # include queueing time in LATms\n") ("       iosnoop -ts               # include start and end timestamps\n") 
                        ("       iosnoop -i '*R*'          # trace reads\n") ("       iosnoop -p 91             # show I/O issued when PID 91 is on-CPU\n") 
                        (
"       iosnoop -Qp 91            # show I/O queued by PID 91, queue time\n"
                        ) ("\n") ("See the man page and example file for more info.\n")
                      )
                    }
                  do_expansion: True
                  here_end: END
                  was_filled: True
                  spids: [248]
                )
                (Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[251])
              ]
            )
            (C {(exit)})
          ]
          spids: [243]
        )
      spids: [239 242]
    )
    (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:[306])]
                    )
                  ]
                  spids: [-1 301]
                )
              ]
              spids: [-1 317]
            )
          ]
          spids: [287]
        )
      spids: [283 286]
    )
    (FuncDef
      name: end
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[335])]
            )
            (SimpleCommand
              words: [{(echo)} {(DQ ("Ending tracing..."))}]
              redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[345])]
            )
            (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: 
                                (ArithBinary
                                  op_id: Arith_DPipe
                                  left: (ArithVarRef name:opt_device)
                                  right: (ArithVarRef name:opt_iotype)
                                )
                              right: (ArithVarRef name:opt_pid)
                            )
                        )
                      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 388]
                )
              ]
              spids: [-1 407]
            )
            (C {(warn)} {(DQ ("echo > trace"))})
            (AndOr
              children: [
                (DParen child:(ArithVarRef name:wroteflock))
                (C {(warn)} {(DQ ("rm ") ($ VSub_Name "$flock"))})
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [326]
        )
      spids: [322 325]
    )
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At "$@"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[445])]
            )
            (C {(exit)} {(1)})
          ]
          spids: [440]
        )
      spids: [436 439]
    )
    (FuncDef
      name: edie
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At "$@"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[473])]
            )
            (SimpleCommand
              words: [{(exec)}]
              redirects: [
                (Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[483])
                (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[486])
              ]
            )
            (C {(end)})
            (C {(exit)} {(1)})
          ]
          spids: [464]
        )
      spids: [460 463]
    )
    (While
      cond: [
        (C {(getopts)} 
          {(d) (Lit_Other ":") (hi) (Lit_Other ":") (n) (Lit_Other ":") (p) (Lit_Other ":") (Qst)} {(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: [532]
                            )
                          ]
                          spids: [532]
                        )
                      terminator: <Op_Semi ";">
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:device)
                          op: Equal
                          rhs: {($ VSub_Name "$OPTARG")}
                          spids: [536]
                        )
                      ]
                      spids: [536]
                    )
                  ]
                  spids: [529 530 539 -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: [545]
                            )
                          ]
                          spids: [545]
                        )
                      terminator: <Op_Semi ";">
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:iotype)
                          op: Equal
                          rhs: {($ VSub_Name "$OPTARG")}
                          spids: [549]
                        )
                      ]
                      spids: [549]
                    )
                  ]
                  spids: [542 543 552 -1]
                )
                (case_arm
                  pat_list: [{(n)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:opt_name)
                              op: Equal
                              rhs: {(1)}
                              spids: [558]
                            )
                          ]
                          spids: [558]
                        )
                      terminator: <Op_Semi ";">
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:name)
                          op: Equal
                          rhs: {($ VSub_Name "$OPTARG")}
                          spids: [562]
                        )
                      ]
                      spids: [562]
                    )
                  ]
                  spids: [555 556 565 -1]
                )
                (case_arm
                  pat_list: [{(p)}]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:opt_pid)
                              op: Equal
                              rhs: {(1)}
                              spids: [571]
                            )
                          ]
                          spids: [571]
                        )
                      terminator: <Op_Semi ";">
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:pid)
                          op: Equal
                          rhs: {($ VSub_Name "$OPTARG")}
                          spids: [575]
                        )
                      ]
                      spids: [575]
                    )
                  ]
                  spids: [568 569 578 -1]
                )
                (case_arm
                  pat_list: [{(Q)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:opt_queue)
                          op: Equal
                          rhs: {(1)}
                          spids: [584]
                        )
                      ]
                      spids: [584]
                    )
                  ]
                  spids: [581 582 587 -1]
                )
                (case_arm
                  pat_list: [{(s)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:opt_start)
                          op: Equal
                          rhs: {(1)}
                          spids: [593]
                        )
                      ]
                      spids: [593]
                    )
                  ]
                  spids: [590 591 596 -1]
                )
                (case_arm
                  pat_list: [{(t)}]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(LhsName name:opt_end) op:Equal rhs:{(1)} spids:[602])]
                      spids: [602]
                    )
                  ]
                  spids: [599 600 605 -1]
                )
                (case_arm
                  pat_list: [{(h)} {(Lit_Other "?")}]
                  action: [(C {(usage)})]
                  spids: [608 611 615 -1]
                )
              ]
              spids: [522 526 618]
            )
          ]
          spids: [519 620]
        )
    )
    (C {(shift)} 
      {
        (ArithSubPart
          anode: 
            (ArithBinary
              op_id: Arith_Minus
              left: (ArithWord w:{($ VSub_Name "$OPTIND")})
              right: (ArithWord w:{(Lit_Digits 1)})
            )
          spids: [624 633]
        )
      }
    )
    (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_duration) op:Equal rhs:{(1)} spids:[648])]
              spids: [648]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:duration)
                  op: Equal
                  rhs: {($ VSub_Number "$1")}
                  spids: [652]
                )
              ]
              spids: [652]
            )
            (C {(shift)})
          ]
          spids: [-1 645]
        )
      ]
      spids: [-1 658]
    )
    (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: [674 678]
                      )
                    }
                  spids: [673]
                )
              ]
              spids: [673]
            )
            (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: [682 686]
                      )
                    }
                  spids: [681]
                )
              ]
              spids: [681]
            )
            (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: [690 705]
                      )
                    }
                  spids: [689]
                )
              ]
              spids: [689]
            )
          ]
          spids: [-1 670]
        )
      ]
      spids: [-1 707]
    )
    (AndOr
      children: [
        (DParen
          child: 
            (ArithBinary
              op_id: Arith_DAmp
              left: (ArithVarRef name:opt_pid)
              right: (ArithVarRef name:opt_name)
            )
        )
        (C {(die)} {(DQ ("ERROR: use either -p or -n."))})
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (DParen child:(ArithVarRef name:opt_pid))
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:ftext)
              op: Equal
              rhs: {(DQ (" issued by PID ") ($ VSub_Name "$pid"))}
              spids: [741]
            )
          ]
          spids: [741]
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (DParen child:(ArithVarRef name:opt_name))
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:ftext)
              op: Equal
              rhs: 
                {
                  (DQ (" issued by process name ") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) 
                    ($ VSub_Name "$name") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">)
                  )
                }
              spids: [756]
            )
          ]
          spids: [756]
        )
      ]
      op_id: Op_DAmp
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (DParen child:(ArithVarRef name:opt_duration))
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (C {(echo)} 
              {
                (DQ ("Tracing block I/O") ($ VSub_Name "$ftext") (" for ") ($ VSub_Name "$duration") 
                  (" seconds (buffered)...")
                )
              }
            )
          ]
          spids: [-1 774]
        )
      ]
      else_action: [
        (C {(echo)} {(DQ ("Tracing block I/O") ($ VSub_Name "$ftext") (". Ctrl-C to end."))})
      ]
      spids: [787 798]
    )
    (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: [813]
                )
              ]
              spids: [813]
            )
          ]
          spids: [-1 810]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:b_start)
              op: Equal
              rhs: {(block_rq_issue)}
              spids: [819]
            )
          ]
          spids: [819]
        )
      ]
      spids: [816 822]
    )
    (AndOr
      children: [
        (DParen child:(ArithVarRef name:opt_duration))
        (AndOr
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:use) op:Equal rhs:{(mawk)} spids:[837])]
              spids: [837]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:use) op:Equal rhs:{(gawk)} spids:[842])]
              spids: [842]
            )
          ]
          op_id: Op_DPipe
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(/usr/bin/) ($ VSub_Name "$use")}))
        (AndOr
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:awk)
                  op: Equal
                  rhs: {($ VSub_Name "$use")}
                  spids: [859]
                )
              ]
              spids: [859]
            )
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:awk) op:Equal rhs:{(awk)} spids:[864])]
              spids: [864]
            )
          ]
          op_id: Op_DPipe
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:wroteflock) op:Equal rhs:{(1)} spids:[867])]
      spids: [867]
    )
    (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: [905 909]
              ) (" ") ($ 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:[918])]
        )
        (C {(die)} {(DQ ("ERROR: unable to write ") ($ VSub_Name "$flock") (.))})
      ]
      op_id: Op_DPipe
    )
    (SimpleCommand
      words: [{(echo)} {(nop)}]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(current_tracer)} spids:[940])]
    )
    (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:[952])]
      spids: [952]
    )
    (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: [967]
                )
              ]
              spids: [967]
            )
          ]
          spids: [-1 964]
        )
      ]
      spids: [-1 975]
    )
    (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: [1005]
                    )
                  ]
                  spids: [1005]
                )
              ]
              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: [1012]
                )
              ]
              spids: [1012]
            )
          ]
          spids: [-1 987]
        )
      ]
      spids: [-1 1021]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:filter_i)
          op: Equal
          rhs: {($ VSub_Name "$filter")}
          spids: [1023]
        )
      ]
      spids: [1023]
    )
    (If
      arms: [
        (if_arm
          cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_pid)) terminator:<Op_Semi ";">)]
          action: [
            (AndOr
              children: [
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_GlobNEqual left:{(DQ ($ VSub_Name "$filter_i"))} right:{(DQ )})
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:filter_i)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name "$filter_i") (" && "))}
                      spids: [1054]
                    )
                  ]
                  spids: [1054]
                )
              ]
              op_id: Op_DAmp
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:filter_i)
                  op: Equal
                  rhs: {(DQ (${ VSub_Name filter_i) ("common_pid == ") ($ VSub_Name "$pid"))}
                  spids: [1061]
                )
              ]
              spids: [1061]
            )
            (AndOr
              children: [
                (DBracket
                  expr: (BoolBinary op_id:BoolBinary_GlobDEqual left:{(DQ ($ VSub_Name "$filter"))} right:{(DQ )})
                )
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:filter) op:Equal rhs:{(0)} spids:[1086])]
                  spids: [1086]
                )
              ]
              op_id: Op_DAmp
            )
          ]
          spids: [-1 1036]
        )
      ]
      spids: [-1 1089]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: 
                (DParen
                  child: 
                    (ArithBinary
                      op_id: Arith_DPipe
                      left: 
                        (ArithBinary
                          op_id: Arith_DPipe
                          left: (ArithVarRef name:opt_iotype)
                          right: (ArithVarRef name:opt_device)
                        )
                      right: (ArithVarRef name:opt_pid)
                    )
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (AndOr
                      children: [
                        (Pipeline
                          children: [
                            (SimpleCommand
                              words: [{(echo)} {(DQ ($ VSub_Name "$filter_i"))}]
                              redirects: [
                                (Redir
                                  op_id: Redir_Great
                                  fd: -1
                                  arg_word: {(events/block/) ($ VSub_Name "$b_start") (/filter)}
                                  spids: [1122]
                                )
                              ]
                            )
                          ]
                          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: [1140]
                                )
                              ]
                            )
                          ]
                          negated: True
                        )
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  action: [(C {(edie)} {(DQ ("ERROR: setting -d or -t filter. Exiting."))})]
                  spids: [-1 1145]
                )
              ]
              spids: [-1 1155]
            )
          ]
          spids: [-1 1109]
        )
      ]
      spids: [-1 1157]
    )
    (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: [1167]
                            )
                          ]
                        )
                      ]
                      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: [1183]
                            )
                          ]
                        )
                      ]
                      negated: True
                    )
                  ]
                  op_id: Op_DPipe
                )
              terminator: <Op_Semi ";">
            )
          ]
          action: [(C {(edie)} {(DQ ("ERROR: enabling block I/O tracepoints. Exiting."))})]
          spids: [-1 1188]
        )
      ]
      spids: [-1 1197]
    )
    (AndOr
      children: [
        (DParen child:(ArithVarRef name:opt_start))
        (C {(printf)} {(DQ ("%-15s "))} {(DQ (STARTs))})
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [(DParen child:(ArithVarRef name:opt_end)) (C {(printf)} {(DQ ("%-15s "))} {(DQ (ENDs))})]
      op_id: Op_DAmp
    )
    (C {(printf)} 
      {
        (DQ ("%-12.12s %-6s %-4s %-8s %-12s %-6s %8s") 
          (EscapedLiteralPart token:<Lit_EscapedChar "\\n">)
        )
      } {(DQ (COMM))} {(DQ (PID))} {(DQ (TYPE))} {(DQ (DEV))} {(DQ (BLOCK))} {(DQ (BYTES))} {(DQ (LATms))}
    )
    (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: [1297 1307]
              )
            }
          spids: [1296]
        )
      ]
      spids: [1296]
    )
    (C {(warn)} {(DQ ("echo > trace"))})
    (Pipeline
      children: [
        (Subshell
          child: 
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: (DParen child:(ArithVarRef name:opt_duration))
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [(C {(sleep)} {($ VSub_Name "$duration")}) (C {(cat)} {(trace)})]
                  spids: [-1 1331]
                )
              ]
              else_action: [(C {(cat)} {(trace_pipe)})]
              spids: [1347 1358]
            )
          spids: [1319 1360]
        )
        (C {($ VSub_Name "$awk")} {(-v)} {(Lit_VarLike "o=") ($ VSub_Name "$offset")} {(-v)} 
          {(Lit_VarLike "opt_name=") ($ VSub_Name "$opt_name")} {(-v)} {(Lit_VarLike "name=") ($ VSub_Name "$name")} {(-v)} 
          {(Lit_VarLike "opt_duration=") ($ VSub_Name "$opt_duration")} {(-v)} {(Lit_VarLike "opt_start=") ($ VSub_Name "$opt_start")} {(-v)} 
          {(Lit_VarLike "opt_end=") ($ VSub_Name "$opt_end")} {(-v)} {(Lit_VarLike "b_start=") ($ VSub_Name "$b_start")} 
          {
            (SQ <"\n"> <"\t# common fields\n"> <"\t$1 != \"#\" {\n"> 
              <"\t\t# task name can contain dashes\n"> <"\t\tcomm = pid = $1\n"> <"\t\tsub(/-[0-9][0-9]*/, \"\", comm)\n"> <"\t\tsub(/.*-/, \"\", pid)\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\tif (opt_name && match(comm, name) == 0)\n"> <"\t\t\tnext\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\tcomms[dev, loc] = comm\n"> <"\t\tpids[dev, loc] = pid\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"> <"\t\tnsec = $(NF-1)\n"> <"\n"> 
              <"\t\tif (starts[dev, loc] > 0) {\n"> <"\t\t\tlatency = sprintf(\"%.2f\",\n"> <"\t\t\t    1000 * (time - starts[dev, loc]))\n"> 
              <"\t\t\tcomm = comms[dev, loc]\n"> <"\t\t\tpid = pids[dev, loc]\n"> <"\n"> <"\t\t\tif (opt_start)\n"> 
              <"\t\t\t\tprintf \"%-15s \", starts[dev, loc]\n"> <"\t\t\tif (opt_end)\n"> <"\t\t\t\tprintf \"%-15s \", time\n"> 
              <"\t\t\tprintf \"%-12.12s %-6s %-4s %-8s %-12s %-6s %8s\\n\",\n"> <"\t\t\t    comm, pid, dir, dev, loc, nsec * 512, latency\n"> <"\t\t\tif (!opt_duration)\n"> 
              <"\t\t\t\tfflush()\n"> <"\n"> <"\t\t\tdelete starts[dev, loc]\n"> <"\t\t\tdelete comms[dev, loc]\n"> 
              <"\t\t\tdelete pids[dev, loc]\n"> <"\t\t}\n"> <"\t\tnext\n"> <"\t}\n"> <"\n"> 
              <"\t$0 ~ /LOST.*EVENTS/ { print \"WARNING: \" $0 > \"/dev/stderr\" }\n">
            )
          }
        )
      ]
      negated: False
    )
    (C {(end)})
  ]
)