(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: [202] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:flock) op: assign_op.Equal rhs: {(/var/tmp/.ftrace-lock)} spids: [205] ) ] ) (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: [208] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:210) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:duration) op: assign_op.Equal rhs: (word.Empty) spids: [212] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:213) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_pid) op: assign_op.Equal rhs: {(0)} spids: [215] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:217) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pid) op: assign_op.Equal rhs: (word.Empty) spids: [219] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:220) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_tid) op: assign_op.Equal rhs: {(0)} spids: [222] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:224) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tid) op: assign_op.Equal rhs: (word.Empty) spids: [226] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:227) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pidtext) op: assign_op.Equal rhs: (word.Empty) spids: [229] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_headers) op: assign_op.Equal rhs: {(0)} spids: [231] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:233) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_proc) op: assign_op.Equal rhs: {(0)} spids: [235] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:237) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_time) op: assign_op.Equal rhs: {(0)} spids: [239] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:241) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_tail) op: assign_op.Equal rhs: {(0)} spids: [243] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:245) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_nodur) op: assign_op.Equal rhs: {(0)} spids: [247] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:249) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_cpu) op: assign_op.Equal rhs: {(0)} spids: [251] ) ] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_max) op: assign_op.Equal rhs: {(0)} spids: [254] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:256) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:max) op: assign_op.Equal rhs: {(0)} spids: [258] ) ] ) ] ) (C {(trap)} {(SQ (Token id:Id.Lit_Chars val:':' span_id:264))} {(INT)} {(QUIT)} {(TERM)} {(PIPE)} {(HUP)} ) (command.ShFunction name: usage body: (command.BraceGroup children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.HereDoc op: (Token id:Id.Redir_DLessDash val:'<<-' span_id:290) fd: -1 here_begin: {(END)} here_end_span_id: 318 stdin_parts: [ ( 'USAGE: funcgraph [-aCDhHPtT] [-m maxdepth] [-p PID] [-L TID] [-d secs] funcstring\n' ) (' -a # all info (same as -HPt)\n') (' -C # measure on-CPU time only\n') (' -d seconds # trace duration, and use buffers\n') (' -D # do not show function duration\n') (' -h # this usage message\n') (' -H # include column headers\n') (' -m maxdepth # max stack depth to show\n') (' -p PID # trace when this pid is on-CPU\n') (' -L TID # trace when this thread is on-CPU\n') (' -P # show process names & PIDs\n') (' -t # show timestamps\n') (' -T # comment function tails\n') (' eg,\n') (' funcgraph do_nanosleep # trace do_nanosleep() and children\n') (' funcgraph -m 3 do_sys_open # trace do_sys_open() to 3 levels only\n') (' funcgraph -a do_sys_open # include timestamps and process name\n') (' funcgraph -p 198 do_sys_open # trace vfs_read() for PID 198 only\n') (' funcgraph -d 1 do_sys_open >out # trace 1 sec, then write to file\n') ('\n') ('See the man page and example file for more info.\n') ] ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:293) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:320) ) ] ) ) (command.ShFunction name: warn body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [(C {(eval)} {(DQ ($ Id.VSub_At '$@'))})] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:341) ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('WARNING: command failed ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:353) ) ($ Id.VSub_At '$@') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:355) ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:348) fd: -1 arg_word: {(2)} ) ] ) ] spids: [332 343] ) ] ) ] ) ) (command.ShFunction name: end body: (command.BraceGroup children: [ (command.Simple words: [{(echo)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:377) fd: 2 arg_word: {(/dev/null)} ) ] ) (command.Simple words: [{(echo)} {(DQ ('Ending tracing...'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:387) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(cd)} {($ Id.VSub_DollarName '$tracing')}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_time span_id:399) ) ) (C {(warn)} {(DQ ('echo nofuncgraph-abstime > trace_options'))}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_proc span_id:415) ) ) (C {(warn)} {(DQ ('echo nofuncgraph-proc > trace_options'))}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_tail span_id:431) ) ) (C {(warn)} {(DQ ('echo nofuncgraph-tail > trace_options'))}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_nodur span_id:447) ) ) (C {(warn)} {(DQ ('echo funcgraph-duration > trace_options'))}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_cpu span_id:463) ) ) (C {(warn)} {(DQ ('echo sleep-time > trace_options'))}) ] ) (C {(warn)} {(DQ ('echo nop > current_tracer'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_pid span_id:487) ) right: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_tid span_id:491) ) ) ) (C {(warn)} {(DQ ('echo > set_ftrace_pid'))}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_max span_id:507) ) ) (C {(warn)} {(DQ ('echo 0 > max_graph_depth'))}) ] ) (C {(warn)} {(DQ ('echo > set_graph_function'))}) (C {(warn)} {(DQ ('echo > trace'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:wroteflock span_id:538) ) ) (C {(warn)} {(DQ ('rm ') ($ Id.VSub_DollarName '$flock'))}) ] ) ] ) ) (command.ShFunction name: die body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:564) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:572) arg_word: {(1)} ) ] ) ) (command.ShFunction name: edie body: (command.BraceGroup children: [ (command.Simple words: [{(echo)} {(DQ ($ Id.VSub_At '$@'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:592) fd: -1 arg_word: {(2)} ) ] ) (command.Simple words: [{(exec)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:602) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:605) fd: 2 arg_word: {(1)} ) ] ) (C {(end)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:612) arg_word: {(1)} ) ] ) ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:622) cond: [ (C {(getopts)} {(aCd) (Id.Lit_Other ':') (DhHm) (Id.Lit_Other ':') (p) (Id.Lit_Other ':') (L) (Id.Lit_Other ':') (PtT) } {(opt)} ) ] body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$opt')} arms: [ (case_arm pat_list: [{(a)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_headers) op: assign_op.Equal rhs: {(1)} spids: [651] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:653) ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_proc) op: assign_op.Equal rhs: {(1)} spids: [655] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:657) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_time) op: assign_op.Equal rhs: {(1)} spids: [659] ) ] ) ] spids: [648 649 662 -1] ) (case_arm pat_list: [{(C)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_cpu) op: assign_op.Equal rhs: {(1)} spids: [668] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:670) ) ] spids: [665 666 672 -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: [678] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:680) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:duration) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [682] ) ] ) ] spids: [675 676 685 -1] ) (case_arm pat_list: [{(D)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_nodur) op: assign_op.Equal rhs: {(1)} spids: [691] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:693) ) ] spids: [688 689 695 -1] ) (case_arm pat_list: [{(m)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_max) op: assign_op.Equal rhs: {(1)} spids: [701] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:703) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:max) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [705] ) ] ) ] spids: [698 699 708 -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: [714] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:716) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pid) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [718] ) ] ) ] spids: [711 712 721 -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: [727] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:729) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tid) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [731] ) ] ) ] spids: [724 725 734 -1] ) (case_arm pat_list: [{(H)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_headers) op: assign_op.Equal rhs: {(1)} spids: [740] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:742) ) ] spids: [737 738 744 -1] ) (case_arm pat_list: [{(P)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_proc) op: assign_op.Equal rhs: {(1)} spids: [750] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:752) ) ] spids: [747 748 754 -1] ) (case_arm pat_list: [{(t)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_time) op: assign_op.Equal rhs: {(1)} spids: [760] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:762) ) ] spids: [757 758 764 -1] ) (case_arm pat_list: [{(T)}] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:opt_tail) op: assign_op.Equal rhs: {(1)} spids: [770] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:772) ) ] spids: [767 768 774 -1] ) (case_arm pat_list: [{(h)} {(Id.Lit_QMark '?')}] action: [(C {(usage)})] spids: [777 780 784 -1] ) ] ) ] ) ) (C {(shift)} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$OPTIND')}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)}) ) ) } ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_Pound '$#')}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) (C {(usage)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:opt_pid span_id:825)) right: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:opt_tid span_id:829)) ) ) (C {(edie)} {(DQ ('ERROR: You can use -p or -L but not both.'))}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:funcs) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [842] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:opt_pid span_id:849)) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pidtext) op: assign_op.Equal rhs: {(DQ (' for PID ') ($ Id.VSub_DollarName '$pid'))} spids: [856] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token:(Token id:Id.Lit_ArithVarLike val:opt_tid span_id:864)) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pidtext) op: assign_op.Equal rhs: {(DQ (' for TID ') ($ Id.VSub_DollarName '$tid'))} spids: [871] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_duration span_id:881) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:885) ) ] action: [ (C {(echo)} { (DQ ('Tracing ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:894) ) ($ Id.VSub_DollarName '$funcs') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:896) ) ($ Id.VSub_DollarName '$pidtext') (' for ') ($ Id.VSub_DollarName '$duration') (' seconds...') ) } ) ] spids: [877 887] ) ] else_action: [ (C {(echo)} { (DQ ('Tracing ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:910) ) ($ Id.VSub_DollarName '$funcs') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:912) ) ($ Id.VSub_DollarName '$pidtext') ('... Ctrl-C to end.') ) } ) ] ) (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)') ) } ) ] ) (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: (Token id:Id.Left_DollarParen val:'$(' span_id:954) command_list: (command.CommandList children: [(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.Redir op: (Token id:Id.Redir_Great val:'>' span_id:967) fd: -1 arg_word: {($ Id.VSub_DollarName '$flock')} ) ] ) (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: [981] ) ] ) (C {(sysctl)} {(-q)} {(kernel.ftrace_enabled) (Id.Lit_Equals '=') (1)}) (command.Simple words: [{(read)} {(mode)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:1003) fd: -1 arg_word: {(current_tracer)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$mode'))} right: {(DQ (nop))} ) ) (C {(edie)} {(DQ ('ERROR: ftrace active (current_tracer=') ($ Id.VSub_DollarName '$mode') (')'))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_max span_id:1035) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1039) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {($ Id.VSub_DollarName '$max')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1052) fd: -1 arg_word: {(max_graph_depth)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1055) ) ] action: [ (C {(edie)} { (DQ ('ERROR: setting -m ') ($ Id.VSub_DollarName '$max') ('. Older kernel version? Exiting.') ) } ) ] spids: [1044 1057] ) ] ) ] spids: [1031 1041] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_pid span_id:1077) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1081) ) ] action: [ (command.Simple words: [{(echo)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1088) fd: -1 arg_word: {(set_ftrace_pid)} ) ] ) (command.ForEach iter_name: tid iter_words: [{(/proc/) ($ Id.VSub_DollarName '$pid') (/task/) (Id.Lit_Star '*')}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [ {(echo)} { (braced_var_sub token: (Token id:Id.VSub_Name val:tid span_id:1119) suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {('*') (Id.Lit_Slash /)} ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:1125) fd: -1 arg_word: {(set_ftrace_pid)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1128) ) ] action: [ (C {(edie)} { (DQ ('ERROR: setting -p ') ($ Id.VSub_DollarName '$pid') (' (PID exist?). Exiting.') ) } ) ] spids: [1112 1130] ) ] ) ] ) ) ] spids: [1073 1083] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_tid span_id:1153) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1157) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {($ Id.VSub_DollarName '$tid')}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1170) fd: -1 arg_word: {(set_ftrace_pid)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1173) ) ] action: [ (C {(edie)} { (DQ ('ERROR: setting -L ') ($ Id.VSub_DollarName '$tid') (' (TID exist?). Exiting.') ) } ) ] spids: [1162 1175] ) ] ) ] spids: [1149 1159] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1197) fd: -1 arg_word: {(set_ftrace_filter)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1200) ) ] action: [(C {(edie)} {(DQ ('ERROR: writing to set_ftrace_filter. Exiting.'))})] spids: [1191 1202] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(DQ ($ Id.VSub_DollarName '$funcs'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1223) fd: -1 arg_word: {(set_graph_function)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1226) ) ] action: [ (C {(edie)} { (DQ ('ERROR: enabling ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:1235) ) ($ Id.VSub_DollarName '$funcs') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:1237) ) ('. Exiting.') ) } ) ] spids: [1213 1228] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(function_graph)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1251) fd: -1 arg_word: {(current_tracer)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1254) ) ] action: [ (C {(edie)} { (DQ ('ERROR: setting current_tracer to ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:1263) ) (function) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:1265)) ('. Exiting.') ) } ) ] spids: [1243 1256] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_cpu span_id:1275) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1279) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(nosleep-time)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1292) fd: -1 arg_word: {(trace_options)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1295) ) ] action: [(C {(edie)} {(DQ ('ERROR: setting -C (nosleep-time). Exiting.'))})] spids: [1284 1297] ) ] ) ] spids: [1271 1281] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_time span_id:1318) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1322) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(funcgraph-abstime)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1335) fd: -1 arg_word: {(trace_options)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1338) ) ] action: [(C {(edie)} {(DQ ('ERROR: setting -t (funcgraph-abstime). Exiting.'))})] spids: [1327 1340] ) ] ) ] spids: [1314 1324] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_proc span_id:1358) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1362) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(funcgraph-proc)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1375) fd: -1 arg_word: {(trace_options)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1378) ) ] action: [(C {(edie)} {(DQ ('ERROR: setting -P (funcgraph-proc). Exiting.'))})] spids: [1367 1380] ) ] ) ] spids: [1354 1364] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_tail span_id:1398) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1402) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(funcgraph-tail)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1415) fd: -1 arg_word: {(trace_options)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1418) ) ] action: [ (C {(edie)} {(DQ ('ERROR: setting -T (funcgraph-tail). Old kernel? Exiting.'))}) ] spids: [1407 1420] ) ] ) ] spids: [1394 1404] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_nodur span_id:1438) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1442) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple words: [{(echo)} {(nofuncgraph-duration)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1455) fd: -1 arg_word: {(trace_options)} ) ] ) ] negated: T ) terminator: (Token id:Id.Op_Semi val:';' span_id:1458) ) ] action: [(C {(edie)} {(DQ ('ERROR: setting -D (nofuncgraph-duration). Exiting.'))})] spids: [1447 1460] ) ] ) ] spids: [1434 1444] ) ] ) (C {(warn)} {(DQ ('echo > trace'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_duration span_id:1488) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1492) ) ] action: [ (C {(sleep)} {($ Id.VSub_DollarName '$duration')}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_headers span_id:1506) ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:1510) ) ] action: [(C {(cat)} {(trace)})] spids: [1502 1512] ) ] else_action: [ (C {(grep)} {(-v)} {(SQ (Token id:Id.Lit_Chars val:'^#' span_id:1528))} {(trace)}) ] ) ] spids: [1484 1494] ) ] else_action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.VarRef token: (Token id:Id.Lit_ArithVarLike val:opt_headers span_id:1545) ) ) (C {(cat)} {(trace)}) ] ) (C {(cat)} {(trace_pipe)}) ] ) (C {(end)}) ] )