};
static struct debug_bucket obj_hash[ODEBUG_HASH_SIZE];
static struct debug_obj obj_static_pool[ODEBUG_POOL_SIZE] __initdata;
};
static struct debug_bucket obj_hash[ODEBUG_HASH_SIZE];
static struct debug_obj obj_static_pool[ODEBUG_POOL_SIZE] __initdata;
while (obj_pool_free > ODEBUG_POOL_SIZE) {
obj = hlist_entry(obj_pool.first, typeof(*obj), node);
hlist_del(&obj->node);
while (obj_pool_free > ODEBUG_POOL_SIZE) {
obj = hlist_entry(obj_pool.first, typeof(*obj), node);
hlist_del(&obj->node);
printk(KERN_WARNING "ODEBUG: Out of memory. ODEBUG disabled\n");
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
printk(KERN_WARNING "ODEBUG: Out of memory. ODEBUG disabled\n");
for (i = 0; i < ODEBUG_HASH_SIZE; i++, db++) {
/* Now free them */
hlist_for_each_entry_safe(obj, node, tmp, &freelist, node) {
/* Now free them */
hlist_for_each_entry_safe(obj, node, tmp, &freelist, node) {
obj = lookup_object(addr, db);
if (!obj) {
obj = alloc_object(addr, db, descr);
if (!obj) {
debug_objects_enabled = 0;
obj = lookup_object(addr, db);
if (!obj) {
obj = alloc_object(addr, db, descr);
if (!obj) {
debug_objects_enabled = 0;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "init");
state = obj->state;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "init");
state = obj->state;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "activate");
state = obj->state;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "activate");
state = obj->state;
/*
* This happens when a static object is activated. We
* let the type specific code decide whether this is
/*
* This happens when a static object is activated. We
* let the type specific code decide whether this is
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "destroy");
state = obj->state;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "destroy");
state = obj->state;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "free");
state = obj->state;
case ODEBUG_STATE_ACTIVE:
debug_print_object(obj, "free");
state = obj->state;
hlist_for_each_entry_safe(obj, node, tmp, &db->list, node) {
cnt++;
oaddr = (unsigned long) obj->object;
hlist_for_each_entry_safe(obj, node, tmp, &db->list, node) {
cnt++;
oaddr = (unsigned long) obj->object;
/* Now free them */
hlist_for_each_entry_safe(obj, node, tmp, &freelist, node) {
/* Now free them */
hlist_for_each_entry_safe(obj, node, tmp, &freelist, node) {
obj = lookup_object(addr, db);
if (!obj && state != ODEBUG_STATE_NONE) {
obj = lookup_object(addr, db);
if (!obj && state != ODEBUG_STATE_NONE) {
for (i = 0; i < ODEBUG_POOL_SIZE; i++)
hlist_add_head(&obj_static_pool[i].node, &obj_pool);
for (i = 0; i < ODEBUG_POOL_SIZE; i++)
hlist_add_head(&obj_static_pool[i].node, &obj_pool);