9 #include "jdb_module.h"
10 #include "jdb_screen.h"
11 #include "kernel_console.h"
13 #include "ram_quota.h"
16 #include "static_init.h"
18 class Jdb_rcupdate : public Jdb_module
21 Jdb_rcupdate() FIASCO_INIT;
25 Jdb_rcupdate::Jdb_rcupdate()
31 Jdb_rcupdate::print_batch(Rcu_batch const &b)
37 Jdb_module::Action_code
38 Jdb_rcupdate::action(int cmd, void *&, char const *&, int &)
39 { printf("\nRCU--------------------------\n");
42 printf("RCU:\n current batch=");
43 print_batch(Rcu::_rcu._current); puts("");
44 printf(" completed=");
45 print_batch(Rcu::_rcu._completed); puts("");
46 printf(" next_pending=%s\n"
47 " cpus=", Rcu::_rcu._next_pending?"yes":"no");
48 for (unsigned i = 0; i < Config::Max_num_cpus; ++i)
49 printf("%s%s", Rcu::_rcu._cpus.get(i)?"1":"0", i%4 == 3?" ":"");
53 for (unsigned i = 0; i < Config::Max_num_cpus; ++i)
58 printf(" CPU[%2u]:", i);
59 Rcu_data const *d = &Rcu::_rcu_data.cpu(i);
60 printf(" quiescent batch=");
61 print_batch(d->_q_batch); puts("");
62 printf(" quiescent state passed: %s\n", d->_q_passed?"yes":"no");
63 printf(" wait for quiescent state: %s\n", d->_pending?"yes":"no");
65 print_batch(d->_batch); puts("");
66 printf(" next list: h=%p len=%ld\n", d->_n.front(), d->_len);
67 printf(" current list: h=%p \n", d->_c.front());
68 printf(" done list: h=%p\n", d->_d.front());
77 Jdb_module::Cmd const *
78 Jdb_rcupdate::cmds() const
82 { 0, 0, "rcupdate", "", "rcupdate\tshow RCU information", 0},
89 Jdb_rcupdate::num_cmds() const
92 static Jdb_rcupdate jdb_rcupdate INIT_PRIORITY(JDB_MODULE_INIT_PRIO);