Skip to content

Commit

Permalink
debug_objects: add boot-parameter toggle to turn object debugging off…
Browse files Browse the repository at this point in the history
… again

While trying to debug why my Atom netbook is falling over booting
rawhide debug-enabled kernels, I stumbled across the fact that we've
been enabling object debugging by default. However, once you default it
to on, you've got no way to turn it back off again at runtime.

Add a boolean toggle to turn it off. I would just make it an int
module_param, however people may already expect the boolean enable
behaviour, so just add an analogue for disabling.

Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
jkkm authored and Ingo Molnar committed Mar 2, 2009
1 parent 778ef1e commit 3e8ebb5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,9 @@ and is between 256 and 4096 characters. It is defined in the file

debug_objects [KNL] Enable object debugging

no_debug_objects
[KNL] Disable object debugging

debugpat [X86] Enable PAT debugging

decnet.addr= [HW,NET]
Expand Down
8 changes: 8 additions & 0 deletions lib/debugobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ static int __init enable_object_debug(char *str)
debug_objects_enabled = 1;
return 0;
}

static int __init disable_object_debug(char *str)
{
debug_objects_enabled = 0;
return 0;
}

early_param("debug_objects", enable_object_debug);
early_param("no_debug_objects", disable_object_debug);

static const char *obj_states[ODEBUG_STATE_MAX] = {
[ODEBUG_STATE_NONE] = "none",
Expand Down

0 comments on commit 3e8ebb5

Please sign in to comment.