(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tracing) op: Equal rhs: {(/sys/kernel/debug/tracing)} spids: [148] ) ] spids: [148] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flock) op: Equal rhs: {(/var/tmp/.ftrace-lock)} spids: [151] ) ] spids: [151] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:wroteflock) op:Equal rhs:{(0)} spids:[155])] spids: [155] ) ] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_duration) op:Equal rhs:{(0)} spids:[158])] spids: [158] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration) op: Equal rhs: {(EmptyPart)} spids: [162] ) ] spids: [162] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_pid) op:Equal rhs:{(0)} spids:[165])] spids: [165] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pid) op:Equal rhs:{(EmptyPart)} spids:[169])] spids: [169] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_tid) op:Equal rhs:{(0)} spids:[172])] spids: [172] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:tid) op:Equal rhs:{(EmptyPart)} spids:[176])] spids: [176] ) ] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_filter) op:Equal rhs:{(0)} spids:[178])] spids: [178] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:filter) op:Equal rhs:{(EmptyPart)} spids:[182])] spids: [182] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_view) op:Equal rhs:{(0)} spids:[185])] spids: [185] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_headers) op:Equal rhs:{(0)} spids:[189])] spids: [189] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_stack) op:Equal rhs:{(0)} spids:[193])] spids: [193] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dmesg) op:Equal rhs:{(2)} spids:[197])] spids: [197] ) ] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:debug) op:Equal rhs:{(0)} spids:[200])] spids: [200] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_force) op:Equal rhs:{(0)} spids:[204])] spids: [204] ) ] ) (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: 286 stdin_parts: [ ( 'USAGE: kprobe [-FhHsv] [-d secs] [-p PID] [-L TID] kprobe_definition [filter]\n' ) (' -F # force. trace despite warnings.\n') (' -d seconds # trace duration, and use buffers\n') (' -p PID # PID to match on events\n') (' -L TID # thread id to match on events\n') (" -v # view format file (don't trace)\n") (' -H # include column headers\n') (' -s # show kernel stack traces\n') (' -h # this usage message\n') ('\n') ('Note that these examples may need modification to match your kernel\n') ("version's function names and platform's register usage.\n") (' eg,\n') (' kprobe p:do_sys_open\n') (' # trace open() entry\n') (' kprobe r:do_sys_open\n') (' # trace open() return\n') (" kprobe 'r:do_sys_open ") (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("retval'\n") (' # trace open() return value\n') (" kprobe 'r:myopen do_sys_open ") (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("retval'\n") (' # use a custom probe name\n') (" kprobe 'p:myopen do_sys_open mode=%cx:u16'\n") (' # trace open() file mode\n') (" kprobe 'p:myopen do_sys_open filename=+0(%si):string'\n") (' # trace open() with filename\n') (" kprobe -s 'p:myprobe tcp_retransmit_skb'\n") (' # show kernel stacks\n') (" kprobe 'p:do_sys_open file=+0(%si):string' 'file ~ ") (Right_DoubleQuote '"') ('*stat') (Right_DoubleQuote '"') ("'\n") (' # opened files ending in ') (Right_DoubleQuote '"') (stat) (Right_DoubleQuote '"') ('\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: [231] ) spids: [227 230] ) (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 311] ) ] spids: [16777215 327] ) ] spids: [297] ) spids: [293 296] ) (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/kprobes/') ($ VSub_Name '$kname') (/enable))}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_filter) spids:[375 380]) terminator: <Op_Semi ';'> ) ] action: [ (C {(warn)} {(DQ ('echo 0 > events/kprobes/') ($ VSub_Name '$kname') (/filter))}) ] spids: [16777215 383] ) ] spids: [16777215 395] ) (C {(warn)} {(DQ ('echo -:') ($ VSub_Name '$kname') (' >> kprobe_events'))}) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef name:opt_stack) spids:[407 412]) (C {(warn)} {(DQ ('echo 0 > options/stacktrace'))}) ] ) (C {(warn)} {(DQ ('echo > trace'))}) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef name:wroteflock) spids:[430 435]) (C {(warn)} {(DQ ('rm ') ($ VSub_Name '$flock'))}) ] ) ] spids: [336] ) spids: [332 335] ) (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: [453] ) spids: [449 452] ) (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: [477] ) spids: [473 476] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(getopts)} {(Fd) (Lit_Other ':') (hHp) (Lit_Other ':') (L) (Lit_Other ':') (sv)} {(opt)}) ] body: (DoGroup children: [ (Case to_match: {($ VSub_Name '$opt')} arms: [ (case_arm pat_list: [{(F)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_force) op: Equal rhs: {(1)} spids: [543] ) ] spids: [543] ) ] spids: [540 541 546 16777215] ) (case_arm pat_list: [{(d)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_duration) op: Equal rhs: {(1)} spids: [552] ) ] spids: [552] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [556] ) ] spids: [556] ) ] spids: [549 550 559 16777215] ) (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: [565] ) ] spids: [565] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [569] ) ] spids: [569] ) ] spids: [562 563 572 16777215] ) (case_arm pat_list: [{(L)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_tid) op: Equal rhs: {(1)} spids: [578] ) ] spids: [578] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tid) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [582] ) ] spids: [582] ) ] spids: [575 576 585 16777215] ) (case_arm pat_list: [{(H)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_headers) op: Equal rhs: {(1)} spids: [591] ) ] spids: [591] ) ] spids: [588 589 594 16777215] ) (case_arm pat_list: [{(s)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_stack) op: Equal rhs: {(1)} spids: [600] ) ] spids: [600] ) ] spids: [597 598 603 16777215] ) (case_arm pat_list: [{(v)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_view) op: Equal rhs: {(1)} spids: [609] ) ] spids: [609] ) ] spids: [606 607 612 16777215] ) (case_arm pat_list: [{(h)} {(Lit_Other '?')}] action: [(C {(usage)})] spids: [615 618 622 16777215] ) ] spids: [533 537 625] ) ] spids: [530 627] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [631 640] ) } ) (AndOr ops: [Op_DPipe] children: [(DParen child:(ArithWord w:{($ VSub_Pound '$#')}) spids:[642 647]) (C {(usage)})] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:kprobe) op:Equal rhs:{($ VSub_Number '$1')} spids:[653])] spids: [653] ) (C {(shift)}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}) spids:[660 665]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_filter) op:Equal rhs:{(1)} spids:[671])] spids: [671] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter) op: Equal rhs: {($ VSub_Number '$1')} spids: [675] ) ] spids: [675] ) ] spids: [16777215 668] ) ] spids: [16777215 678] ) (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithBinary op_id: Arith_Great left: (ArithBinary op_id: Arith_Plus left: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:opt_pid) right: (ArithVarRef name:opt_filter) ) right: (ArithVarRef name:opt_tid) ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [684 701] ) (C {(die)} {(DQ ('ERROR: use at most one of -p, -L, or filter.'))}) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithBinary op_id: Arith_DAmp left: (ArithVarRef name:opt_duration) right: (ArithVarRef name:opt_view) ) spids: [713 722] ) (C {(die)} {(DQ ('ERROR: use either -d or -v.'))}) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_pid) spids:[734 739]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_filter) op:Equal rhs:{(1)} spids:[749])] spids: [749] ) (ForEach iter_name: tid iter_words: [{(/proc/) ($ VSub_Name '$pid') (/task/) (Lit_Other '*')}] do_arg_iter: F body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter) op: Equal rhs: { (DQ ($ VSub_Name '$filter') (' || common_pid == ') (BracedVarSub token: <VSub_Name tid> suffix_op: (StringUnary op_id: VOp1_DPound arg_word: {('*') (Lit_Slash /)} ) spids: [776 781] ) ) } spids: [772] ) ] spids: [772] ) ] spids: [769 785] ) spids: [762 767] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter) op: Equal rhs: { (BracedVarSub token: <VSub_Name filter> suffix_op: (Slice begin:(ArithWord w:{(Lit_Digits 3)})) spids: [789 793] ) } spids: [788] ) ] spids: [788] ) ] spids: [16777215 742] ) ] spids: [16777215 798] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_tid) spids:[802 807]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_filter) op:Equal rhs:{(1)} spids:[813])] spids: [813] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter) op: Equal rhs: {(DQ ('common_pid == ') ($ VSub_Name '$tid'))} spids: [817] ) ] spids: [817] ) ] spids: [16777215 810] ) ] spids: [16777215 823] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalAnd left: (BoolBinary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_Name '$kprobe'))} right: {(p) (Lit_Other ':') (Lit_Other '*')} ) right: (BoolBinary op_id: BoolBinary_GlobNEqual left: {(DQ ($ VSub_Name '$kprobe'))} right: {(r) (Lit_Other ':') (Lit_Other '*')} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ('ERROR: invalid kprobe definition (should start with p: or r:)'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (C {(usage)}) ] spids: [16777215 854] ) ] spids: [16777215 869] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:krest) op: Equal rhs: { (BracedVarSub token: <VSub_Name kprobe> suffix_op: (StringUnary op_id:VOp1_Pound arg_word:{('*:')}) spids: [908 912] ) } spids: [907] ) ] spids: [907] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:kname) op: Equal rhs: { (BracedVarSub token: <VSub_Name krest> suffix_op: (StringUnary op_id:VOp1_DPercent arg_word:{(' *')}) spids: [915 919] ) } spids: [914] ) ] spids: [914] ) (C {(set)} {(--)} {($ VSub_Name '$krest')}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalOr left: (BoolBinary op_id:BoolBinary_GlobDEqual left:{($ VSub_Number '$2')} right:{(DQ )}) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Number '$2')} right: {(Lit_Other '*') (Lit_Other '[') (BoolBinary_GlobEqual '=') (Lit_Other '%') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (Lit_Other ']') (Lit_Other '*') } ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ktype) op: Equal rhs: { (BracedVarSub token: <VSub_Name kprobe> suffix_op: (StringUnary op_id:VOp1_DPercent arg_word:{(':*')}) spids: [963 967] ) } spids: [962] ) ] spids: [962] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:kprobe) op: Equal rhs: { (DQ ($ VSub_Name '$ktype') (':') ($ VSub_Name '$kname') (' ') ($ VSub_Name '$krest') ) } spids: [970] ) ] spids: [970] ) ] spids: [16777215 955] ) ] spids: [16777215 979] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:debug) spids:[983 988]) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('kname: ') ($ VSub_Name '$kname') (', kprobe: ') ($ VSub_Name '$kprobe'))}) ] spids: [16777215 991] ) ] spids: [16777215 1003] ) (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)') ) } ) ] ) (C {(set)} {(--)} {($ VSub_Name '$kprobe')}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:fname) op:Equal rhs:{($ VSub_Number '$2')} spids:[1032])] spids: [1032] ) (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_force)) spids: [1037 1043] ) (Pipeline children: [ (SimpleCommand words: [{(grep)} {(-w)} {($ VSub_Name '$fname')} {(available_filter_functions)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) ] negated: T ) ] ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('ERROR: func ') ($ VSub_Name '$fname') (' not in ') ($ VSub_Name '$PWD') (/available_filter_functions.) ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (SimpleCommand words: [{(printf)} {(DQ ("Either it doesn't exist, or, it might be unsafe to kprobe. "))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (SimpleCommand words: [{(echo)} {(DQ ('Exiting. Use -F to override.'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 1065] ) ] spids: [16777215 1106] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_view)) spids: [1111 1117] ) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_duration) spids:[1125 1130]) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Tracing kprobe ') ($ VSub_Name '$kname') (' for ') ($ VSub_Name '$duration') (' seconds (buffered)...') ) } ) ] spids: [16777215 1133] ) ] else_action: [ (C {(echo)} {(DQ ('Tracing kprobe ') ($ VSub_Name '$kname') ('. Ctrl-C to end.'))}) ] spids: [1147 1159] ) ] spids: [16777215 1120] ) ] spids: [16777215 1161] ) (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: [1181 1185] ) (' ') ($ 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') (.))}) ] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:wroteflock) op:Equal rhs:{(1)} spids:[1208])] spids: [1208] ) (SimpleCommand words: [{(echo)} {(nop)}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current_tracer)})] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$kprobe'))}] redirects: [(Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(kprobe_events)})] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('ERROR: adding kprobe ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$kprobe') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (.) ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:dmesg) spids:[1257 1262]) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Last ') ($ VSub_Name '$dmesg') (' dmesg entries (might contain reason):') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (Pipeline children: [ (C {(dmesg)}) (C {(tail)} {(-) ($ VSub_Name '$dmesg')}) (C {(sed)} {(SQ <'s/^/ /'>)}) ] negated: F ) ] spids: [16777215 1265] ) ] spids: [16777215 1298] ) (C {(edie)} {(DQ (Exiting.))}) ] spids: [16777215 1238] ) ] spids: [16777215 1307] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_view) spids:[1311 1316]) terminator: <Op_Semi ';'> ) ] action: [(C {(cat)} {(events/kprobes/) ($ VSub_Name '$kname') (/format)}) (C {(edie)} {(DQ )})] spids: [16777215 1319] ) ] spids: [16777215 1334] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_filter) spids:[1338 1343]) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/kprobes/) ($ VSub_Name '$kname') (/filter)} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: setting filter or -p. Exiting.'))})] spids: [16777215 1366] ) ] spids: [16777215 1376] ) ] spids: [16777215 1346] ) ] spids: [16777215 1378] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_stack) spids:[1382 1387]) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(options/stacktrace)} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling stack traces (-s). Exiting'))})] spids: [16777215 1406] ) ] spids: [16777215 1416] ) ] spids: [16777215 1390] ) ] spids: [16777215 1418] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/kprobes/) ($ VSub_Name '$kname') (/enable)} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling kprobe ') ($ VSub_Name '$kname') ('. Exiting.'))})] spids: [16777215 1435] ) ] spids: [16777215 1446] ) (C {(warn)} {(DQ ('echo > trace'))}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_duration) spids:[1460 1465]) terminator: <Op_Semi ';'> ) ] action: [ (C {(sleep)} {($ VSub_Name '$duration')}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_headers) spids:[1478 1483]) terminator: <Op_Semi ';'> ) ] action: [(C {(cat)} {(trace)})] spids: [16777215 1486] ) ] else_action: [(C {(grep)} {(-v)} {(SQ <'^#'>)} {(trace)})] spids: [1494 1508] ) ] spids: [16777215 1468] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef name:opt_headers) spids:[1517 1522]) (C {(cat)} {(trace)}) ] ) (C {(cat)} {(trace_pipe)}) ] spids: [1510 1535] ) (C {(end)}) ] )