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 &)
40 printf("\nRCU--------------------------\n");
44 printf("RCU:\n current batch=");
45 print_batch(Rcu::_rcu._current); puts("");
46 printf(" completed=");
47 print_batch(Rcu::_rcu._completed); puts("");
48 printf(" next_pending=%s\n"
49 " cpus=", Rcu::_rcu._next_pending?"yes":"no");
50 Jdb::cpu_mask_print(Rcu::_rcu._cpus);
52 printf(" active cpus=");
53 Jdb::cpu_mask_print(Rcu::_rcu._active_cpus);
55 printf(" active cpus=");
56 Jdb::cpu_mask_print(Rcu::_rcu._active_cpus);
59 for (Cpu_number i = Cpu_number::first(); i < Config::max_num_cpus(); ++i)
64 printf(" CPU[%2u]:", cxx::int_value<Cpu_number>(i));
65 Rcu_data const *d = &Rcu::_rcu_data.cpu(i);
66 printf(" quiescent batch=");
67 print_batch(d->_q_batch); puts("");
68 printf(" quiescent state passed: %s\n", d->_q_passed?"yes":"no");
69 printf(" wait for quiescent state: %s\n", d->_pending?"yes":"no");
71 print_batch(d->_batch); puts("");
72 printf(" next list: h=%p len=%ld\n", d->_n.front(), d->_len);
73 printf(" current list: h=%p \n", d->_c.front());
74 printf(" done list: h=%p\n", d->_d.front());
81 Jdb_module::Cmd const *
82 Jdb_rcupdate::cmds() const
86 { 0, 0, "rcupdate", "", "rcupdate\tshow RCU information", 0},
93 Jdb_rcupdate::num_cmds() const
96 static Jdb_rcupdate jdb_rcupdate INIT_PRIORITY(JDB_MODULE_INIT_PRIO);