(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tracing) op: assign_op.Equal rhs: {<'/sys/kernel/debug/tracing'>} spids: [148] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:flock) op: assign_op.Equal rhs: {<'/var/tmp/.ftrace-lock'>} spids: [151] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wroteflock) op: assign_op.Equal rhs: {<0>} spids: [155] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_duration) op: assign_op.Equal rhs: {<0>} spids: [158] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:duration) op: assign_op.Equal rhs: (word.Empty) spids: [162] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_pid) op: assign_op.Equal rhs: {<0>} spids: [165] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pid) op: assign_op.Equal rhs: (word.Empty) spids: [169] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_tid) op: assign_op.Equal rhs: {<0>} spids: [172] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tid) op: assign_op.Equal rhs: (word.Empty) spids: [176] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_filter) op: assign_op.Equal rhs: {<0>} spids: [178] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filter) op: assign_op.Equal rhs: (word.Empty) spids: [182] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_view) op: assign_op.Equal rhs: {<0>} spids: [185] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_headers) op: assign_op.Equal rhs: {<0>} spids: [189] ) ] ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_stack) op: assign_op.Equal rhs: {<0>} spids: [193] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dmesg) op: assign_op.Equal rhs: {<2>} spids: [197] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:debug) op: assign_op.Equal rhs: {<0>} spids: [200] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_force) op: assign_op.Equal rhs: {<0>} spids: [204] ) ] ) ] ) (C {<trap>} {(SQ <':'>)} {<INT>} {<QUIT>} {<TERM>} {<PIPE>} {<HUP>}) (command.ShFunction name: usage body: (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLessDash '<<-'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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 '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'retval\'\n'> <' # trace open() return value\n'> <' kprobe \'r:myopen do_sys_open '> (word_part.EscapedLiteral token: <Id.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 ~ '> <Id.Right_DoubleQuote '"'> <'*stat'> <Id.Right_DoubleQuote '"'> <'\'\n'> <' # opened files ending in '> <Id.Right_DoubleQuote '"'> <stat> <Id.Right_DoubleQuote '"'> <'\n'> <'\n'> <'See the man page and example file for more info.\n'> ] ) ) (redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>}) ] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] ) ) (command.ShFunction name: warn body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [(C {<eval>} {(DQ ($ Id.VSub_At '$@'))})] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'WARNING: command failed '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) ($ Id.VSub_At '$@') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] spids: [300 311] ) ] ) ] ) ) (command.ShFunction name: end body: (BraceGroup children: [ (command.Simple words: [{<echo>}] redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'Ending tracing...'>)}] redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})] do_fork: T ) (C {<cd>} {($ Id.VSub_DollarName '$tracing')}) (C {<warn>} {(DQ <'echo 0 > events/kprobes/'> ($ Id.VSub_DollarName '$kname') <'/enable'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_filter>) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<warn>} {(DQ <'echo 0 > events/kprobes/'> ($ Id.VSub_DollarName '$kname') <'/filter'>)} ) ] spids: [373 383] ) ] ) (C {<warn>} {(DQ <'echo -:'> ($ Id.VSub_DollarName '$kname') <' >> kprobe_events'>)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child:<Id.Lit_ArithVarLike opt_stack>) (C {<warn>} {(DQ <'echo 0 > options/stacktrace'>)}) ] ) (C {<warn>} {(DQ <'echo > trace'>)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child:<Id.Lit_ArithVarLike wroteflock>) (C {<warn>} {(DQ <'rm '> ($ Id.VSub_DollarName '$flock'))}) ] ) ] ) ) (command.ShFunction name: die body: (BraceGroup children: [ (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: edie body: (BraceGroup children: [ (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_At '$@'))}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<exec>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>}) ] do_fork: T ) (C {<end>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (C {<getopts>} {<Fd> <Id.Lit_Colon ':'> <hHp> <Id.Lit_Colon ':'> <L> <Id.Lit_Colon ':'> <sv>} {<opt>} ) ] ) body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$opt')} arms: [ (case_arm pat_list: [{<F>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_force) op: assign_op.Equal rhs: {<1>} spids: [543] ) ] ) ] spids: [540 541 546 -1] ) (case_arm pat_list: [{<d>}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_duration) op: assign_op.Equal rhs: {<1>} spids: [552] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:duration) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [556] ) ] ) ] spids: [549 550 559 -1] ) (case_arm pat_list: [{<p>}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_pid) op: assign_op.Equal rhs: {<1>} spids: [565] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pid) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [569] ) ] ) ] spids: [562 563 572 -1] ) (case_arm pat_list: [{<L>}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_tid) op: assign_op.Equal rhs: {<1>} spids: [578] ) ] ) terminator: <Id.Op_Semi _> ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tid) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [582] ) ] ) ] spids: [575 576 585 -1] ) (case_arm pat_list: [{<H>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_headers) op: assign_op.Equal rhs: {<1>} spids: [591] ) ] ) ] spids: [588 589 594 -1] ) (case_arm pat_list: [{<s>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_stack) op: assign_op.Equal rhs: {<1>} spids: [600] ) ] ) ] spids: [597 598 603 -1] ) (case_arm pat_list: [{<v>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_view) op: assign_op.Equal rhs: {<1>} spids: [609] ) ] ) ] spids: [606 607 612 -1] ) (case_arm pat_list: [{<h>} {<Id.Lit_QMark '?'>}] action: [(C {<usage>})] spids: [615 618 622 -1] ) ] ) ] ) ) (C {<shift>} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {($ Id.VSub_DollarName '$OPTIND')} right: {<Id.Lit_Digits 1>} ) ) } ) (command.AndOr ops: [Id.Op_DPipe] children: [(command.DParen child:{($ Id.VSub_Pound '$#')}) (C {<usage>})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:kprobe) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [653] ) ] ) (C {<shift>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:{($ Id.VSub_Pound '$#')}) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_filter) op: assign_op.Equal rhs: {<1>} spids: [671] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filter) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [675] ) ] ) ] spids: [658 668] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike opt_pid> right: <Id.Lit_ArithVarLike opt_filter> ) right: <Id.Lit_ArithVarLike opt_tid> ) right: {<Id.Lit_Digits 1>} ) ) (C {<die>} {(DQ <'ERROR: use at most one of -p, -L, or filter.'>)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: <Id.Lit_ArithVarLike opt_duration> right: <Id.Lit_ArithVarLike opt_view> ) ) (C {<die>} {(DQ <'ERROR: use either -d or -v.'>)}) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_pid>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_filter) op: assign_op.Equal rhs: {<1>} spids: [749] ) ] ) (command.ForEach iter_names: [tid] iterable: (for_iter.Words words: [{<'/proc/'> ($ Id.VSub_DollarName '$pid') <'/task/'> <Id.Lit_Star '*'>}] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filter) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$filter') <' || common_pid == '> (braced_var_sub token: <Id.VSub_Name tid> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPound '##'> arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>} ) ) ) } spids: [772] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filter) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name filter> suffix_op: (suffix_op.Slice begin:{<Id.Lit_Digits 3>}) ) } spids: [788] ) ] ) ] spids: [732 742] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_tid>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_filter) op: assign_op.Equal rhs: {<1>} spids: [813] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:filter) op: assign_op.Equal rhs: {(DQ <'common_pid == '> ($ Id.VSub_DollarName '$tid'))} spids: [817] ) ] ) ] spids: [800 810] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalAnd left: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$kprobe'))} right: {<p> <Id.Lit_Colon ':'> <Id.Lit_Other '*'>} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$kprobe'))} right: {<r> <Id.Lit_Colon ':'> <Id.Lit_Other '*'>} ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'ERROR: invalid kprobe definition (should start with p: or r:)'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (C {<usage>}) ] spids: [825 854] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:krest) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name kprobe> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: {<Id.Lit_Other '*'> <':'>} ) ) } spids: [907] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:kname) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name krest> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) } spids: [915] ) ] ) (C {<set>} {<-->} {($ Id.VSub_DollarName '$krest')}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$2')} right: {(DQ )} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$2')} right: {<Id.Lit_Other '*'> <Id.Lit_Other '['> <Id.BoolBinary_GlobEqual '='> <Id.Lit_Other '%'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\$'>) <Id.Lit_Other ']'> <Id.Lit_Other '*'> } ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ktype) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name kprobe> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {<':'> <Id.Lit_Other '*'>} ) ) } spids: [964] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:kprobe) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$ktype') <':'> ($ Id.VSub_DollarName '$kname') <' '> ($ Id.VSub_DollarName '$krest') ) } spids: [973] ) ] ) ] spids: [929 957] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike debug>) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'kname: '> ($ Id.VSub_DollarName '$kname') <', kprobe: '> ($ Id.VSub_DollarName '$kprobe') ) } ) ] spids: [984 994] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<cd>} {($ Id.VSub_DollarName '$tracing')}) (C {<die>} { (DQ <'ERROR: accessing tracing. Root user? Kernel has FTRACE?\n'> <' debugfs mounted? (mount -t debugfs debugfs /sys/kernel/debug)'> ) } ) ] ) (C {<set>} {<-->} {($ Id.VSub_DollarName '$kprobe')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [1035] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: <Id.Lit_ArithVarLike opt_force> ) ) (command.Pipeline children: [ (command.Simple words: [ {<grep>} {<-w>} {($ Id.VSub_DollarName '$fname')} {<available_filter_functions>} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ] negated: T ) ] ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'ERROR: func '> ($ Id.VSub_DollarName '$fname') <' not in '> ($ Id.VSub_DollarName '$PWD') <'/available_filter_functions.'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<printf>} {(DQ <'Either it doesn\'t exist, or, it might be unsafe to kprobe. '>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'Exiting. Use -F to override.'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [1038 1068] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: <Id.Lit_ArithVarLike opt_view> ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_duration>) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'Tracing kprobe '> ($ Id.VSub_DollarName '$kname') <' for '> ($ Id.VSub_DollarName '$duration') <' seconds (buffered)...'> ) } ) ] spids: [1126 1136] ) ] else_action: [ (C {<echo>} {(DQ <'Tracing kprobe '> ($ Id.VSub_DollarName '$kname') <'. Ctrl-C to end.'>)} ) ] ) ] spids: [1112 1123] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_e child:{($ Id.VSub_DollarName '$flock')}) ) (C {<die>} { (DQ <'ERROR: ftrace may be in use by PID '> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cat>} {($ Id.VSub_DollarName '$flock')}) ) <' '> ($ Id.VSub_DollarName '$flock') ) } ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<echo>} {($ Id.VSub_Dollar '$$')}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$flock')} ) ] do_fork: T ) (C {<die>} {(DQ <'ERROR: unable to write '> ($ Id.VSub_DollarName '$flock') <.>)}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wroteflock) op: assign_op.Equal rhs: {<1>} spids: [1211] ) ] ) (command.Simple words: [{<echo>} {<nop>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<current_tracer>})] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$kprobe'))}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<kprobe_events>} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'ERROR: adding kprobe '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ($ Id.VSub_DollarName '$kprobe') (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <.> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike dmesg>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'Last '> ($ Id.VSub_DollarName '$dmesg') <' dmesg entries (might contain reason):'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.Pipeline children: [ (C {<dmesg>}) (C {<tail>} {<-> ($ Id.VSub_DollarName '$dmesg')}) (C {<sed>} {(SQ <'s/^/ /'>)}) ] negated: F ) ] spids: [1258 1268] ) ] ) (C {<edie>} {(DQ <Exiting.>)}) ] spids: [1226 1241] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_view>) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<cat>} {<'events/kprobes/'> ($ Id.VSub_DollarName '$kname') <'/format'>}) (C {<edie>} {(DQ )}) ] spids: [1312 1322] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_filter>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{<echo>} {(DQ ($ Id.VSub_DollarName '$filter'))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'events/kprobes/'> ($ Id.VSub_DollarName '$kname') <'/filter'> } ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<edie>} {(DQ <'ERROR: setting filter or -p. Exiting.'>)})] spids: [1352 1369] ) ] ) ] spids: [1339 1349] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_stack>) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{<echo>} {<1>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'options/stacktrace'>} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<edie>} {(DQ <'ERROR: enabling stack traces (-s). Exiting'>)})] spids: [1396 1409] ) ] ) ] spids: [1383 1393] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{<echo>} {<1>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'events/kprobes/'> ($ Id.VSub_DollarName '$kname') <'/enable'>} ) ] do_fork: T ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<edie>} {(DQ <'ERROR: enabling kprobe '> ($ Id.VSub_DollarName '$kname') <'. Exiting.'>)} ) ] spids: [1423 1438] ) ] ) (C {<warn>} {(DQ <'echo > trace'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_duration>) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sleep>} {($ Id.VSub_DollarName '$duration')}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child:<Id.Lit_ArithVarLike opt_headers>) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<cat>} {<trace>})] spids: [1479 1489] ) ] else_action: [(C {<grep>} {<-v>} {(SQ <'^#'>)} {<trace>})] ) ] spids: [1461 1471] ) ] else_action: [ (command.AndOr ops: [Id.Op_DAmp] children: [(command.DParen child:<Id.Lit_ArithVarLike opt_headers>) (C {<cat>} {<trace>})] ) (C {<cat>} {<trace_pipe>}) ] ) (C {<end>}) ] )