Lines Matching refs:dnp

181 dt_stmt_append(dtrace_stmtdesc_t *sdp, const dt_node_t *dnp)  in dt_stmt_append()  argument
195 dnerror(dnp, D_COMM_COMM, "commit( ) may " in dt_stmt_append()
200 dnerror(dnp, D_COMM_DREC, "commit( ) may " in dt_stmt_append()
208 dnerror(dnp, D_AGG_COMM, "aggregating actions " in dt_stmt_append()
218 dnerror(dnp, D_SPEC_SPEC, "speculate( ) may " in dt_stmt_append()
223 dnerror(dnp, D_SPEC_COMM, "speculate( ) may " in dt_stmt_append()
228 dnerror(dnp, D_SPEC_DREC, "speculate( ) may " in dt_stmt_append()
238 dnerror(dnp, D_AGG_SPEC, "aggregating actions " in dt_stmt_append()
248 dnerror(dnp, D_ACT_SPEC, "destructive actions " in dt_stmt_append()
253 dnerror(dnp, D_EXIT_SPEC, "exit( ) may not " in dt_stmt_append()
271 dnerror(dnp, D_DREC_COMM, "data-recording actions " in dt_stmt_append()
321 dt_action_clear(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_clear() argument
330 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_clear()
334 dnerror(dnp, D_CLEAR_PROTO, in dt_action_clear()
336 dnp->dn_ident->di_name, argc); in dt_action_clear()
339 anp = dnp->dn_args; in dt_action_clear()
343 dnerror(dnp, D_CLEAR_AGGARG, in dt_action_clear()
346 dnp->dn_ident->di_name, in dt_action_clear()
353 dnerror(dnp, D_CLEAR_AGGBAD, in dt_action_clear()
363 dt_action_normalize(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_normalize() argument
368 int denormal = (strcmp(dnp->dn_ident->di_name, "denormalize") == 0); in dt_action_normalize()
373 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_normalize()
377 dnerror(dnp, D_NORMALIZE_PROTO, in dt_action_normalize()
379 dnp->dn_ident->di_name, argc, denormal ? 1 : 2); in dt_action_normalize()
382 anp = dnp->dn_args; in dt_action_normalize()
386 dnerror(dnp, D_NORMALIZE_AGGARG, in dt_action_normalize()
389 dnp->dn_ident->di_name, in dt_action_normalize()
394 dnerror(dnp, D_NORMALIZE_SCALAR, in dt_action_normalize()
396 dnp->dn_ident->di_name); in dt_action_normalize()
402 dnerror(dnp, D_NORMALIZE_AGGBAD, in dt_action_normalize()
426 dt_action_trunc(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_trunc() argument
435 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_trunc()
439 dnerror(dnp, D_TRUNC_PROTO, in dt_action_trunc()
441 dnp->dn_ident->di_name, argc, in dt_action_trunc()
445 anp = dnp->dn_args; in dt_action_trunc()
450 dnerror(dnp, D_TRUNC_AGGARG, in dt_action_trunc()
453 dnp->dn_ident->di_name, in dt_action_trunc()
460 dnerror(dnp, D_TRUNC_SCALAR, in dt_action_trunc()
462 dnp->dn_ident->di_name); in dt_action_trunc()
469 dnerror(dnp, D_TRUNC_AGGBAD, in dt_action_trunc()
492 dt_action_printa(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_printa() argument
502 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_printa()
505 switch (dnp->dn_args->dn_kind) { in dt_action_printa()
507 format = dnp->dn_args->dn_string; in dt_action_printa()
508 anp = dnp->dn_args->dn_list; in dt_action_printa()
513 anp = dnp->dn_args; in dt_action_printa()
518 anp = dnp->dn_args; in dt_action_printa()
523 dnerror(dnp, D_PRINTA_PROTO, in dt_action_printa()
525 dnp->dn_ident->di_name, argc, argr); in dt_action_printa()
532 dnerror(dnp, D_PRINTA_AGGARG, in dt_action_printa()
535 "\t argument: %s\n", dnp->dn_ident->di_name, argr, in dt_action_printa()
544 dnerror(dnp, D_PRINTA_AGGBAD, in dt_action_printa()
559 yylineno = dnp->dn_line; in dt_action_printa()
564 DT_PRINTF_AGGREGATION, dnp->dn_ident, 1, in dt_action_printa()
578 dt_action_printflike(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp, in dt_action_printflike() argument
587 if (dnp->dn_args->dn_kind != DT_NODE_STRING) { in dt_action_printflike()
588 dnerror(dnp, D_PRINTF_ARG_FMT, in dt_action_printflike()
591 dnp->dn_ident->di_name, in dt_action_printflike()
592 dt_node_type_name(dnp->dn_args, n, sizeof (n))); in dt_action_printflike()
595 arg1 = dnp->dn_args->dn_list; in dt_action_printflike()
596 yylineno = dnp->dn_line; in dt_action_printflike()
597 str = dnp->dn_args->dn_string; in dt_action_printflike()
618 dnerror(dnp, D_FREOPEN_INVALID, in dt_action_printflike()
620 dnp->dn_ident->di_name, DT_FREOPEN_RESTORE); in dt_action_printflike()
630 dnp->dn_ident, 1, DTRACEACT_AGGREGATION, arg1); in dt_action_printflike()
663 dt_action_trace(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_trace() argument
668 boolean_t istrace = (dnp->dn_ident->di_id == DT_ACT_TRACE); in dt_action_trace()
671 if (dt_node_is_void(dnp->dn_args)) { in dt_action_trace()
672 dnerror(dnp->dn_args, istrace ? D_TRACE_VOID : D_PRINT_VOID, in dt_action_trace()
676 if (dt_node_resolve(dnp->dn_args, DT_IDENT_XLPTR) != NULL) { in dt_action_trace()
677 dnerror(dnp->dn_args, istrace ? D_TRACE_DYN : D_PRINT_DYN, in dt_action_trace()
681 if (dnp->dn_args->dn_kind == DT_NODE_AGG) { in dt_action_trace()
682 dnerror(dnp->dn_args, istrace ? D_TRACE_AGG : D_PRINT_AGG, in dt_action_trace()
687 dt_cg(yypcb, dnp->dn_args); in dt_action_trace()
703 if (dnp->dn_ident->di_id == DT_ACT_PRINT) { in dt_action_trace()
737 dt_action_tracemem(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_tracemem() argument
741 dt_node_t *addr = dnp->dn_args; in dt_action_tracemem()
742 dt_node_t *max = dnp->dn_args->dn_list; in dt_action_tracemem()
815 dt_action_stack(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_stack() argument
818 dt_action_stack_args(dtp, ap, dnp->dn_args); in dt_action_stack()
822 dt_action_ustack_args(dtrace_hdl_t *dtp, dtrace_actdesc_t *ap, dt_node_t *dnp) in dt_action_ustack_args() argument
826 dt_node_t *arg0 = dnp->dn_args; in dt_action_ustack_args()
829 assert(dnp->dn_ident->di_id == DT_ACT_JSTACK || in dt_action_ustack_args()
830 dnp->dn_ident->di_id == DT_ACT_USTACK); in dt_action_ustack_args()
832 if (dnp->dn_ident->di_id == DT_ACT_JSTACK) { in dt_action_ustack_args()
841 assert(dnp->dn_ident->di_id == DT_ACT_USTACK); in dt_action_ustack_args()
877 dt_action_ustack(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_ustack() argument
880 dt_action_ustack_args(dtp, ap, dnp); in dt_action_ustack()
884 dt_action_setopt(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_setopt() argument
893 arg0 = dnp->dn_args; in dt_action_setopt()
918 dt_node_t *dnp, dtrace_actkind_t kind) in dt_action_symmod_args() argument
924 dt_cg(yypcb, dnp); in dt_action_symmod_args()
931 dt_action_symmod(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp, in dt_action_symmod() argument
935 dt_action_symmod_args(dtp, ap, dnp->dn_args, kind); in dt_action_symmod()
940 dt_action_ftruncate(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_ftruncate() argument
956 dt_action_stop(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_stop() argument
966 dt_action_breakpoint(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_breakpoint() argument
976 dt_action_panic(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_panic() argument
985 dt_action_chill(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_chill() argument
989 dt_cg(yypcb, dnp->dn_args); in dt_action_chill()
995 dt_action_raise(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_raise() argument
999 dt_cg(yypcb, dnp->dn_args); in dt_action_raise()
1005 dt_action_exit(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_exit() argument
1009 dt_cg(yypcb, dnp->dn_args); in dt_action_exit()
1016 dt_action_speculate(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_speculate() argument
1020 dt_cg(yypcb, dnp->dn_args); in dt_action_speculate()
1026 dt_action_commit(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_commit() argument
1030 dt_cg(yypcb, dnp->dn_args); in dt_action_commit()
1036 dt_action_discard(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_discard() argument
1040 dt_cg(yypcb, dnp->dn_args); in dt_action_discard()
1046 dt_compile_fun(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_compile_fun() argument
1048 switch (dnp->dn_expr->dn_ident->di_id) { in dt_compile_fun()
1050 dt_action_breakpoint(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1053 dt_action_chill(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1056 dt_action_clear(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1059 dt_action_commit(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1062 dt_action_normalize(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1065 dt_action_discard(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1068 dt_action_exit(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1071 dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_FREOPEN); in dt_compile_fun()
1074 dt_action_ftruncate(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1077 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_MOD); in dt_compile_fun()
1080 dt_action_normalize(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1083 dt_action_panic(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1086 dt_action_trace(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1089 dt_action_printa(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1092 dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_PRINTF); in dt_compile_fun()
1095 dt_action_raise(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1098 dt_action_setopt(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1101 dt_action_speculate(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1104 dt_action_stack(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1107 dt_action_stop(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1110 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_SYM); in dt_compile_fun()
1113 dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_SYSTEM); in dt_compile_fun()
1116 dt_action_trace(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1119 dt_action_tracemem(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1122 dt_action_trunc(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1125 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_UADDR); in dt_compile_fun()
1128 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_UMOD); in dt_compile_fun()
1131 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_USYM); in dt_compile_fun()
1135 dt_action_ustack(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1138 dnerror(dnp->dn_expr, D_UNKNOWN, "tracing function %s( ) is " in dt_compile_fun()
1139 "not yet supported\n", dnp->dn_expr->dn_ident->di_name); in dt_compile_fun()
1144 dt_compile_exp(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_compile_exp() argument
1148 dt_cg(yypcb, dnp->dn_expr); in dt_compile_exp()
1155 dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_compile_agg() argument
1167 if (dnp->dn_aggfun == NULL) { in dt_compile_agg()
1168 dnerror(dnp, D_AGG_NULL, "expression has null effect: @%s\n", in dt_compile_agg()
1169 dnp->dn_ident->di_name); in dt_compile_agg()
1172 aid = dnp->dn_ident; in dt_compile_agg()
1173 fid = dnp->dn_aggfun->dn_ident; in dt_compile_agg()
1175 if (dnp->dn_aggfun->dn_args != NULL && in dt_compile_agg()
1176 dt_node_is_scalar(dnp->dn_aggfun->dn_args) == 0) { in dt_compile_agg()
1177 dnerror(dnp->dn_aggfun, D_AGG_SCALAR, "%s( ) argument #1 must " in dt_compile_agg()
1188 for (anp = dnp->dn_aggtup; anp != NULL; anp = anp->dn_list) { in dt_compile_agg()
1250 dt_node_t *arg1 = dnp->dn_aggfun->dn_args->dn_list; in dt_compile_agg()
1282 dnerror(dnp, D_LQUANT_MISMATCH, in dt_compile_agg()
1303 dnerror(dnp, D_LQUANT_STEPLARGE, in dt_compile_agg()
1309 dnerror(dnp, D_LQUANT_STEPSMALL, "lquantize( ) step " in dt_compile_agg()
1342 dnerror(dnp, D_LQUANT_MATCHBASE, "lquantize( ) " in dt_compile_agg()
1349 dnerror(dnp, D_LQUANT_MATCHLIM, "lquantize( ) " in dt_compile_agg()
1357 dnerror(dnp, D_LQUANT_MATCHSTEP, "lquantize( ) " in dt_compile_agg()
1386 dt_node_t *llarg = dnp->dn_aggfun->dn_args->dn_list; in dt_compile_agg()
1439 dnerror(dnp, D_LLQUANT_FACTORSMALL, "llquantize( ) " in dt_compile_agg()
1444 dnerror(dnp, D_LLQUANT_MAGRANGE, "llquantize( ) " in dt_compile_agg()
1450 dnerror(dnp, D_LLQUANT_FACTORNSTEPS, "llquantize( ) " in dt_compile_agg()
1460 dnerror(dnp, D_LLQUANT_FACTOREVEN, "llquantize( ) " in dt_compile_agg()
1473 dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " in dt_compile_agg()
1504 dnerror(dnp, args[i - 1].mismatch, "llquantize( ) " in dt_compile_agg()
1515 incr = dnp->dn_aggfun->dn_args->dn_list; in dt_compile_agg()
1521 dnerror(dnp, D_PROTO_ARG, "%s( ) increment value " in dt_compile_agg()
1556 if (dnp->dn_aggfun->dn_args != NULL) { in dt_compile_agg()
1557 dt_cg(yypcb, dnp->dn_aggfun->dn_args); in dt_compile_agg()
1567 dt_node_t *dnp; in dt_compile_one_clause() local
1592 for (dnp = cnp->dn_acts; dnp != NULL; dnp = dnp->dn_list) { in dt_compile_one_clause()
1596 switch (dnp->dn_kind) { in dt_compile_one_clause()
1598 if (dnp->dn_expr->dn_kind == DT_NODE_AGG) in dt_compile_one_clause()
1599 dt_compile_agg(dtp, dnp->dn_expr, sdp); in dt_compile_one_clause()
1601 dt_compile_exp(dtp, dnp, sdp); in dt_compile_one_clause()
1604 dt_compile_fun(dtp, dnp, sdp); in dt_compile_one_clause()
1607 dt_compile_agg(dtp, dnp, sdp); in dt_compile_one_clause()
1610 dnerror(dnp, D_UNKNOWN, "internal error -- node kind " in dt_compile_one_clause()
1611 "%u is not a valid statement\n", dnp->dn_kind); in dt_compile_one_clause()
1615 dt_stmt_append(sdp, dnp); in dt_compile_one_clause()
1634 dt_compile_xlator(dt_node_t *dnp) in dt_compile_xlator() argument
1636 dt_xlator_t *dxp = dnp->dn_xlator; in dt_compile_xlator()
1639 for (mnp = dnp->dn_members; mnp != NULL; mnp = mnp->dn_list) { in dt_compile_xlator()
2335 dt_node_t *dnp; in dt_compile() local
2425 dt_node_t *dnp, *next_dnp; in dt_compile() local
2428 for (dnp = yypcb->pcb_root->dn_list; in dt_compile()
2429 dnp != NULL; dnp = next_dnp) { in dt_compile()
2431 next_dnp = dnp->dn_list; in dt_compile()
2432 dnp->dn_list = NULL; in dt_compile()
2434 if (dnp->dn_kind == DT_NODE_CLAUSE) in dt_compile()
2435 dnp = dt_compile_sugar(dtp, dnp); in dt_compile()
2437 new_list = dt_node_link(new_list, dnp); in dt_compile()
2452 if ((dnp = yypcb->pcb_root->dn_list) == NULL && in dt_compile()
2459 for (; dnp != NULL; dnp = dnp->dn_list) { in dt_compile()
2460 switch (dnp->dn_kind) { in dt_compile()
2463 dt_printd(dnp, stderr, 0); in dt_compile()
2464 dt_compile_clause(dtp, dnp); in dt_compile()
2468 dt_compile_xlator(dnp); in dt_compile()
2471 (void) dt_node_cook(dnp, DT_IDFLG_REF); in dt_compile()