(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tracing spids:[163]) op: Equal rhs: {(/sys/kernel/debug/tracing)} spids: [163] ) ] spids: [163] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flock spids:[166]) op: Equal rhs: {(/var/tmp/.ftrace-lock)} spids: [166] ) ] spids: [166] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bufsize_kb spids:[169]) op: Equal rhs: {(4096)} spids: [169] ) ] spids: [169] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_duration spids:[172]) op: Equal rhs: {(0)} spids: [172] ) ] spids: [172] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration spids:[176]) op: Equal rhs: (EmptyWord) spids: [176] ) ] spids: [176] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_name spids:[179]) op: Equal rhs: {(0)} spids: [179] ) ] spids: [179] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name spids:[183]) op: Equal rhs: (EmptyWord) spids: [183] ) ] spids: [183] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_pid spids:[186]) op: Equal rhs: {(0)} spids: [186] ) ] spids: [186] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid spids:[190]) op: Equal rhs: (EmptyWord) spids: [190] ) ] spids: [190] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[193]) op: Equal rhs: (EmptyWord) spids: [193] ) ] spids: [193] ) ] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_start spids:[195]) 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 spids:[199]) 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 spids:[203]) op: Equal rhs: {(0)} spids: [203] ) ] spids: [203] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:device spids:[207]) op: Equal rhs: (EmptyWord) spids: [207] ) ] spids: [207] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_iotype spids:[210]) op: Equal rhs: {(0)} spids: [210] ) ] spids: [210] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:iotype spids:[214]) op: Equal rhs: (EmptyWord) spids: [214] ) ] spids: [214] ) ] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_queue spids:[216]) 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: <Redir_DLessDash '<<-'> fd: 16777215 here_begin: {(END)} here_end_span_id: 278 stdin_parts: [ ('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') ] ) (Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)}) ] ) (ControlFlow token:<ControlFlow_Exit 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:T) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('WARNING: command failed ') (EscapedLiteralPart token: <Lit_EscapedChar '\\"'> ) ($ VSub_At '$@') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) ] spids: [16777215 303] ) ] spids: [16777215 319] ) ] spids: [289] ) spids: [285 288] ) (FuncDef name: end body: (BraceGroup children: [ (SimpleCommand words: [{(echo)}] redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (SimpleCommand words: [{(echo)} {(DQ ('Ending tracing...'))}] redirects: [(Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (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 token:<Lit_ArithVarLike opt_device>) right: (ArithVarRef token:<Lit_ArithVarLike opt_iotype>) ) right: (ArithVarRef token:<Lit_ArithVarLike opt_pid>) ) spids: [374 387] ) 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: [16777215 390] ) ] spids: [16777215 409] ) (C {(warn)} {(DQ ('echo > trace'))}) (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithVarRef token:<Lit_ArithVarLike wroteflock>) spids: [419 424] ) (C {(warn)} {(DQ ('rm ') ($ VSub_Name '$flock'))}) ] ) ] spids: [328] ) spids: [324 327] ) (FuncDef name: die body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [442] ) spids: [438 441] ) (FuncDef name: edie body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (SimpleCommand words: [{(exec)}] redirects: [ (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) (C {(end)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [466] ) spids: [462 465] ) (WhileUntil keyword: <KW_While 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 spids:[534]) op: Equal rhs: {(1)} spids: [534] ) ] spids: [534] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:device spids:[538]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [538] ) ] spids: [538] ) ] spids: [531 532 541 16777215] ) (case_arm pat_list: [{(i)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_iotype spids:[547]) op: Equal rhs: {(1)} spids: [547] ) ] spids: [547] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:iotype spids:[551]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [551] ) ] spids: [551] ) ] spids: [544 545 554 16777215] ) (case_arm pat_list: [{(n)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_name spids:[560]) op: Equal rhs: {(1)} spids: [560] ) ] spids: [560] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name spids:[564]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [564] ) ] spids: [564] ) ] spids: [557 558 567 16777215] ) (case_arm pat_list: [{(p)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_pid spids:[573]) op: Equal rhs: {(1)} spids: [573] ) ] spids: [573] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid spids:[577]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [577] ) ] spids: [577] ) ] spids: [570 571 580 16777215] ) (case_arm pat_list: [{(Q)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_queue spids:[586]) op: Equal rhs: {(1)} spids: [586] ) ] spids: [586] ) ] spids: [583 584 589 16777215] ) (case_arm pat_list: [{(s)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_start spids:[595]) op: Equal rhs: {(1)} spids: [595] ) ] spids: [595] ) ] spids: [592 593 598 16777215] ) (case_arm pat_list: [{(t)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_end spids:[604]) op: Equal rhs: {(1)} spids: [604] ) ] spids: [604] ) ] spids: [601 602 607 16777215] ) (case_arm pat_list: [{(h)} {(Lit_Other '?')}] action: [(C {(usage)})] spids: [610 613 617 16777215] ) ] spids: [524 528 620] ) ] spids: [521 622] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [626 635] ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}) spids:[639 644]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_duration spids:[650]) op: Equal rhs: {(1)} spids: [650] ) ] spids: [650] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration spids:[654]) op: Equal rhs: {($ VSub_Number '$1')} spids: [654] ) ] spids: [654] ) (C {(shift)}) ] spids: [16777215 647] ) ] spids: [16777215 660] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_device>) spids:[664 669]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:major spids:[675]) op: Equal rhs: { (BracedVarSub token: <VSub_Name device> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(',*')}) spids: [676 680] ) } spids: [675] ) ] spids: [675] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:minor spids:[683]) op: Equal rhs: { (BracedVarSub token: <VSub_Name device> suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('*,')}) spids: [684 688] ) } spids: [683] ) ] spids: [683] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:dev spids:[691]) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithBinary op_id: Arith_DLess left: (ArithVarRef token:<Lit_ArithVarLike major>) right: (ArithWord w:{(Lit_Digits 20)}) ) right: (ArithVarRef token:<Lit_ArithVarLike minor>) ) spids: [692 707] ) } spids: [691] ) ] spids: [691] ) ] spids: [16777215 672] ) ] spids: [16777215 709] ) (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithBinary op_id: Arith_DAmp left: (ArithVarRef token:<Lit_ArithVarLike opt_pid>) right: (ArithVarRef token:<Lit_ArithVarLike opt_name>) ) spids: [715 724] ) (C {(die)} {(DQ ('ERROR: use either -p or -n.'))}) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_pid>) spids:[734 739]) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[743]) op: Equal rhs: {(DQ (' issued by PID ') ($ VSub_Name '$pid'))} spids: [743] ) ] spids: [743] ) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_name>) spids:[749 754]) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[758]) op: Equal rhs: { (DQ (' issued by process name ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$name') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } spids: [758] ) ] spids: [758] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithVarRef token:<Lit_ArithVarLike opt_duration>) spids: [768 773] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Tracing block I/O') ($ VSub_Name '$ftext') (' for ') ($ VSub_Name '$duration') (' seconds (buffered)...') ) } ) ] spids: [16777215 776] ) ] else_action: [ (C {(echo)} {(DQ ('Tracing block I/O') ($ VSub_Name '$ftext') ('. Ctrl-C to end.'))}) ] spids: [789 800] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_queue>) spids:[804 809]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:b_start spids:[815]) op: Equal rhs: {(block_rq_insert)} spids: [815] ) ] spids: [815] ) ] spids: [16777215 812] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:b_start spids:[821]) op: Equal rhs: {(block_rq_issue)} spids: [821] ) ] spids: [821] ) ] spids: [818 824] ) (AndOr ops: [Op_DAmp Op_DPipe] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_duration>) spids:[830 835]) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:use spids:[839]) op:Equal rhs:{(mawk)} spids:[839])] spids: [839] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:use spids:[844]) op:Equal rhs:{(gawk)} spids:[844])] spids: [844] ) ] ) (AndOr ops: [Op_DAmp Op_DPipe] children: [ (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(/usr/bin/) ($ VSub_Name '$use')})) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:awk spids:[861]) op: Equal rhs: {($ VSub_Name '$use')} spids: [861] ) ] spids: [861] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:awk spids:[866]) op:Equal rhs:{(awk)} spids:[866])] spids: [866] ) ] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:wroteflock spids:[869]) op:Equal rhs:{(1)} spids:[869])] spids: [869] ) (AndOr ops: [Op_DPipe] 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)') ) } ) ] ) (AndOr ops: [Op_DAmp] 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: [907 911] ) (' ') ($ VSub_Name '$flock') ) } ) ] ) (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(echo)} {($ VSub_Dollar '$$')}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{($ VSub_Name '$flock')})] ) (C {(die)} {(DQ ('ERROR: unable to write ') ($ VSub_Name '$flock') (.))}) ] ) (SimpleCommand words: [{(echo)} {(nop)}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current_tracer)})] ) (C {(warn)} {(DQ ('echo ') ($ VSub_Name '$bufsize_kb') (' > buffer_size_kb'))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter spids:[954]) op: Equal rhs: (EmptyWord) spids: [954] ) ] spids: [954] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_iotype>) spids:[958 963]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter spids:[969]) op: Equal rhs: { (DQ ('rwbs ~ ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$iotype') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } spids: [969] ) ] spids: [969] ) ] spids: [16777215 966] ) ] spids: [16777215 977] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_device>) spids:[981 986]) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] 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 spids:[1007]) op: Equal rhs: {(DQ ($ VSub_Name '$filter') (' && '))} spids: [1007] ) ] spids: [1007] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter spids:[1014]) op: Equal rhs: {(DQ (${ VSub_Name filter) ('dev == ') ($ VSub_Name '$dev'))} spids: [1014] ) ] spids: [1014] ) ] spids: [16777215 989] ) ] spids: [16777215 1023] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_i spids:[1025]) op: Equal rhs: {($ VSub_Name '$filter')} spids: [1025] ) ] spids: [1025] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_pid>) spids:[1030 1035]) terminator: <Op_Semi ';'> ) ] action: [ (AndOr ops: [Op_DAmp] 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 spids:[1056]) op: Equal rhs: {(DQ ($ VSub_Name '$filter_i') (' && '))} spids: [1056] ) ] spids: [1056] ) ] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter_i spids:[1063]) op: Equal rhs: {(DQ (${ VSub_Name filter_i) ('common_pid == ') ($ VSub_Name '$pid'))} spids: [1063] ) ] spids: [1063] ) (AndOr ops: [Op_DAmp] 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 spids:[1088]) op: Equal rhs: {(0)} spids: [1088] ) ] spids: [1088] ) ] ) ] spids: [16777215 1038] ) ] spids: [16777215 1091] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DPipe left: (ArithBinary op_id: Arith_DPipe left: (ArithVarRef token:<Lit_ArithVarLike opt_iotype>) right: (ArithVarRef token:<Lit_ArithVarLike opt_device>) ) right: (ArithVarRef token:<Lit_ArithVarLike opt_pid>) ) spids: [1095 1108] ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$filter_i'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/block/) ($ VSub_Name '$b_start') (/filter)} ) ] ) ] negated: T ) (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/block/block_rq_complete/filter)} ) ] ) ] negated: T ) ] ) ] action: [(C {(edie)} {(DQ ('ERROR: setting -d or -t filter. Exiting.'))})] spids: [16777215 1147] ) ] spids: [16777215 1157] ) ] spids: [16777215 1111] ) ] spids: [16777215 1159] ) (If arms: [ (if_arm cond: [ (Sentence child: (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/block/) ($ VSub_Name '$b_start') (/enable)} ) ] ) ] negated: T ) (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/block/block_rq_complete/enable)} ) ] ) ] negated: T ) ] ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling block I/O tracepoints. Exiting.'))})] spids: [16777215 1190] ) ] spids: [16777215 1199] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_start>) spids:[1201 1206]) (C {(printf)} {(DQ ('%-15s '))} {(DQ (STARTs))}) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_end>) spids:[1220 1225]) (C {(printf)} {(DQ ('%-15s '))} {(DQ (ENDs))}) ] ) (C {(printf)} {(DQ ('%-12.12s %-6s %-4s %-8s %-12s %-6s %8s') (Lit_Other '\\') (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 spids:[1299]) 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: [1300 1310] ) } spids: [1299] ) ] spids: [1299] ) (C {(warn)} {(DQ ('echo > trace'))}) (Pipeline children: [ (Subshell child: (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithVarRef token:<Lit_ArithVarLike opt_duration>) spids: [1326 1331] ) terminator: <Op_Semi ';'> ) ] action: [(C {(sleep)} {($ VSub_Name '$duration')}) (C {(cat)} {(trace)})] spids: [16777215 1334] ) ] else_action: [(C {(cat)} {(trace_pipe)})] spids: [1350 1361] ) spids: [1322 1363] ) (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: F ) (C {(end)}) ] )