(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tracing spids:[142]) op: Equal rhs: {(/sys/kernel/debug/tracing)} spids: [142] ) ] spids: [142] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flock spids:[145]) op: Equal rhs: {(/var/tmp/.ftrace-lock)} spids: [145] ) ] spids: [145] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:wroteflock spids:[149]) op: Equal rhs: {(0)} spids: [149] ) ] spids: [149] ) ] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_duration spids:[152]) op: Equal rhs: {(0)} spids: [152] ) ] spids: [152] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration spids:[156]) op: Equal rhs: (EmptyWord) spids: [156] ) ] spids: [156] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_name spids:[159]) op: Equal rhs: {(0)} spids: [159] ) ] spids: [159] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name spids:[163]) op: Equal rhs: (EmptyWord) spids: [163] ) ] spids: [163] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_pid spids:[166]) op: Equal rhs: {(0)} spids: [166] ) ] spids: [166] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid spids:[170]) op: Equal rhs: (EmptyWord) spids: [170] ) ] spids: [170] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_tid spids:[173]) op: Equal rhs: {(0)} spids: [173] ) ] spids: [173] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tid spids:[177]) op: Equal rhs: (EmptyWord) spids: [177] ) ] spids: [177] ) ] ) (CommandList children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[179]) op: Equal rhs: (EmptyWord) spids: [179] ) ] spids: [179] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_time spids:[182]) op: Equal rhs: {(0)} spids: [182] ) ] spids: [182] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_fail spids:[186]) op: Equal rhs: {(0)} spids: [186] ) ] spids: [186] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_file spids:[190]) op: Equal rhs: {(0)} spids: [190] ) ] spids: [190] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:file spids:[194]) op: Equal rhs: (EmptyWord) spids: [194] ) ] spids: [194] ) ] ) (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: 259 stdin_parts: [ ('USAGE: opensnoop [-htx] [-d secs] [-p PID] [-L TID] [-n name] [filename]\n') (' -d seconds # trace duration, and use buffers\n') (' -n name # process name to match on open\n') (' -p PID # PID to match on open\n') (' -L TID # PID to match on open\n') (' -t # include time (seconds)\n') (' -x # only show failed opens\n') (' -h # this usage message\n') (' filename # match filename (partials, REs, ok)\n') (' eg,\n') (' opensnoop # watch open()s live (unbuffered)\n') (' opensnoop -d 1 # trace 1 sec (buffered)\n') (' opensnoop -p 181 # trace I/O issued by PID 181 only\n') (' opensnoop conf # trace filenames containing ') (Right_DoubleQuote '"') (conf) (Right_DoubleQuote '"') ('\n') (" opensnoop 'log") (Lit_Other '$') ("' # filenames ending in ") (Right_DoubleQuote '"') (log) (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: [220] ) spids: [216 219] ) (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 284] ) ] spids: [16777215 300] ) ] spids: [270] ) spids: [266 269] ) (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/getnameprobe/enable'))}) (C {(warn)} {(DQ ('echo 0 > events/syscalls/sys_exit_open/enable'))}) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DPipe left: (ArithVarRef token:<Lit_ArithVarLike opt_pid>) right: (ArithVarRef token:<Lit_ArithVarLike opt_tid>) ) spids: [353 362] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(warn)} {(DQ ('echo 0 > events/kprobes/getnameprobe/filter'))}) (C {(warn)} {(DQ ('echo 0 > events/syscalls/sys_exit_open/filter'))}) ] spids: [16777215 365] ) ] spids: [16777215 382] ) (C {(warn)} {(DQ ('echo -:getnameprobe >> kprobe_events'))}) (C {(warn)} {(DQ ('echo > trace'))}) (AndOr ops: [Op_DAmp] children: [ (DParen child: (ArithVarRef token:<Lit_ArithVarLike wroteflock>) spids: [399 404] ) (C {(warn)} {(DQ ('rm ') ($ VSub_Name '$flock'))}) ] ) ] spids: [309] ) spids: [305 308] ) (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: [422] ) spids: [418 421] ) (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: [446] ) spids: [442 445] ) (WhileUntil keyword: <KW_While while> cond: [ (C {(getopts)} {(d) (Lit_Other ':') (hn) (Lit_Other ':') (p) (Lit_Other ':') (L) (Lit_Other ':') (tx)} {(opt)} ) ] body: (DoGroup children: [ (Case to_match: {($ VSub_Name '$opt')} arms: [ (case_arm pat_list: [{(d)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_duration spids:[514]) op: Equal rhs: {(1)} spids: [514] ) ] spids: [514] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:duration spids:[518]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [518] ) ] spids: [518] ) ] spids: [511 512 521 16777215] ) (case_arm pat_list: [{(n)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_name spids:[527]) op: Equal rhs: {(1)} spids: [527] ) ] spids: [527] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:name spids:[531]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [531] ) ] spids: [531] ) ] spids: [524 525 534 16777215] ) (case_arm pat_list: [{(p)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_pid spids:[540]) op: Equal rhs: {(1)} spids: [540] ) ] spids: [540] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid spids:[544]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [544] ) ] spids: [544] ) ] spids: [537 538 547 16777215] ) (case_arm pat_list: [{(L)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_tid spids:[553]) op: Equal rhs: {(1)} spids: [553] ) ] spids: [553] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:tid spids:[557]) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [557] ) ] spids: [557] ) ] spids: [550 551 560 16777215] ) (case_arm pat_list: [{(t)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_time spids:[566]) op: Equal rhs: {(1)} spids: [566] ) ] spids: [566] ) ] spids: [563 564 569 16777215] ) (case_arm pat_list: [{(x)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_fail spids:[575]) op: Equal rhs: {(1)} spids: [575] ) ] spids: [575] ) ] spids: [572 573 578 16777215] ) (case_arm pat_list: [{(h)} {(Lit_Other '?')}] action: [(C {(usage)})] spids: [581 584 588 16777215] ) ] spids: [504 508 591] ) ] spids: [501 593] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [597 606] ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithWord w:{($ VSub_Pound '$#')}) spids:[610 615]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:opt_file spids:[621]) op: Equal rhs: {(1)} spids: [621] ) ] spids: [621] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:file spids:[625]) op: Equal rhs: {($ VSub_Number '$1')} spids: [625] ) ] spids: [625] ) (C {(shift)}) ] spids: [16777215 618] ) ] spids: [16777215 631] ) (AndOr ops: [Op_DAmp] children: [(DParen child:(ArithWord w:{($ VSub_Pound '$#')}) spids:[633 638]) (C {(usage)})] ) (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 token:<Lit_ArithVarLike opt_pid>) right: (ArithVarRef token:<Lit_ArithVarLike opt_name>) ) right: (ArithVarRef token:<Lit_ArithVarLike opt_tid>) ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [648 665] ) (C {(die)} {(DQ ('ERROR: use at most one of -p, -n, -L.'))}) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_pid>) spids:[677 682]) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[686]) op: Equal rhs: {(DQ (' issued by PID ') ($ VSub_Name '$pid'))} spids: [686] ) ] spids: [686] ) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_tid>) spids:[692 697]) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[701]) op: Equal rhs: {(DQ (' issued by TID ') ($ VSub_Name '$tid'))} spids: [701] ) ] spids: [701] ) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_name>) spids:[707 712]) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[716]) op: Equal rhs: { (DQ (' issued by process name ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$name') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } spids: [716] ) ] spids: [716] ) ] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_file>) spids:[724 729]) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ftext spids:[733]) op: Equal rhs: { (DQ ($ VSub_Name '$ftext') (' for filenames containing ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ($ VSub_Name '$file') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) ) } spids: [733] ) ] spids: [733] ) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithVarRef token:<Lit_ArithVarLike opt_duration>) spids: [744 749] ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} { (DQ ('Tracing open()s') ($ VSub_Name '$ftext') (' for ') ($ VSub_Name '$duration') (' seconds (buffered)...') ) } ) ] spids: [16777215 752] ) ] else_action: [(C {(echo)} {(DQ ('Tracing open()s') ($ VSub_Name '$ftext') ('. Ctrl-C to end.'))})] spids: [765 776] ) (AndOr ops: [Op_DAmp Op_DPipe] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_duration>) spids:[782 787]) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:use spids:[791]) op:Equal rhs:{(mawk)} spids:[791])] spids: [791] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:use spids:[796]) op:Equal rhs:{(gawk)} spids:[796])] spids: [796] ) ] ) (AndOr ops: [Op_DAmp Op_DPipe] children: [ (DBracket expr:(BoolUnary op_id:BoolUnary_x child:{(/usr/bin/) ($ VSub_Name '$use')})) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:awk spids:[813]) op: Equal rhs: {($ VSub_Name '$use')} spids: [813] ) ] spids: [813] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:awk spids:[818]) op:Equal rhs:{(awk)} spids:[818])] spids: [818] ) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(cd)} {($ VSub_Name '$tracing')}) (C {(die)} { (DQ ('ERROR: accessing tracing. Root user? Kernel has FTRACE?\n') (' debugfs mounted? (mount -t debugfs debugfs /sys/kernel/debug)') ) } ) ] ) (AndOr ops: [Op_DAmp] children: [ (DBracket expr:(BoolUnary op_id:BoolUnary_e child:{($ VSub_Name '$flock')})) (C {(die)} { (DQ ('ERROR: ftrace may be in use by PID ') (CommandSubPart command_list: (CommandList children:[(C {(cat)} {($ VSub_Name '$flock')})]) left_token: <Left_CommandSub '$('> spids: [856 860] ) (' ') ($ 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 spids:[883]) op:Equal rhs:{(1)} spids:[883])] spids: [883] ) (SimpleCommand words: [{(echo)} {(nop)}] redirects: [(Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(current_tracer)})] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ver spids:[898]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-r)})]) left_token: <Left_CommandSub '$('> spids: [899 903] ) } spids: [898] ) ] spids: [898] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalOr left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$ver'))} right: {(2.) (Lit_Other '*')} ) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name '$ver'))} right: {(3.) (Lit_Other '[') (1-6) (Lit_Other ']') (.) (Lit_Other '*')} ) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:kprobe spids:[943]) op: Equal rhs: {(SQ <'r:getnameprobe getname +0($retval):string'>)} spids: [943] ) ] spids: [943] ) ] spids: [16777215 936] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:kprobe spids:[955]) op: Equal rhs: {(SQ <'r:getnameprobe getname +0(+0($retval)):string'>)} spids: [955] ) ] spids: [955] ) ] spids: [948 960] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {($ VSub_Name '$kprobe')}] redirects: [(Redir op:<Redir_DGreat '>>'> fd:16777215 arg_word:{(kprobe_events)})] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: adding a kprobe for getname(). Exiting.'))})] spids: [16777215 975] ) ] spids: [16777215 984] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_pid>) spids:[988 993]) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter spids:[999]) op: Equal rhs: (EmptyWord) spids: [999] ) ] spids: [999] ) (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 spids:[1017]) 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: [1021 1026] ) ) } spids: [1017] ) ] spids: [1017] ) ] spids: [1014 1030] ) spids: [1007 1012] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:filter spids:[1033]) op: Equal rhs: { (BracedVarSub token: <VSub_Name filter> suffix_op: (Slice begin:(ArithWord w:{(Lit_Digits 3)})) spids: [1034 1038] ) } spids: [1033] ) ] spids: [1033] ) (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [ (SimpleCommand words: [{(echo)} {($ VSub_Name '$filter')}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/kprobes/getnameprobe/filter)} ) ] ) ] negated: T ) (Pipeline children: [ (SimpleCommand words: [{(echo)} {($ VSub_Name '$filter')}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/syscalls/sys_exit_open/filter)} ) ] ) ] negated: T ) ] ) ] action: [ (C {(edie)} {(DQ ('ERROR: setting -p ') ($ VSub_Name '$pid') ('. Exiting.'))}) ] spids: [16777215 1071] ) ] spids: [16777215 1083] ) ] spids: [16777215 996] ) ] spids: [16777215 1085] ) (If arms: [ (if_arm cond: [ (Sentence child: (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_tid>) spids:[1089 1094]) terminator: <Op_Semi ';'> ) ] action: [ (If arms: [ (if_arm cond: [ (AndOr ops: [Op_DPipe] children: [ (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ('common_pid == ') ($ VSub_Name '$tid'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/kprobes/getnameprobe/filter)} ) ] ) ] negated: T ) (Pipeline children: [ (SimpleCommand words: [{(echo)} {(DQ ('common_pid == ') ($ VSub_Name '$tid'))}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/syscalls/sys_exit_open/filter)} ) ] ) ] negated: T ) ] ) ] action: [ (C {(edie)} {(DQ ('ERROR: setting -L ') ($ VSub_Name '$tid') ('. Exiting.'))}) ] spids: [16777215 1133] ) ] spids: [16777215 1145] ) ] spids: [16777215 1097] ) ] spids: [16777215 1147] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/kprobes/getnameprobe/enable)} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling kprobe for getname(). Exiting.'))})] spids: [16777215 1162] ) ] spids: [16777215 1171] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(events/syscalls/sys_exit_open/enable)} ) ] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [(C {(edie)} {(DQ ('ERROR: enabling open() exit tracepoint. Exiting.'))})] spids: [16777215 1186] ) ] spids: [16777215 1195] ) (AndOr ops: [Op_DAmp] children: [ (DParen child:(ArithVarRef token:<Lit_ArithVarLike opt_time>) spids:[1197 1202]) (C {(printf)} {(DQ ('%-16s '))} {(DQ (TIMEs))}) ] ) (C {(printf)} {(DQ ('%-16.16s %-6s %4s %s') (Lit_Other '\\') (n))} {(DQ (COMM))} {(DQ (PID))} {(DQ (FD))} {(DQ (FILE))} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:offset spids:[1262]) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {($ VSub_Name '$awk')} { (SQ <'BEGIN { o = 0; }\n'> <'\t$1 == "#" && $2 ~ /TASK/ && NF == 6 { o = 1; }\n'> <'\t$2 ~ /TASK/ { print o; exit }'> ) } {(trace)} ) ] ) left_token: <Left_CommandSub '$('> spids: [1263 1273] ) } spids: [1262] ) ] spids: [1262] ) (C {(warn)} {(DQ ('echo > trace'))}) (Pipeline children: [ (Subshell child: (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithVarRef token:<Lit_ArithVarLike opt_duration>) spids: [1289 1294] ) terminator: <Op_Semi ';'> ) ] action: [(C {(sleep)} {($ VSub_Name '$duration')}) (C {(cat)} {(trace)})] spids: [16777215 1297] ) ] else_action: [(C {(cat)} {(trace_pipe)})] spids: [1313 1324] ) spids: [1285 1326] ) (C {($ VSub_Name '$awk')} {(-v)} {(Lit_VarLike 'o=') ($ VSub_Name '$offset')} {(-v)} {(Lit_VarLike 'opt_name=') ($ VSub_Name '$opt_name')} {(-v)} {(Lit_VarLike 'name=') ($ VSub_Name '$name')} {(-v)} {(Lit_VarLike 'opt_duration=') ($ VSub_Name '$opt_duration')} {(-v)} {(Lit_VarLike 'opt_time=') ($ VSub_Name '$opt_time')} {(-v)} {(Lit_VarLike 'opt_fail=') ($ VSub_Name '$opt_fail')} {(-v)} {(Lit_VarLike 'opt_file=') ($ VSub_Name '$opt_file')} {(-v)} {(Lit_VarLike 'file=') ($ VSub_Name '$file')} { (SQ <'\n'> <'\t# common fields\n'> <'\t$1 != "#" {\n'> <'\t\t# task name can contain dashes and space\n'> <'\t\tsplit($0, line, "-")\n'> <'\t\tsub(/^[ \\t\\r\\n]+/, "", line[1])\n'> <'\t\tcomm = line[1]\n'> <'\t\tif (opt_name && match(comm, name) == 0)\n'> <'\t\t\tnext\n'> <'\t\tsub(/ .*$/, "", line[2])\n'> <'\t\tpid = line[2]\n'> <'\t}\n'> <'\n'> <'\t# do_sys_open()\n'> <'\t$1 != "#" && $(5+o) ~ /do_sys_open/ {\n'> <'\t\t#\n'> <'\t\t# eg: ... (do_sys_open+0xc3/0x220 <- getname) arg1="file1"\n'> <'\t\t#\n'> <'\t\tfilename = $NF\n'> <'\t\tsub(/"$/, "", filename)\n'> <'\t\tsub(/.*"/, "", filename)\n'> <'\t\tlastfile[pid] = filename\n'> <'\t}\n'> <'\n'> <'\t# sys_open()\n'> <'\t$1 != "#" && $(4+o) == "sys_open" {\n'> <'\t\tfilename = lastfile[pid]\n'> <'\t\tdelete lastfile[pid]\n'> <'\t\tif (opt_file && filename !~ file)\n'> <'\t\t\tnext\n'> <'\t\trval = $NF\n'> <'\t\t# matched failed as beginning with 0xfffff\n'> <'\t\tif (opt_fail && rval !~ /0xfffff/)\n'> <'\t\t\tnext\n'> <'\t\tif (rval ~ /0xfffff/)\n'> <'\t\t\trval = -1\n'> <'\n'> <'\t\tif (opt_time) {\n'> <'\t\t\ttime = $(3+o); sub(":", "", time)\n'> <'\t\t\tprintf "%-16s ", time\n'> <'\t\t}\n'> <'\t\tprintf "%-16.16s %-6s %4s %s\\n", comm, pid, rval, filename\n'> <'\t}\n'> <'\n'> <'\t$0 ~ /LOST.*EVENTS/ { print "WARNING: " $0 > "/dev/stderr" }\n'> ) } ) ] negated: F ) (C {(end)}) ] )