dynamic_debug: Remove unnecessary __used
PATCH 1/1 dynamic_debug: Remove unnecessary __used
The __used attribute prevents gcc from eliminating unnecessary, otherwise optimized away, metadata for debugging logging messages.
Remove the __used attribute.
--- include/linux/dynamic_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/dynamic_debug.h +1 -1
@@ -61,7 +61,7 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, const char *fmt, ...);#define DEFINE_DYNAMIC_DEBUG_METADATA (name, fmt) \ - static struct _ddebug __used __aligned(8) \ + static struct _ddebug __aligned(8) \ __attribute__((section("__verbose"))) name = { \ .modname = KBUILD_MODNAME, \ .function = __func__, \
Quoted 5 lines · Joe Perches
The
__usedattribute prevents gcc from eliminating unnecessary, otherwise optimized away, metadata for debugging logging messages.Remove the
__usedattribute.
Very cool. Any idea how much space this saves?
greg k-h
Quoted 8 lines · Greg KH
Quoted 5 lines · Joe Perches
The
__usedattribute prevents gcc from eliminating unnecessary, otherwise optimized away, metadata for debugging logging messages.Remove the
__usedattribute.Very cool. Any idea how much space this saves?
Dunno, it's been a while since I did an allyesconfig on my netbook, my recollection is that was a few hundred kb.
Quoted 18 lines · Joe Perches
The
__usedattribute prevents gcc from eliminating unnecessary, otherwise optimized away, metadata for debugging logging messages.Remove the
__usedattribute.Signed-off-by Joe Perches <[email protected]>--- include/linux/dynamic_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/dynamic_debug.h +0
-0
include/linux/dynamic_debug.h int __dynamic_netdev_dbg(struct _ddebug *descriptor, · line 67
Quoted 8 lines
include/linux/dynamic_debug.h +1
-1@@ -61,7 +61,7 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, const char *fmt, ...);#define DEFINE_DYNAMIC_DEBUG_METADATA (name, fmt) \ - static struct _ddebug __used __aligned(8) \ + static struct _ddebug __aligned(8) \ __attribute__((section("__verbose"))) name = { \ .modname = KBUILD_MODNAME, \ .function = __func__, \
Greg, Pls pull this.
Quoted 19 lines · Jason Baron
Quoted 18 lines · Joe Perches
The
__usedattribute prevents gcc from eliminating unnecessary, otherwise optimized away, metadata for debugging logging messages.Remove the
__usedattribute.Signed-off-by Joe Perches <[email protected]>--- include/linux/dynamic_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/dynamic_debug.h +0
-0@@ -61,7 +61,7 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor, const char *fmt, ...);
Quoted 10 lines
include/linux/dynamic_debug.h int __dynamic_netdev_dbg(struct _ddebug *descriptor, · line 67
Quoted 8 lines
include/linux/dynamic_debug.h +1
-1#define DEFINE_DYNAMIC_DEBUG_METADATA (name, fmt) \ - static struct _ddebug __used __aligned(8) \ + static struct _ddebug __aligned(8) \ __attribute__((section("__verbose"))) name = { \ .modname = KBUILD_MODNAME, \ .function = __func__, \Greg, Pls pull this.
I will, thanks.
greg "here, have a vowel or three" k-h