diff options
| author | Rasmus Villemoes <[email protected]> | 2019-03-07 16:27:41 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2019-03-07 18:32:00 -0800 |
| commit | 4573fe15437c909d5a06a01750125e2a06829370 (patch) | |
| tree | 61bbabd0d55420773ec4e331774658f20447e2ac /tools/perf/scripts/python/sctop.py | |
| parent | cdf6d00696865ae1c46750059fd7d248323712f9 (diff) | |
dynamic_debug: use pointer comparison in ddebug_remove_module
Now that we store the passed-in string directly in ddebug_add_module, we
can use pointer equality instead of strcmp. This is a little more
efficient, but more importantly, this also makes the code somewhat more
correct:
Currently, if one loads and then unloads a module whose name happens to
match the KBUILD_MODNAME of some built-in functionality (which need not
even be modular at all), all of their dynamic debug entries vanish along
with those of the actual module. For example, loading and unloading a
core.ko hides all pr_debugs from drivers/base/core.c and other built-in
files called core.c (incidentally, there is an in-tree module whose name
is core, but I just tested this with an out-of-tree trivial one).
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Rasmus Villemoes <[email protected]>
Acked-by: Jason Baron <[email protected]>
Cc: David Sterba <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: "Rafael J . Wysocki" <[email protected]>
Cc: Steven Rostedt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions