Lines Matching refs:coargs

925 	callout_data_t *coargs = (callout_data_t *)priv;  in callouts_cb()  local
930 if ((coargs == NULL) || (co == NULL)) { in callouts_cb()
934 if ((coargs->flags & COF_FREE) && !(co->c_xid & CALLOUT_ID_FREE)) { in callouts_cb()
941 if (!(coargs->flags & COF_FREE) && (co->c_xid & CALLOUT_ID_FREE)) { in callouts_cb()
948 if ((coargs->flags & COF_FUNC) && in callouts_cb()
949 (coargs->funcaddr != (uintptr_t)co->c_func)) { in callouts_cb()
952 if ((coargs->flags & COF_PARAM) && in callouts_cb()
953 (coargs->param != (uintptr_t)co->c_arg)) { in callouts_cb()
956 if (!(coargs->flags & COF_LONG) && (co->c_xid & CALLOUT_LONGTERM)) { in callouts_cb()
959 if (!(coargs->flags & COF_SHORT) && !(co->c_xid & CALLOUT_LONGTERM)) { in callouts_cb()
962 if ((coargs->flags & COF_EXEC) && !(co->c_xid & CALLOUT_EXECUTING)) { in callouts_cb()
966 if (coargs->flags & COF_BYIDH) { in callouts_cb()
967 if (!(coargs->flags & COF_FREE)) { in callouts_cb()
969 if (mdb_vread(&coargs->exp, sizeof (hrtime_t), in callouts_cb()
974 coargs->exp = 0; in callouts_cb()
977 if (mdb_vread(&coargs->list_flags, sizeof (int), in callouts_cb()
982 coargs->list_flags = 0; in callouts_cb()
986 coargs->exp = 0; in callouts_cb()
987 coargs->list_flags = 0; in callouts_cb()
989 if (coargs->exp != 0) { in callouts_cb()
990 if ((coargs->flags & COF_TIME) && in callouts_cb()
991 (coargs->exp != coargs->time)) { in callouts_cb()
994 if ((coargs->flags & COF_BEFORE) && in callouts_cb()
995 (coargs->exp > coargs->btime)) { in callouts_cb()
998 if ((coargs->flags & COF_AFTER) && in callouts_cb()
999 (coargs->exp < coargs->atime)) { in callouts_cb()
1004 list_flags = coargs->list_flags; in callouts_cb()
1005 if ((coargs->flags & COF_HIRES) && (coargs->flags & COF_ABS)) { in callouts_cb()
1012 if ((coargs->flags & COF_HIRES) && in callouts_cb()
1016 if ((coargs->flags & COF_ABS) && in callouts_cb()
1027 if ((coargs->flags & COF_HEAP) && in callouts_cb()
1032 if ((coargs->flags & COF_QUEUE) && in callouts_cb()
1038 #define callout_table_mask ((1 << coargs->ctbits) - 1) in callouts_cb()
1043 if ((coargs->flags & COF_CHDR) && !(coargs->flags & COF_ADDR)) { in callouts_cb()
1049 if (!(coargs->flags & COF_VERBOSE)) { in callouts_cb()
1052 } else if (coargs->flags & COF_BYIDH) { in callouts_cb()
1057 if (coargs->flags & COF_LONGLIST) { in callouts_cb()
1064 coargs->flags &= ~COF_CHDR; in callouts_cb()
1065 coargs->flags |= (COF_THDR | COF_LHDR); in callouts_cb()
1068 if (!(coargs->flags & COF_ADDR)) { in callouts_cb()
1069 if (!(coargs->flags & COF_VERBOSE)) { in callouts_cb()
1073 (coargs->flags & COF_EXPREL) ? in callouts_cb()
1074 coargs->exp - coargs->now : coargs->exp); in callouts_cb()
1075 } else if (coargs->flags & COF_BYIDH) { in callouts_cb()
1077 (coargs->flags & COF_EXPREL) ? in callouts_cb()
1078 coargs->exp - coargs->now : coargs->exp); in callouts_cb()
1080 list_flags = coargs->list_flags; in callouts_cb()
1087 if (coargs->flags & COF_LONGLIST) { in callouts_cb()
1107 callout_data_t *coargs = (callout_data_t *)priv; in callout_list_cb() local
1112 if ((coargs == NULL) || (cl == NULL)) { in callout_list_cb()
1116 coargs->exp = cl->cl_expiration; in callout_list_cb()
1117 coargs->list_flags = cl->cl_flags; in callout_list_cb()
1118 if ((coargs->flags & COF_FREE) && in callout_list_cb()
1126 if (!(coargs->flags & COF_FREE) && in callout_list_cb()
1134 if ((coargs->flags & COF_TIME) && in callout_list_cb()
1135 (cl->cl_expiration != coargs->time)) { in callout_list_cb()
1138 if ((coargs->flags & COF_BEFORE) && in callout_list_cb()
1139 (cl->cl_expiration > coargs->btime)) { in callout_list_cb()
1142 if ((coargs->flags & COF_AFTER) && in callout_list_cb()
1143 (cl->cl_expiration < coargs->atime)) { in callout_list_cb()
1146 if (!(coargs->flags & COF_EMPTY) && in callout_list_cb()
1151 if ((coargs->flags & COF_HIRES) && (coargs->flags & COF_ABS)) { in callout_list_cb()
1157 if ((coargs->flags & COF_HIRES) && in callout_list_cb()
1161 if ((coargs->flags & COF_ABS) && in callout_list_cb()
1167 if ((coargs->flags & COF_HEAP) && in callout_list_cb()
1168 !(coargs->list_flags & CALLOUT_LIST_FLAG_HEAPED)) { in callout_list_cb()
1172 if ((coargs->flags & COF_QUEUE) && in callout_list_cb()
1173 !(coargs->list_flags & CALLOUT_LIST_FLAG_QUEUED)) { in callout_list_cb()
1177 if ((coargs->flags & COF_LHDR) && !(coargs->flags & COF_ADDR) && in callout_list_cb()
1178 (coargs->flags & (COF_LIST | COF_VERBOSE))) { in callout_list_cb()
1179 if (!(coargs->flags & COF_VERBOSE)) { in callout_list_cb()
1186 if (coargs->flags & COF_LONGLIST) { in callout_list_cb()
1191 coargs->flags &= ~COF_LHDR; in callout_list_cb()
1192 coargs->flags |= (COF_THDR | COF_CHDR); in callout_list_cb()
1194 if (coargs->flags & (COF_LIST | COF_VERBOSE)) { in callout_list_cb()
1195 if (!(coargs->flags & COF_ADDR)) { in callout_list_cb()
1196 if (!(coargs->flags & COF_VERBOSE)) { in callout_list_cb()
1198 TABLE_TO_SEQID(coargs->ndx), in callout_list_cb()
1199 co_typenames[coargs->ndx & in callout_list_cb()
1203 list_flags = coargs->list_flags; in callout_list_cb()
1205 (coargs->flags & COF_EXPREL) ? in callout_list_cb()
1206 coargs->exp - coargs->now : coargs->exp, in callout_list_cb()
1211 coargs->bucket, cl->cl_callouts.ch_head); in callout_list_cb()
1213 if (coargs->flags & COF_LONGLIST) { in callout_list_cb()
1222 if (coargs->flags & COF_LIST) { in callout_list_cb()
1231 if (coargs->flags & COF_FREE) { in callout_list_cb()
1236 if (coargs->flags & COF_VERBOSE) { in callout_list_cb()
1244 if (mdb_pwalk("callouts_bytime", callouts_cb, coargs, in callout_list_cb()
1249 if (coargs->flags & COF_VERBOSE) { in callout_list_cb()
1260 callout_data_t *coargs = (callout_data_t *)priv; in callout_t_cb() local
1268 if ((coargs == NULL) || (ct == NULL) || (coargs->co_table == NULL)) { in callout_t_cb()
1272 index = ((char *)addr - (char *)coargs->co_table) / in callout_t_cb()
1277 if ((coargs->flags & COF_SEQID) && (coargs->seqid != seqid)) { in callout_t_cb()
1281 if (!(coargs->flags & COF_REAL) && (cotype == CALLOUT_REALTIME)) { in callout_t_cb()
1285 if (!(coargs->flags & COF_NORM) && (cotype == CALLOUT_NORMAL)) { in callout_t_cb()
1289 if (!(coargs->flags & COF_EMPTY) && ( in callout_t_cb()
1294 if ((coargs->flags & COF_THDR) && !(coargs->flags & COF_ADDR) && in callout_t_cb()
1295 (coargs->flags & (COF_TABLE | COF_VERBOSE))) { in callout_t_cb()
1299 coargs->flags &= ~COF_THDR; in callout_t_cb()
1300 coargs->flags |= (COF_LHDR | COF_CHDR); in callout_t_cb()
1301 if (coargs->flags & COF_LONGLIST) { in callout_t_cb()
1310 if (coargs->flags & (COF_TABLE | COF_VERBOSE)) { in callout_t_cb()
1311 if (!(coargs->flags & COF_ADDR)) { in callout_t_cb()
1316 if (coargs->flags & COF_LONGLIST) { in callout_t_cb()
1333 if (coargs->flags & COF_TABLE) { in callout_t_cb()
1338 coargs->ndx = index; in callout_t_cb()
1339 if (coargs->flags & COF_VERBOSE) { in callout_t_cb()
1343 if (!(coargs->flags & COF_BYIDH)) { in callout_t_cb()
1345 if (coargs->flags & COF_FREE) { in callout_t_cb()
1347 coargs->bucket = 0; in callout_t_cb()
1351 if (mdb_pwalk("callout_list", callout_list_cb, coargs, in callout_t_cb()
1361 coargs->bucket = -1; in callout_t_cb()
1363 coargs, (uintptr_t)clptr) == -1) { in callout_t_cb()
1372 coargs->bucket = -1; in callout_t_cb()
1374 coargs, (uintptr_t)clptr) == -1) { in callout_t_cb()
1390 coargs->bucket = i; in callout_t_cb()
1393 coargs, (uintptr_t)clptr) == -1) { in callout_t_cb()
1402 if (coargs->flags & COF_FREE) { in callout_t_cb()
1404 coargs->bucket = 0; in callout_t_cb()
1408 if (mdb_pwalk("callouts_byid", callouts_cb, coargs, in callout_t_cb()
1424 coargs->bucket = i; in callout_t_cb()
1432 coargs, (uintptr_t)coptr) == -1) { in callout_t_cb()
1440 if (coargs->flags & COF_VERBOSE) { in callout_t_cb()
1450 callout_common_init(callout_data_t *coargs) in callout_common_init() argument
1453 if (mdb_readvar(&(coargs->co_table), "callout_table") == -1) { in callout_common_init()
1458 if (mdb_readsym(&(coargs->now), sizeof (hrtime_t), "hrtime_last") != in callout_common_init()
1460 if (mdb_readsym(&(coargs->now), sizeof (hrtime_t), in callout_common_init()
1467 if (mdb_readvar(&(coargs->ctbits), "callout_table_bits") == -1) { in callout_common_init()
1471 if (mdb_readvar(&(coargs->nsec_per_tick), "nsec_per_tick") == -1) { in callout_common_init()
1487 callout_data_t coargs; in callout() local
1495 coargs.flags = COF_DEFAULT; in callout()
1497 coargs.seqid = -1; in callout()
1500 'r', MDB_OPT_CLRBITS, COF_NORM, &coargs.flags, in callout()
1501 'n', MDB_OPT_CLRBITS, COF_REAL, &coargs.flags, in callout()
1502 'l', MDB_OPT_CLRBITS, COF_SHORT, &coargs.flags, in callout()
1503 's', MDB_OPT_CLRBITS, COF_LONG, &coargs.flags, in callout()
1504 'x', MDB_OPT_SETBITS, COF_EXEC, &coargs.flags, in callout()
1505 'h', MDB_OPT_SETBITS, COF_HIRES, &coargs.flags, in callout()
1506 'B', MDB_OPT_SETBITS, COF_ABS, &coargs.flags, in callout()
1507 'E', MDB_OPT_SETBITS, COF_EMPTY, &coargs.flags, in callout()
1511 't', MDB_OPT_UINTPTR_SET, &tflag, (uintptr_t *)&coargs.time, in callout()
1512 'a', MDB_OPT_UINTPTR_SET, &aflag, (uintptr_t *)&coargs.atime, in callout()
1513 'b', MDB_OPT_UINTPTR_SET, &bflag, (uintptr_t *)&coargs.btime, in callout()
1517 'T', MDB_OPT_SETBITS, COF_TABLE, &coargs.flags, in callout()
1518 'D', MDB_OPT_SETBITS, COF_EXPREL, &coargs.flags, in callout()
1519 'L', MDB_OPT_SETBITS, COF_LIST, &coargs.flags, in callout()
1520 'V', MDB_OPT_SETBITS, COF_VERBOSE, &coargs.flags, in callout()
1521 'v', MDB_OPT_SETBITS, COF_LONGLIST, &coargs.flags, in callout()
1522 'i', MDB_OPT_SETBITS, COF_BYIDH, &coargs.flags, in callout()
1523 'F', MDB_OPT_SETBITS, COF_FREE, &coargs.flags, in callout()
1524 'H', MDB_OPT_SETBITS, COF_HEAP, &coargs.flags, in callout()
1525 'Q', MDB_OPT_SETBITS, COF_QUEUE, &coargs.flags, in callout()
1526 'A', MDB_OPT_SETBITS, COF_ADDR, &coargs.flags, in callout()
1532 if ((retval = callout_common_init(&coargs)) != DCMD_OK) { in callout()
1538 coargs.time *= coargs.nsec_per_tick; in callout()
1539 coargs.atime *= coargs.nsec_per_tick; in callout()
1540 coargs.btime *= coargs.nsec_per_tick; in callout()
1544 coargs.time += coargs.now; in callout()
1545 coargs.atime += coargs.now; in callout()
1546 coargs.btime += coargs.now; in callout()
1554 coargs.flags |= COF_SEQID; in callout()
1555 coargs.seqid = (int)Stmp; in callout()
1563 if (coargs.flags & COF_SEQID) { in callout()
1567 coargs.cpu = (cpu_t *)Ctmp; in callout()
1568 if (mdb_vread(&coargs.seqid, sizeof (processorid_t), in callout()
1569 (uintptr_t)&(coargs.cpu->cpu_seqid)) == -1) { in callout()
1573 coargs.flags |= COF_SEQID; in callout()
1576 if (!(coargs.flags & (COF_REAL | COF_NORM))) { in callout()
1577 coargs.flags |= COF_REAL | COF_NORM; in callout()
1579 if (!(coargs.flags & (COF_LONG | COF_SHORT))) { in callout()
1580 coargs.flags |= COF_LONG | COF_SHORT; in callout()
1587 coargs.flags |= COF_TIME; in callout()
1590 coargs.flags |= COF_AFTER; in callout()
1593 coargs.flags |= COF_BEFORE; in callout()
1595 if ((aflag && bflag) && (coargs.btime <= coargs.atime)) { in callout()
1601 if ((coargs.flags & COF_HEAP) && (coargs.flags & COF_QUEUE)) { in callout()
1610 coargs.funcaddr = mdb_strtoull(funcname); in callout()
1612 coargs.funcaddr = sym.st_value; in callout()
1614 coargs.flags |= COF_FUNC; in callout()
1621 coargs.param = mdb_strtoull(paramstr); in callout()
1623 coargs.param = sym.st_value; in callout()
1625 coargs.flags |= COF_PARAM; in callout()
1637 coargs.flags |= (COF_REAL | COF_NORM); in callout()
1640 if (DCMD_HDRSPEC(flags) || (coargs.flags & COF_VERBOSE)) { in callout()
1641 coargs.flags |= COF_THDR | COF_LHDR | COF_CHDR; in callout()
1643 if (coargs.flags & COF_FREE) { in callout()
1644 coargs.flags |= COF_EMPTY; in callout()
1646 if (!(coargs.flags & COF_LIST)) { in callout()
1647 coargs.flags |= COF_BYIDH; in callout()
1652 if (mdb_pwalk("callout_table", callout_t_cb, &coargs, addr) == -1) { in callout()
1667 callout_data_t coargs; in calloutid() local
1680 coargs.flags = COF_DEFAULT | COF_BYIDH; in calloutid()
1682 'd', MDB_OPT_SETBITS, COF_DECODE, &coargs.flags, in calloutid()
1683 'v', MDB_OPT_SETBITS, COF_LONGLIST, &coargs.flags, in calloutid()
1696 coargs.flags |= COF_CHDR; in calloutid()
1701 if ((retval = callout_common_init(&coargs)) != DCMD_OK) { in calloutid()
1706 #define callout_table_mask ((1 << coargs.ctbits) - 1) in calloutid()
1707 #define callout_table_bits coargs.ctbits in calloutid()
1708 #define nsec_per_tick coargs.nsec_per_tick in calloutid()
1721 if (coargs.flags & COF_DECODE) { in calloutid()
1736 ctptr = coargs.co_table + tableid; in calloutid()
1762 coargs.ndx = tableid; in calloutid()
1763 coargs.bucket = idhash; in calloutid()
1766 if (mdb_pwalk("callouts_byid", callouts_cb, &coargs, in calloutid()