Lines 65-70
__FBSDID("$FreeBSD$");
Link Here
|
65 |
|
65 |
|
66 |
#ifdef DDB |
66 |
#ifdef DDB |
67 |
#include <ddb/ddb.h> |
67 |
#include <ddb/ddb.h> |
|
|
68 |
#include <ddb/db_sym.h> |
68 |
#include <machine/_inttypes.h> |
69 |
#include <machine/_inttypes.h> |
69 |
#endif |
70 |
#endif |
70 |
|
71 |
|
Lines 143-154
u_int callwheelsize, callwheelmask;
Link Here
|
143 |
struct cc_exec { |
144 |
struct cc_exec { |
144 |
struct callout *cc_curr; |
145 |
struct callout *cc_curr; |
145 |
void (*cc_drain)(void *); |
146 |
void (*cc_drain)(void *); |
|
|
147 |
void *cc_last_func; |
148 |
void *cc_last_arg; |
146 |
#ifdef SMP |
149 |
#ifdef SMP |
147 |
void (*ce_migration_func)(void *); |
150 |
void (*ce_migration_func)(void *); |
148 |
void *ce_migration_arg; |
151 |
void *ce_migration_arg; |
149 |
int ce_migration_cpu; |
|
|
150 |
sbintime_t ce_migration_time; |
152 |
sbintime_t ce_migration_time; |
151 |
sbintime_t ce_migration_prec; |
153 |
sbintime_t ce_migration_prec; |
|
|
154 |
int ce_migration_cpu; |
152 |
#endif |
155 |
#endif |
153 |
bool cc_cancel; |
156 |
bool cc_cancel; |
154 |
bool cc_waiting; |
157 |
bool cc_waiting; |
Lines 177-182
struct callout_cpu {
Link Here
|
177 |
#define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) |
180 |
#define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) |
178 |
|
181 |
|
179 |
#define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr |
182 |
#define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr |
|
|
183 |
#define cc_exec_last_func(cc, dir) cc->cc_exec_entity[dir].cc_last_func |
184 |
#define cc_exec_last_arg(cc, dir) cc->cc_exec_entity[dir].cc_last_arg |
180 |
#define cc_exec_drain(cc, dir) cc->cc_exec_entity[dir].cc_drain |
185 |
#define cc_exec_drain(cc, dir) cc->cc_exec_entity[dir].cc_drain |
181 |
#define cc_exec_next(cc) cc->cc_next |
186 |
#define cc_exec_next(cc) cc->cc_next |
182 |
#define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel |
187 |
#define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel |
Lines 686-691
softclock_call_cc(struct callout *c, struct callout_cpu *cc,
Link Here
|
686 |
c->c_iflags &= ~CALLOUT_PENDING; |
691 |
c->c_iflags &= ~CALLOUT_PENDING; |
687 |
|
692 |
|
688 |
cc_exec_curr(cc, direct) = c; |
693 |
cc_exec_curr(cc, direct) = c; |
|
|
694 |
cc_exec_last_func(cc, direct) = c_func; |
695 |
cc_exec_last_arg(cc, direct) = c_arg; |
689 |
cc_exec_cancel(cc, direct) = false; |
696 |
cc_exec_cancel(cc, direct) = false; |
690 |
cc_exec_drain(cc, direct) = NULL; |
697 |
cc_exec_drain(cc, direct) = NULL; |
691 |
CC_UNLOCK(cc); |
698 |
CC_UNLOCK(cc); |
Lines 1670-1673
DB_SHOW_COMMAND(callout, db_show_callout)
Link Here
|
1670 |
|
1677 |
|
1671 |
_show_callout((struct callout *)addr); |
1678 |
_show_callout((struct callout *)addr); |
1672 |
} |
1679 |
} |
|
|
1680 |
|
1681 |
static void |
1682 |
_show_last_callout(struct callout_cpu *cc, int direct, const char *dirstr) |
1683 |
{ |
1684 |
void *func, *arg; |
1685 |
|
1686 |
func = cc_exec_last_func(cc, direct); |
1687 |
arg = cc_exec_last_arg(cc, direct); |
1688 |
db_printf("last%s callout function: %p ", dirstr, func); |
1689 |
db_printsym((db_expr_t)func, DB_STGY_ANY); |
1690 |
db_printf("\nlast%s callout argument: %p\n", dirstr, arg); |
1691 |
} |
1692 |
|
1693 |
DB_SHOW_COMMAND(callout_last, db_show_callout_last) |
1694 |
{ |
1695 |
struct callout_cpu *cc; |
1696 |
|
1697 |
if (have_addr) { |
1698 |
if (addr < 0 || addr > mp_maxid || CPU_ABSENT(addr)) { |
1699 |
db_printf("no such cpu: %d\n", (int)addr); |
1700 |
return; |
1701 |
} |
1702 |
cc = CC_CPU(addr); |
1703 |
} else { |
1704 |
cc = CC_CPU(timeout_cpu); |
1705 |
} |
1706 |
|
1707 |
_show_last_callout(cc, 0, ""); |
1708 |
_show_last_callout(cc, 1, " direct"); |
1709 |
} |
1673 |
#endif /* DDB */ |
1710 |
#endif /* DDB */ |