(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tracing) op: Equal rhs: {(/sys/kernel/debug/tracing)} spids: [148] ) ] spids: [148] ) (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] ) (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] ) (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] ) (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_id: Redir_DLessDash fd: 16777215 body: { (DQ ( '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') ) } do_expansion: True here_end: END was_filled: T spids: [236] ) (Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[239]) ] ) (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_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[315])] ) ] spids: [16777215 310] ) ] spids: [16777215 326] ) ] spids: [296] ) spids: [292 295] ) (FuncDef name: end body: (BraceGroup children: [ (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[344])] ) (SimpleCommand words: [{(echo)} {(DQ ('Ending tracing...'))}] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[354])] ) (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)) terminator: <Op_Semi ';'> ) ] action: [ (C {(warn)} {(DQ ('echo 0 > events/kprobes/') ($ VSub_Name '$kname') (/filter))}) ] spids: [16777215 382] ) ] spids: [16777215 394] ) (C {(warn)} {(DQ ('echo -:') ($ VSub_Name '$kname') (' >> kprobe_events'))}) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef name:opt_stack)) (C {(warn)} {(DQ ('echo 0 > options/stacktrace'))}) ] ) (C {(warn)} {(DQ ('echo > trace'))}) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef name:wroteflock)) (C {(warn)} {(DQ ('rm ') ($ VSub_Name '$flock'))}) ] ) ] spids: [335] ) spids: [331 334] ) (FuncDef name: die body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[457])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [452] ) spids: [448 451] ) (FuncDef name: edie body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[485])] ) (SimpleCommand words: [{(exec)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [495] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[498]) ] ) (C {(end)}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [476] ) spids: [472 475] ) (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: [542] ) ] spids: [542] ) ] spids: [539 540 545 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: [551] ) ] spids: [551] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [555] ) ] spids: [555] ) ] spids: [548 549 558 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: [564] ) ] spids: [564] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [568] ) ] spids: [568] ) ] spids: [561 562 571 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: [577] ) ] spids: [577] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tid) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [581] ) ] spids: [581] ) ] spids: [574 575 584 16777215] ) (case_arm pat_list: [{(H)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_headers) op: Equal rhs: {(1)} spids: [590] ) ] spids: [590] ) ] spids: [587 588 593 16777215] ) (case_arm pat_list: [{(s)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_stack) op: Equal rhs: {(1)} spids: [599] ) ] spids: [599] ) ] spids: [596 597 602 16777215] ) (case_arm pat_list: [{(v)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_view) op: Equal rhs: {(1)} spids: [608] ) ] spids: [608] ) ] spids: [605 606 611 16777215] ) (case_arm pat_list: [{(h)} {(Lit_Other '?')}] action: [(C {(usage)})] spids: [614 617 621 16777215] ) ] spids: [532 536 624] ) ] spids: [529 626] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [630 639] ) } ) (AndOr ops: [Op_DPipe] children: [(DParen child:(ArithWord w:{($ VSub_Pound '$#')})) (C {(usage)})] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:kprobe) op:Equal rhs:{($ VSub_Number '$1')} spids:[652])] spids: [652] ) (C {(shift)}) (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_filter) op:Equal rhs:{(1)} spids:[670])] spids: [670] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter) op: Equal rhs: {($ VSub_Number '$1')} spids: [674] ) ] spids: [674] ) ] spids: [16777215 667] ) ] spids: [16777215 677] ) (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)}) ) ) (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) ) ) (C {(die)} {(DQ ('ERROR: use either -d or -v.'))}) ] ) (If arms: [ (if_arm cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_pid)) terminator:<Op_Semi ';'>)] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_filter) op:Equal rhs:{(1)} spids:[748])] spids: [748] ) (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: [775 780] ) ) } spids: [771] ) ] spids: [771] ) ] spids: [768 784] ) spids: [761 766] ) (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: [788 792] ) } spids: [787] ) ] spids: [787] ) ] spids: [16777215 741] ) ] spids: [16777215 797] ) (If arms: [ (if_arm cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_tid)) terminator:<Op_Semi ';'>)] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_filter) op:Equal rhs:{(1)} spids:[812])] spids: [812] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter) op: Equal rhs: {(DQ ('common_pid == ') ($ VSub_Name '$tid'))} spids: [816] ) ] spids: [816] ) ] spids: [16777215 809] ) ] spids: [16777215 822] ) (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_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[858])] ) (C {(usage)}) ] spids: [16777215 853] ) ] spids: [16777215 868] ) (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: [907 911] ) } spids: [906] ) ] spids: [906] ) (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: [914 918] ) } spids: [913] ) ] spids: [913] ) (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: [962 966] ) } spids: [961] ) ] spids: [961] ) (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: [969] ) ] spids: [969] ) ] spids: [16777215 954] ) ] spids: [16777215 978] ) (If arms: [ (if_arm cond: [(Sentence child:(DParen child:(ArithVarRef name:debug)) terminator:<Op_Semi ';'>)] action: [ (C {(echo)} {(DQ ('kname: ') ($ VSub_Name '$kname') (', kprobe: ') ($ VSub_Name '$kprobe'))}) ] spids: [16777215 990] ) ] spids: [16777215 1002] ) (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:[1031])] spids: [1031] ) (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_force)) ) (Pipeline children: [ (SimpleCommand words: [{(grep)} {(-w)} {($ VSub_Name '$fname')} {(available_filter_functions)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [1056] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [1061] ) ] ) ] negated: T ) ] ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('ERROR: func ') ($ VSub_Name '$fname') (' not in ') ($ VSub_Name '$PWD') (/available_filter_functions.) ) } ] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[1069])] ) (SimpleCommand words: [{(printf)} {(DQ ("Either it doesn't exist, or, it might be unsafe to kprobe. "))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[1083])] ) (SimpleCommand words: [{(echo)} {(DQ ('Exiting. Use -F to override.'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[1093])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 1064] ) ] spids: [16777215 1105] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithUnary op_id:Arith_Bang child:(ArithVarRef name:opt_view))) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_duration)) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Tracing kprobe ') ($ VSub_Name '$kname') (' for ') ($ VSub_Name '$duration') (' seconds (buffered)...') ) } ) ] spids: [16777215 1132] ) ] else_action: [ (C {(echo)} {(DQ ('Tracing kprobe ') ($ VSub_Name '$kname') ('. Ctrl-C to end.'))}) ] spids: [1146 1158] ) ] spids: [16777215 1119] ) ] spids: [16777215 1160] ) (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: [1180 1184] ) (' ') ($ VSub_Name '$flock') ) } ) ] ) (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(echo)} {($ VSub_Dollar '$$')}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {($ VSub_Name '$flock')} spids: [1193] ) ] ) (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:[1207])] spids: [1207] ) (SimpleCommand words: [{(echo)} {(nop)}] redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(current_tracer)} spids:[1218])] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$kprobe'))}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {(kprobe_events)} spids: [1232] ) ] ) ] 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_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[1242])] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:dmesg)) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ ('Last ') ($ VSub_Name '$dmesg') (' dmesg entries (might contain reason):') ) } ] redirects: [ (Redir op_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [1269] ) ] ) (Pipeline children: [ (C {(dmesg)}) (C {(tail)} {(-) ($ VSub_Name '$dmesg')}) (C {(sed)} {(SQ <'s/^/ /'>)}) ] negated: F ) ] spids: [16777215 1264] ) ] spids: [16777215 1297] ) (C {(edie)} {(DQ (Exiting.))}) ] spids: [16777215 1237] ) ] spids: [16777215 1306] ) (If arms: [ (if_arm cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_view)) terminator:<Op_Semi ';'>)] action: [(C {(cat)} {(events/kprobes/) ($ VSub_Name '$kname') (/format)}) (C {(edie)} {(DQ )})] spids: [16777215 1318] ) ] spids: [16777215 1333] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_filter)) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$filter'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(events/kprobes/) ($ VSub_Name '$kname') (/filter)} spids: [1358] ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: setting filter or -p. Exiting.'))})] spids: [16777215 1365] ) ] spids: [16777215 1375] ) ] spids: [16777215 1345] ) ] spids: [16777215 1377] ) (If arms: [ (if_arm cond: [(Sentence child:(DParen child:(ArithVarRef name:opt_stack)) terminator:<Op_Semi ';'>)] action: [ (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(options/stacktrace)} spids: [1400] ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling stack traces (-s). Exiting'))})] spids: [16777215 1405] ) ] spids: [16777215 1415] ) ] spids: [16777215 1389] ) ] spids: [16777215 1417] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(events/kprobes/) ($ VSub_Name '$kname') (/enable)} spids: [1427] ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling kprobe ') ($ VSub_Name '$kname') ('. Exiting.'))})] spids: [16777215 1434] ) ] spids: [16777215 1445] ) (C {(warn)} {(DQ ('echo > trace'))}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_duration)) terminator: <Op_Semi ';'> ) ] action: [ (C {(sleep)} {($ VSub_Name '$duration')}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef name:opt_headers)) terminator: <Op_Semi ';'> ) ] action: [(C {(cat)} {(trace)})] spids: [16777215 1485] ) ] else_action: [(C {(grep)} {(-v)} {(SQ <'^#'>)} {(trace)})] spids: [1493 1507] ) ] spids: [16777215 1467] ) ] else_action: [ (AndOr ops: [Op_DAmp] children: [(DParen child:(ArithVarRef name:opt_headers)) (C {(cat)} {(trace)})] ) (C {(cat)} {(trace_pipe)}) ] spids: [1509 1534] ) (C {(end)}) ] )