Lines Matching refs:dnp

182 dt_stmt_append(dtrace_stmtdesc_t *sdp, const dt_node_t *dnp)  in dt_stmt_append()  argument
196 dnerror(dnp, D_COMM_COMM, "commit( ) may " in dt_stmt_append()
201 dnerror(dnp, D_COMM_DREC, "commit( ) may " in dt_stmt_append()
209 dnerror(dnp, D_AGG_COMM, "aggregating actions " in dt_stmt_append()
219 dnerror(dnp, D_SPEC_SPEC, "speculate( ) may " in dt_stmt_append()
224 dnerror(dnp, D_SPEC_COMM, "speculate( ) may " in dt_stmt_append()
229 dnerror(dnp, D_SPEC_DREC, "speculate( ) may " in dt_stmt_append()
239 dnerror(dnp, D_AGG_SPEC, "aggregating actions " in dt_stmt_append()
249 dnerror(dnp, D_ACT_SPEC, "destructive actions " in dt_stmt_append()
254 dnerror(dnp, D_EXIT_SPEC, "exit( ) may not " in dt_stmt_append()
272 dnerror(dnp, D_DREC_COMM, "data-recording actions " in dt_stmt_append()
322 dt_action_clear(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_clear() argument
331 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_clear()
335 dnerror(dnp, D_CLEAR_PROTO, in dt_action_clear()
337 dnp->dn_ident->di_name, argc); in dt_action_clear()
340 anp = dnp->dn_args; in dt_action_clear()
344 dnerror(dnp, D_CLEAR_AGGARG, in dt_action_clear()
347 dnp->dn_ident->di_name, in dt_action_clear()
354 dnerror(dnp, D_CLEAR_AGGBAD, in dt_action_clear()
364 dt_action_normalize(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_normalize() argument
369 int denormal = (strcmp(dnp->dn_ident->di_name, "denormalize") == 0); in dt_action_normalize()
374 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_normalize()
378 dnerror(dnp, D_NORMALIZE_PROTO, in dt_action_normalize()
380 dnp->dn_ident->di_name, argc, denormal ? 1 : 2); in dt_action_normalize()
383 anp = dnp->dn_args; in dt_action_normalize()
387 dnerror(dnp, D_NORMALIZE_AGGARG, in dt_action_normalize()
390 dnp->dn_ident->di_name, in dt_action_normalize()
395 dnerror(dnp, D_NORMALIZE_SCALAR, in dt_action_normalize()
397 dnp->dn_ident->di_name); in dt_action_normalize()
403 dnerror(dnp, D_NORMALIZE_AGGBAD, in dt_action_normalize()
427 dt_action_trunc(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_trunc() argument
436 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_trunc()
440 dnerror(dnp, D_TRUNC_PROTO, in dt_action_trunc()
442 dnp->dn_ident->di_name, argc, in dt_action_trunc()
446 anp = dnp->dn_args; in dt_action_trunc()
451 dnerror(dnp, D_TRUNC_AGGARG, in dt_action_trunc()
454 dnp->dn_ident->di_name, in dt_action_trunc()
461 dnerror(dnp, D_TRUNC_SCALAR, in dt_action_trunc()
463 dnp->dn_ident->di_name); in dt_action_trunc()
470 dnerror(dnp, D_TRUNC_AGGBAD, in dt_action_trunc()
493 dt_action_printa(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_printa() argument
503 for (anp = dnp->dn_args; anp != NULL; anp = anp->dn_list) in dt_action_printa()
506 switch (dnp->dn_args->dn_kind) { in dt_action_printa()
508 format = dnp->dn_args->dn_string; in dt_action_printa()
509 anp = dnp->dn_args->dn_list; in dt_action_printa()
514 anp = dnp->dn_args; in dt_action_printa()
519 anp = dnp->dn_args; in dt_action_printa()
524 dnerror(dnp, D_PRINTA_PROTO, in dt_action_printa()
526 dnp->dn_ident->di_name, argc, argr); in dt_action_printa()
533 dnerror(dnp, D_PRINTA_AGGARG, in dt_action_printa()
536 "\t argument: %s\n", dnp->dn_ident->di_name, argr, in dt_action_printa()
545 dnerror(dnp, D_PRINTA_AGGBAD, in dt_action_printa()
560 yylineno = dnp->dn_line; in dt_action_printa()
565 DT_PRINTF_AGGREGATION, dnp->dn_ident, 1, in dt_action_printa()
579 dt_action_printflike(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp, in dt_action_printflike() argument
588 if (dnp->dn_args->dn_kind != DT_NODE_STRING) { in dt_action_printflike()
589 dnerror(dnp, D_PRINTF_ARG_FMT, in dt_action_printflike()
592 dnp->dn_ident->di_name, in dt_action_printflike()
593 dt_node_type_name(dnp->dn_args, n, sizeof (n))); in dt_action_printflike()
596 arg1 = dnp->dn_args->dn_list; in dt_action_printflike()
597 yylineno = dnp->dn_line; in dt_action_printflike()
598 str = dnp->dn_args->dn_string; in dt_action_printflike()
619 dnerror(dnp, D_FREOPEN_INVALID, in dt_action_printflike()
621 dnp->dn_ident->di_name, DT_FREOPEN_RESTORE); in dt_action_printflike()
631 dnp->dn_ident, 1, DTRACEACT_AGGREGATION, arg1); in dt_action_printflike()
664 dt_action_trace(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_trace() argument
669 boolean_t istrace = (dnp->dn_ident->di_id == DT_ACT_TRACE); in dt_action_trace()
672 if (dt_node_is_void(dnp->dn_args)) { in dt_action_trace()
673 dnerror(dnp->dn_args, istrace ? D_TRACE_VOID : D_PRINT_VOID, in dt_action_trace()
677 if (dt_node_resolve(dnp->dn_args, DT_IDENT_XLPTR) != NULL) { in dt_action_trace()
678 dnerror(dnp->dn_args, istrace ? D_TRACE_DYN : D_PRINT_DYN, in dt_action_trace()
682 if (dnp->dn_args->dn_kind == DT_NODE_AGG) { in dt_action_trace()
683 dnerror(dnp->dn_args, istrace ? D_TRACE_AGG : D_PRINT_AGG, in dt_action_trace()
688 dt_cg(yypcb, dnp->dn_args); in dt_action_trace()
704 if (dnp->dn_ident->di_id == DT_ACT_PRINT) { in dt_action_trace()
741 dt_action_tracemem(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_tracemem() argument
745 dt_node_t *addr = dnp->dn_args; in dt_action_tracemem()
746 dt_node_t *max = dnp->dn_args->dn_list; in dt_action_tracemem()
819 dt_action_stack(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_stack() argument
822 dt_action_stack_args(dtp, ap, dnp->dn_args); in dt_action_stack()
826 dt_action_ustack_args(dtrace_hdl_t *dtp, dtrace_actdesc_t *ap, dt_node_t *dnp) in dt_action_ustack_args() argument
830 dt_node_t *arg0 = dnp->dn_args; in dt_action_ustack_args()
833 assert(dnp->dn_ident->di_id == DT_ACT_JSTACK || in dt_action_ustack_args()
834 dnp->dn_ident->di_id == DT_ACT_USTACK); in dt_action_ustack_args()
836 if (dnp->dn_ident->di_id == DT_ACT_JSTACK) { in dt_action_ustack_args()
845 assert(dnp->dn_ident->di_id == DT_ACT_USTACK); in dt_action_ustack_args()
881 dt_action_ustack(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_ustack() argument
884 dt_action_ustack_args(dtp, ap, dnp); in dt_action_ustack()
888 dt_action_setopt(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_setopt() argument
897 arg0 = dnp->dn_args; in dt_action_setopt()
922 dt_node_t *dnp, dtrace_actkind_t kind) in dt_action_symmod_args() argument
928 dt_cg(yypcb, dnp); in dt_action_symmod_args()
935 dt_action_symmod(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp, in dt_action_symmod() argument
939 dt_action_symmod_args(dtp, ap, dnp->dn_args, kind); in dt_action_symmod()
944 dt_action_ftruncate(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_ftruncate() argument
960 dt_action_stop(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_stop() argument
970 dt_action_breakpoint(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_breakpoint() argument
980 dt_action_panic(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_panic() argument
989 dt_action_chill(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_chill() argument
993 dt_cg(yypcb, dnp->dn_args); in dt_action_chill()
999 dt_action_raise(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_raise() argument
1003 dt_cg(yypcb, dnp->dn_args); in dt_action_raise()
1009 dt_action_exit(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_exit() argument
1013 dt_cg(yypcb, dnp->dn_args); in dt_action_exit()
1020 dt_action_speculate(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_speculate() argument
1024 dt_cg(yypcb, dnp->dn_args); in dt_action_speculate()
1030 dt_action_printm(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_printm() argument
1034 dt_node_t *size = dnp->dn_args; in dt_action_printm()
1035 dt_node_t *addr = dnp->dn_args->dn_list; in dt_action_printm()
1061 dt_action_commit(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_commit() argument
1065 dt_cg(yypcb, dnp->dn_args); in dt_action_commit()
1071 dt_action_discard(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_action_discard() argument
1075 dt_cg(yypcb, dnp->dn_args); in dt_action_discard()
1081 dt_compile_fun(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_compile_fun() argument
1083 switch (dnp->dn_expr->dn_ident->di_id) { in dt_compile_fun()
1085 dt_action_breakpoint(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1088 dt_action_chill(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1091 dt_action_clear(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1094 dt_action_commit(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1097 dt_action_normalize(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1100 dt_action_discard(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1103 dt_action_exit(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1106 dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_FREOPEN); in dt_compile_fun()
1109 dt_action_ftruncate(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1112 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_MOD); in dt_compile_fun()
1115 dt_action_normalize(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1118 dt_action_panic(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1121 dt_action_trace(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1124 dt_action_printa(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1127 dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_PRINTF); in dt_compile_fun()
1130 dt_action_printm(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1133 dt_action_raise(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1136 dt_action_setopt(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1139 dt_action_speculate(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1142 dt_action_stack(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1145 dt_action_stop(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1148 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_SYM); in dt_compile_fun()
1151 dt_action_printflike(dtp, dnp->dn_expr, sdp, DTRACEACT_SYSTEM); in dt_compile_fun()
1154 dt_action_trace(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1157 dt_action_tracemem(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1160 dt_action_trunc(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1163 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_UADDR); in dt_compile_fun()
1166 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_UMOD); in dt_compile_fun()
1169 dt_action_symmod(dtp, dnp->dn_expr, sdp, DTRACEACT_USYM); in dt_compile_fun()
1173 dt_action_ustack(dtp, dnp->dn_expr, sdp); in dt_compile_fun()
1176 dnerror(dnp->dn_expr, D_UNKNOWN, "tracing function %s( ) is " in dt_compile_fun()
1177 "not yet supported\n", dnp->dn_expr->dn_ident->di_name); in dt_compile_fun()
1182 dt_compile_exp(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_compile_exp() argument
1186 dt_cg(yypcb, dnp->dn_expr); in dt_compile_exp()
1193 dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) in dt_compile_agg() argument
1205 if (dnp->dn_aggfun == NULL) { in dt_compile_agg()
1206 dnerror(dnp, D_AGG_NULL, "expression has null effect: @%s\n", in dt_compile_agg()
1207 dnp->dn_ident->di_name); in dt_compile_agg()
1210 aid = dnp->dn_ident; in dt_compile_agg()
1211 fid = dnp->dn_aggfun->dn_ident; in dt_compile_agg()
1213 if (dnp->dn_aggfun->dn_args != NULL && in dt_compile_agg()
1214 dt_node_is_scalar(dnp->dn_aggfun->dn_args) == 0) { in dt_compile_agg()
1215 dnerror(dnp->dn_aggfun, D_AGG_SCALAR, "%s( ) argument #1 must " in dt_compile_agg()
1226 for (anp = dnp->dn_aggtup; anp != NULL; anp = anp->dn_list) { in dt_compile_agg()
1288 dt_node_t *arg1 = dnp->dn_aggfun->dn_args->dn_list; in dt_compile_agg()
1320 dnerror(dnp, D_LQUANT_MISMATCH, in dt_compile_agg()
1341 dnerror(dnp, D_LQUANT_STEPLARGE, in dt_compile_agg()
1347 dnerror(dnp, D_LQUANT_STEPSMALL, "lquantize( ) step " in dt_compile_agg()
1380 dnerror(dnp, D_LQUANT_MATCHBASE, "lquantize( ) " in dt_compile_agg()
1387 dnerror(dnp, D_LQUANT_MATCHLIM, "lquantize( ) " in dt_compile_agg()
1395 dnerror(dnp, D_LQUANT_MATCHSTEP, "lquantize( ) " in dt_compile_agg()
1424 dt_node_t *llarg = dnp->dn_aggfun->dn_args->dn_list; in dt_compile_agg()
1478 dnerror(dnp, D_LLQUANT_FACTORSMALL, "llquantize( ) " in dt_compile_agg()
1483 dnerror(dnp, D_LLQUANT_MAGRANGE, "llquantize( ) " in dt_compile_agg()
1489 dnerror(dnp, D_LLQUANT_FACTORNSTEPS, "llquantize( ) " in dt_compile_agg()
1499 dnerror(dnp, D_LLQUANT_FACTOREVEN, "llquantize( ) " in dt_compile_agg()
1512 dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " in dt_compile_agg()
1543 dnerror(dnp, args[i - 1].mismatch, "llquantize( ) " in dt_compile_agg()
1554 incr = dnp->dn_aggfun->dn_args->dn_list; in dt_compile_agg()
1560 dnerror(dnp, D_PROTO_ARG, "%s( ) increment value " in dt_compile_agg()
1595 if (dnp->dn_aggfun->dn_args != NULL) { in dt_compile_agg()
1596 dt_cg(yypcb, dnp->dn_aggfun->dn_args); in dt_compile_agg()
1606 dt_node_t *dnp; in dt_compile_one_clause() local
1631 for (dnp = cnp->dn_acts; dnp != NULL; dnp = dnp->dn_list) { in dt_compile_one_clause()
1635 switch (dnp->dn_kind) { in dt_compile_one_clause()
1637 if (dnp->dn_expr->dn_kind == DT_NODE_AGG) in dt_compile_one_clause()
1638 dt_compile_agg(dtp, dnp->dn_expr, sdp); in dt_compile_one_clause()
1640 dt_compile_exp(dtp, dnp, sdp); in dt_compile_one_clause()
1643 dt_compile_fun(dtp, dnp, sdp); in dt_compile_one_clause()
1646 dt_compile_agg(dtp, dnp, sdp); in dt_compile_one_clause()
1649 dnerror(dnp, D_UNKNOWN, "internal error -- node kind " in dt_compile_one_clause()
1650 "%u is not a valid statement\n", dnp->dn_kind); in dt_compile_one_clause()
1654 dt_stmt_append(sdp, dnp); in dt_compile_one_clause()
1673 dt_compile_xlator(dt_node_t *dnp) in dt_compile_xlator() argument
1675 dt_xlator_t *dxp = dnp->dn_xlator; in dt_compile_xlator()
1678 for (mnp = dnp->dn_members; mnp != NULL; mnp = mnp->dn_list) { in dt_compile_xlator()
2396 dt_node_t *dnp; in dt_compile() local
2483 dt_node_t *dnp, *next_dnp; in dt_compile() local
2486 for (dnp = yypcb->pcb_root->dn_list; in dt_compile()
2487 dnp != NULL; dnp = next_dnp) { in dt_compile()
2489 next_dnp = dnp->dn_list; in dt_compile()
2490 dnp->dn_list = NULL; in dt_compile()
2492 if (dnp->dn_kind == DT_NODE_CLAUSE) { in dt_compile()
2493 dnp = dt_compile_sugar(dtp, dnp); in dt_compile()
2497 dt_printd(dnp, stdout, 0); in dt_compile()
2498 for (p = dnp->dn_list; p != NULL; in dt_compile()
2504 new_list = dt_node_link(new_list, dnp); in dt_compile()
2519 if ((dnp = yypcb->pcb_root->dn_list) == NULL && in dt_compile()
2526 for (; dnp != NULL; dnp = dnp->dn_list) { in dt_compile()
2527 switch (dnp->dn_kind) { in dt_compile()
2530 dt_printd(dnp, stderr, 0); in dt_compile()
2531 dt_compile_clause(dtp, dnp); in dt_compile()
2535 dt_compile_xlator(dnp); in dt_compile()
2538 (void) dt_node_cook(dnp, DT_IDFLG_REF); in dt_compile()